aboutsummaryrefslogtreecommitdiffstats
path: root/testing/forked-daapd/APKBUILD
blob: 1e2530383c77f4bd98dc0393bea3c0fadba38799 (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
62
63
64
65
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=forked-daapd
pkgver=22.3
pkgrel=0
pkgdesc="an updated version of the original forked-daapd"
url="https://github.com/ejurgensen/forked-daapd"
arch="all"
license="custom"
depends=""
depends_dev="libgcrypt-dev ffmpeg-dev flac-dev avahi-dev gettext-dev alsa-lib-dev
	sqlite-dev libantlr3c-dev libunistring-dev confuse-dev ffmpeg-dev
	mxml-dev libevent-dev libogg-dev taglib-dev libavl-dev libplist-dev"
makedepends="$depends_dev autoconf automake libtool openjdk7-jre-base gperf bash bsd-compat-headers"
install=""
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ejurgensen/forked-daapd/archive/$pkgver.tar.gz
	http://www.antlr3.org/download/antlr-3.4-complete.jar"

_builddir="$srcdir/$pkgname-$pkgver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	OLD_PATH=$PATH
	export PATH="$srcdir:$PATH"
	echo "#!/bin/bash" > $srcdir/antlr3
	echo "exec java -cp $srcdir/antlr-3.4-complete.jar org.antlr.Tool \"\$@\"" >> $srcdir/antlr3
	chmod a+x $srcdir/antlr3
	autoreconf -i -v || return 1
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--enable-flac \
		--enable-musepack \
		--enable-itunes \
		|| return 1
	make || return 1
	export PATH=$OLD_PATH
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

md5sums="f1862aa6e42dd3a432925cff5de5caed  forked-daapd-22.3.tar.gz
1b91dea1c7d480b3223f7c8a9aa0e172  antlr-3.4-complete.jar"
sha256sums="0aaa5995d1bd10343890634bb0e3176b781175125a98f77d7f182402c8133c91  forked-daapd-22.3.tar.gz
9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7  antlr-3.4-complete.jar"
sha512sums="b109b057c3b79054d52a9ab2d5aad4bc00dc828bba61e70bc405f526bf75fb6b3c5f4aca0981b332495aa9ef97731f84f440470edb9f21123e0e500091abc7a8  forked-daapd-22.3.tar.gz
04be4dfba3a21f3ab9d9e439a64958bd8e844a9f151b798383bd9e0dd6ebc416783ae7cb1d1dbb27fb7288ab9756b13b8338cdb8ceb41a10949c852ad45ab1f2  antlr-3.4-complete.jar"