summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 871062fd3b3706f27ca77a1c5a146705cb06a9b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer: Bart De Vries <devriesb@gmail.com>

pkgname=snapcast
pkgver=0.10.0
pkgrel=1
pkgdesc="Synchronous multi-room audio player"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://github.com/badaix/snapcast"
license=('GPL')
groups=()
depends=(alsa-lib avahi libvorbis flac)
makedepends=(git alsa-utils)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=('etc/default/snapserver' 'etc/default/snapclient')
options=()
install=
changelog=
source=("git+https://github.com/badaix/${pkgname}.git#tag=v${pkgver//_/-}"
        "${pkgname}-systemd.patch")
noextract=()
validpgpkeys=()
md5sums=('SKIP'
         '409bb645138a52462aa8800a3f1b620b')

prepare() {
        cd "$pkgname"
        patch -p1 -i "$srcdir/$pkgname-systemd.patch"
        cd externals
        # submodule update barfs on vorbis which is in 0.10.0, but unused!
        # switch back to line below on next version!
        #git submodule update --init --recursive
        git submodule update asio
        git submodule update flac
        git submodule update ogg
        git submodule update popl
        git submodule update tremor
}

build() {
	cd "$pkgname"
	make
}

package() {
	cd "$pkgname"
	install -Dm755 -g root -o root server/snapserver ${pkgdir}/usr/bin/snapserver
	install -Dm644 -g root -o root server/snapserver.1 ${pkgdir}/usr/share/man/man1/snapserver.1

	install -Dm755 -g root -o root client/snapclient ${pkgdir}/usr/bin/snapclient
	install -Dm644 -g root -o root client/snapclient.1 ${pkgdir}/usr/share/man/man1/snapclient.1

	install -Dm644 -g root -o root server/debian/snapserver.service ${pkgdir}/usr/lib/systemd/system/snapserver.service
	install -Dm644 -g root -o root server/debian/snapserver.default ${pkgdir}/etc/default/snapserver
	install -Dm644 -g root -o root client/debian/snapclient.service ${pkgdir}/usr/lib/systemd/system/snapclient.service
	install -Dm644 -g root -o root client/debian/snapclient.default ${pkgdir}/etc/default/snapclient
}