summaryrefslogtreecommitdiffstats
path: root/testing/minidlna/APKBUILD
blob: 2479c8cf0b82ffc30999b8acf00d7bf83e61610a (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
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=minidlna
pkgver=1.0.25
pkgrel=1
pkgdesc="A small dlna server"
url="http://sourceforge.net/projects/minidlna/"
arch="all"
license="GPL"
depends=
depends_dev="libvorbis-dev libogg-dev libid3tag-dev libexif-dev jpeg-dev
	sqlite-dev ffmpeg-dev flac-dev"
makedepends="$depends_dev"
install="minidlna.pre-install"
subpackages=""
source="http://downloads.sourceforge.net/minidlna/${pkgname}_${pkgver}_src.tar.gz
	ffmpeg.patch
	makefile.patch
	$pkgname.initd
	$pkgname.confd"

_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
	# fix for busybox install
	sed -i 's/--mode=0644/-m0644/g' Makefile || return 1
}

build() {
	cd "$_builddir"
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install install-conf || return 1
	install -m755 -D "$srcdir/$pkgname.initd" "$pkgdir/etc/init.d/$pkgname"
	install -m644 -D "$srcdir/$pkgname.confd" "$pkgdir/etc/conf.d/$pkgname"
}

md5sums="d966256baf2f9b068b9de871ab5dade5  minidlna_1.0.25_src.tar.gz
a7f73ca82e3ad1e5c4dae9900680bbbd  ffmpeg.patch
0eae51746bf6d0e85906bf2507200d10  makefile.patch
dd648eaeb559a6608523dc19cd849f54  minidlna.initd
59d14c1bf3cd637138bfa58db7255d78  minidlna.confd"