summaryrefslogtreecommitdiffstats
path: root/testing/daemontools/APKBUILD
blob: bc1e1cab7d474b529b033eff0de40c63b8936768 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=daemontools
pkgver=0.76
pkgrel=1
pkgdesc="Collection of tools for managing UNIX services"
url="http://cr.yp.to/daemontools.html"
arch="all"
license="public-domain"
depends=
# The makefile need GNU cat for 'cat -v'
makedepends="coreutils"

source="http://cr.yp.to/daemontools/$pkgname-$pkgver.tar.gz
	0.76-errno.patch
	0.76-warnings.patch
	svscan.initd
	"

_builddir="$srcdir"/admin/$pkgname-$pkgver/src

prepare() {
	cd "$_builddir"
	for i in "$srcdir"/*.patch; do
	     msg "Applying $i"
	     patch -p1 -i $i || return 1
	done
}

build() {
	cd "$_builddir"
	echo "${CC:-"gcc"} ${CFLAGS}" > conf-cc
        echo "${CC:-"gcc"} ${LDFLAGS}" > conf-ld
	touch > home
	make PATH="/usr/bin:/bin" || return 1
}

package() {
	local f
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/bin "$pkgdir"/service
	for f in $(cat ../package/commands); do
		cp $f "$pkgdir"/usr/bin/$f
	done
	install -Dm755 "$srcdir"/svscan.initd "$pkgdir"/etc/init.d/svscan
}

md5sums="1871af2453d6e464034968a0fbcb2bfc  daemontools-0.76.tar.gz
c75438b1c3b9d9f67691bd10cf3c8e52  0.76-errno.patch
ad68177f50bfffb6a1cbf8c668de6a55  0.76-warnings.patch
c6e4ace205400be062d3ba82315cbcd1  svscan.initd"