aboutsummaryrefslogtreecommitdiffstats
path: root/community/gerbera/APKBUILD
blob: 61b3c80a17c7dbccdffad2bab42323b5c56e813a (plain) (blame)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# Contributor: Mike Crute <mike@crute.us>
# Maintainer: Mike Crute <mike@crute.us>
pkgname=gerbera
pkgver=1.6.4
pkgrel=2
pkgdesc="A UPnP Media Server"
url="https://gerbera.io"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	cmake
	curl-dev
	duktape-dev
	e2fsprogs-dev
	exiv2-dev
	ffmpeg-dev
	ffmpegthumbnailer-dev
	file-dev
	fmt-dev
	gnu-libiconv-dev
	inotify-tools-dev
	libexif-dev
	libmatroska-dev
	libnpupnp-dev
	pugixml-dev
	spdlog-dev
	sqlite-dev
	taglib-dev
	zlib-dev
	"
checkdepends="
	gtest-dev
	gmock
	"
install="$pkgname.pre-install"
subpackages="$pkgname-doc $pkgname-openrc"
pkgusers="$pkgname"
pkggroups="$pkgname"
#
# Patches
#
# disable-git-test.patch:
#	Patch removes check for git info in server version output. This assumes
#	that the binary was built within a git repo which is not the case for
#	releases. This test will never work for us.
#
source="gerbera-$pkgver.tar.gz::https://github.com/gerbera/gerbera/archive/v$pkgver.tar.gz
	disable-git-test.patch
	$pkgname.initd
	$pkgname.confd"

build() {
	cmake -B build \
		-Wno-dev \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DWITH_NPUPNP=1 \
		-DWITH_MAGIC=1 \
		-DWITH_MYSQL=0 \
		-DWITH_CURL=1 \
		-DWITH_INOTIFY=1 \
		-DWITH_JS=1 \
		-DWITH_TAGLIB=1 \
		-DWITH_AVCODEC=1 \
		-DWITH_FFMPEGTHUMBNAILER=1 \
		-DWITH_EXIF=1 \
		-DWITH_EXIV2=1 \
		-DWITH_MATROSKA=1 \
		-DWITH_SYSTEMD=0 \
		-DWITH_LASMFM=0 \
		-DWITH_DEBUG=0 \
		-DWITH_TESTS=1

	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install

	"$builddir/build"/gerbera --create-config > config.xml
	sed -i 's#<home>.*#<home>/var/lib/gerbera</home>#' config.xml

	install -dm750 -o $pkgusers -g $pkggroups \
		"$pkgdir/var/lib/$pkgname" \
		"$pkgdir/var/log/$pkgname" \
		"$pkgdir/etc/$pkgname"
	install -m755 -D "$srcdir/$pkgname.initd" \
		"$pkgdir/etc/init.d/$pkgname"
	install -m644 -D "$srcdir/$pkgname.confd" \
		"$pkgdir/etc/conf.d/$pkgname"
	install -m644 -D "config.xml" \
		"$pkgdir/etc/$pkgname/config.xml"
}

sha512sums="82bf58e22b58039cb1f7eb78b6f519507dc3d8eead4aaeb27764c5ed7926c7d069b854fc9050ef69d1d3982bd06f5a4620eedac9a35c91947e8acfa2b2508b30  gerbera-1.6.4.tar.gz
5f084b107a534e8d8debda6fbc494ed7ab5d38e6de3d85867f2c316bd3f7d56daf3755de2647be84ae514905f998dad83ac88736a6ca59a30560c3d7a98dffcb  disable-git-test.patch
b8609b8ec46d8e61087b76ea9be34639786014f6545a2eb8dae977e56dcc3841715c0691417382d93d96eefd4c5a629e46cd9605c893445a66ac2815ec141c2b  gerbera.initd
392d7e964b0328778847f871e88ffd475ddac99b6cf8c8ded4825eb2f970e084db692552790a1b30ff96f59eabcd9fff50164d9dedf328badab95a1cec833c02  gerbera.confd"