# Maintainer: pkgname=musikcube pkgver=3.0.1 pkgrel=1 pkgdesc="a cross-platform, terminal-based music player, audio engine, metadata indexer, and server" url="https://github.com/clangen/musikcube" arch="all" license="BSD-3-Clause" # TODO: libbasu-dev instead of elogind-dev yields a nonfunctioning mpris plugin, # even though session is not in elogind anyway, libelogind works makedepends=" alsa-lib-dev asio-dev cmake curl-dev elogind-dev ffmpeg-dev kissfft-dev lame-dev libev-dev libmicrohttpd-dev libopenmpt-dev ncurses-dev pipewire-dev samurai sdbus-cpp-dev sqlite-dev taglib-dev " # TODO: split server (-d) # put plugins in not /usr/share # split locales subpackages=" $pkgname-dev $pkgname-plugin-all:allplugins " source="$pkgname-$pkgver.tar.gz::https://github.com/clangen/musikcube/archive/refs/tags/$pkgver.tar.gz locale.patch tinfo.patch sys.patch " options="!check" # no tests # alsa/pipewire/ffmpegdecorder left in by default _plugins=" httpdatastream mpris openmpt server stockencoders supereqdsp taglibreader " for _plugin in $_plugins; do subpackages="$subpackages $pkgname-plugin-$_plugin:plugin" done prepare() { default_prepare cd src/3rdparty rm -r src/sqlite rm -r src/kiss* } build() { # no-ncursesw prevents looking in the wrong place # disable-update-check is passed for ''homebrew builds'', removes update checker CFLAGS="$CFLAGS -DNDEBUG -O2" \ CXXFLAGS="$CXXFLAGS -DDISABLE_UPDATE_CHECK -DNO_NCURSESW -DNDEBUG -O2" \ cmake -B build -G Ninja \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=None cmake --build build } package() { DESTDIR="$pkgdir" cmake --install build mkdir -p "$pkgdir"/usr/lib mv "$pkgdir"/usr/share/musikcube/libmusikcore.so "$pkgdir"/usr/lib/ # just sh wrappers, so use symlinks instead ln -sfv ../share/musikcube/musikcube "$pkgdir"/usr/bin/musikcube ln -sfv ../share/musikcube/musikcubed "$pkgdir"/usr/bin/musikcubed } plugin() { local sub="${subpkgname#"$pkgname"-plugin-}" pkgdesc="$pkgdesc ($sub plugin)" amove usr/share/musikcube/plugins/*$sub*.so } allplugins() { pkgdesc="$pkgdesc (all plugins)" local plugin for plugin in $_plugins; do depends="$depends $pkgname-plugin-$plugin=$pkgver-r$pkgrel" done mkdir -p "$subpkgdir" } sha512sums=" ff18b69bf9a295925ede561c80a66f3fce7c00fdc29906a39e89b520c49467ddaa88cb69406a8bd012eaa851716b6515e93a5a0d0f75f2f24e64ced3fef4b9c7 musikcube-3.0.1.tar.gz cbb0c515a245475221f98b6858152f99c5e0d1d95ee4d79ecfcb616788f907099aed7195fa16180267900e56c136bd9d38caea7b285a2f8720cd7a767cbba279 locale.patch 4f473fae6a4351875930ee5ba537116047e7cd1e16d70822f815b46bacb4e80289afcef9c577b0ef9c966ddc8087819391a2517b630e4ef4a791c120b849b2a7 tinfo.patch 2e8276d36acc2712208375476ca81622ccdd3d91a572919b200b2848c73ebd2e4c032a074ab3d6199ef30fffa46580e30143acbd142a4a0734cfbbf8762c89aa sys.patch "