69 lines
2.1 KiB
Bash
69 lines
2.1 KiB
Bash
# Template file for 'snapcast'
|
|
pkgname=snapcast
|
|
version=0.28.0
|
|
revision=1
|
|
_snapweb_version=0.7.0
|
|
build_style=cmake
|
|
configure_args="-DCMAKE_INSTALL_SYSCONFDIR=/etc -DBUILD_WITH_TREMOR=OFF
|
|
-DBUILD_WITH_AVAHI=$(vopt_if avahi ON OFF)
|
|
-DBUILD_WITH_PULSE=$(vopt_if pulseaudio ON OFF)"
|
|
hostmakedepends="pkg-config"
|
|
makedepends="alsa-lib-devel boost-devel expat-devel libflac-devel libsoxr-devel
|
|
libvorbis-devel opus-devel $(vopt_if avahi avahi-libs-devel)
|
|
$(vopt_if pulseaudio pulseaudio-devel)"
|
|
short_desc="Synchronous multi-room audio player"
|
|
maintainer="amak <amak.git@outlook.com>"
|
|
license="GPL-3.0-or-later"
|
|
homepage="https://github.com/badaix/snapcast"
|
|
changelog="https://raw.githubusercontent.com/badaix/snapcast/master/changelog.md"
|
|
distfiles="https://github.com/badaix/snapcast/archive/v${version}.tar.gz
|
|
https://github.com/badaix/snapweb/releases/download/v${_snapweb_version}/snapweb.zip>snapweb-${_snapweb_version}.zip"
|
|
checksum="7911037dd4b06fe98166db1d49a7cd83ccf131210d5aaad47507bfa0cfc31407
|
|
2acfc3538e4f4daefb0a2eac9126925f5a455dfd68b14ba5500fac5f1f82cb8f"
|
|
skip_extraction="snapweb-${_snapweb_version}.zip"
|
|
|
|
build_options="avahi pulseaudio"
|
|
build_options_default="avahi pulseaudio"
|
|
|
|
post_extract() {
|
|
vsrcextract -C server/etc/snapweb --strip-components=0 snapweb-${_snapweb_version}.zip
|
|
}
|
|
|
|
post_install() {
|
|
vdoc README.md
|
|
vdoc doc/player_setup.md
|
|
}
|
|
|
|
snapclient_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - Snapcast client files"
|
|
|
|
system_accounts="_snapclient"
|
|
_snapclient_homedir="/var/lib/snapclient"
|
|
make_dirs="/var/lib/snapclient 0750 _snapclient _snapclient"
|
|
|
|
pkg_install() {
|
|
vmove usr/bin/snapclient
|
|
vmove usr/share/man/man1/snapclient.1
|
|
vsv snapclient
|
|
}
|
|
}
|
|
|
|
snapserver_package() {
|
|
depends="${sourcepkg}>=${version}_${revision}"
|
|
short_desc+=" - Snapcast server files"
|
|
|
|
system_accounts="_snapserver"
|
|
_snapserver_homedir="/var/lib/snapserver"
|
|
make_dirs="/var/lib/snapserver 0750 _snapserver _snapserver"
|
|
conf_files="/etc/snapserver.conf"
|
|
|
|
pkg_install() {
|
|
vmove usr/bin/snapserver
|
|
vmove usr/share/man/man1/snapserver.1
|
|
vmove usr/share/snapserver/snapweb
|
|
vmove etc/snapserver.conf
|
|
vsv snapserver
|
|
}
|
|
}
|