aboutsummaryrefslogtreecommitdiffstats
path: root/community/minidlna/APKBUILD
blob: b58049af3531ed27c355619c89681f3f07b66910 (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
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=minidlna
pkgver=1.2.1
pkgrel=2
pkgdesc="A small dlna server"
url="https://sourceforge.net/projects/minidlna/"
arch="all"
license="GPL"
makedepends="
	bsd-compat-headers
	libvorbis-dev
	libogg-dev
	libid3tag-dev
	libexif-dev
	libjpeg-turbo-dev
	sqlite-dev
	ffmpeg-dev
	flac-dev
	"
install="minidlna.pre-install minidlna.post-upgrade"
subpackages="$pkgname-doc"
pkgusers="$pkgname"
pkggroups="$pkgname"
source="https://downloads.sourceforge.net/project/minidlna/minidlna/$pkgver/minidlna-$pkgver.tar.gz
	$pkgname.initd
	$pkgname.confd
	10-minidlna-nfo.patch
	CVE-2020-28926.patch
	CVE-2020-12695.patch
	"

builddir="$srcdir/$pkgname-$pkgver"

# secfixes:
#   1.2.1-r2:
#     - CVE-2020-28926
#     - CVE-2020-12695

build() {
	cd "$builddir"
	CFLAGS="$CFLAGS -fcommon" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-os-name="Alpine Linux" \
		--with-db-path=/var/lib/minidlna \
		--with-log-path=/var/log/minidlna
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -dm750 -o $pkgusers -g $pkggroups \
		"$pkgdir/var/lib/$pkgname" \
		"$pkgdir/var/log/$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 "$pkgname.conf" \
		"$pkgdir"/etc/$pkgname.conf
	install -Dm644 "$srcdir"/$pkgname-$pkgver/minidlna.conf.5 \
		"$pkgdir"/usr/share/man/man5/minidlna.conf.5
	install -Dm644 "$srcdir"/$pkgname-$pkgver/minidlnad.8 \
		"$pkgdir"/usr/share/man/man8/minidlnad.8
}

sha512sums="17827155bfbfd2b51939bc86080e8724dcded138af8fede9c7715c225524e86d3c21bfd8d40dbf201861ef154189d9c5e223b719bf7695251212b26ec290462b  minidlna-1.2.1.tar.gz
e16961bb68c004297f1e26422b1d15bd8583ba2e0e36c88902a45573b685993fff88d2d0dae8c624eaeddb0deca614dbc13b8345f34b4c348961c00b05c0df30  minidlna.initd
e209848af0d79069ac989ad61d3be610b4c0c2783a207a50463a25ec3811b04d1da3a2acde54749878bec44e1567874ede827b978d5472c00f6a855663e5cbf8  minidlna.confd
59a97ef0a36d3ae44dd2e182a0b106f84ce5c17e7dc14ee0459b17430b57ddc59a74e8e67fc0a90326fa451a505b97a0b719b438475efac144028dd012b44af1  10-minidlna-nfo.patch
883d06ba860264502b29bbdbbf469b145a97f59e6fc11d46fc199955696202b66f7ba1dc0708ef65cc3987ff5942024216b5274cbbf136558581e6a0cdac2750  CVE-2020-28926.patch
a8a5428c83ed8b2abe2c340ebc9d558417c4e8980f36d9dd19ff437025f9ec056caf58e606275fa3d74c4fc81342e7fec313353d50d70d1d787db2abc808542b  CVE-2020-12695.patch"