summaryrefslogtreecommitdiffstats
path: root/main/util-vserver/APKBUILD
blob: e14a380d6e899c423e20bbaf0e7492f7c54b3d45 (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
66
67
68
69
70
71
72
73
74
75
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=util-vserver
pkgver=0.30.216_pre3038
_realver=${pkgver/_/-}
pkgrel=0
pkgdesc="Linux-VServer admin utilities"
url="http://www.nongnu.org/util-vserver/"
arch="all"
license="GPL"
install="$pkgname.post-install $pkgname.post-upgrade"
makedepends="iptables-dev e2fsprogs-dev beecrypt-dev autoconf automake
	pkgconfig libtool"
depends="bash make"

source="http://people.linux-vserver.org/~dhozac/t/uv-testing/util-vserver-$_realver.tar.bz2
	alpine.patch
	setup-vs-template
	setup-vs-guest
	"
subpackages="$pkgname-doc $pkgname-dev"

_builddir="$srcdir"/$pkgname-$_realver

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

build() {
	local i
	cd "$_builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--sysconfdir=/etc \
		--with-initscripts=gentoo \
		--localstatedir=/var \
		|| return 1

	# use busybox ionice rather than util-linux
	sed -i -e 's:/usr/bin/ionice:/bin/ionice:' Makefile
	make || return 1
}

package() {
	cd "$_builddir"
	make -j1 DESTDIR="$pkgdir/" install install-distribution || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1

	# obsolete and broken
	rm -f "$pkgdir"/usr/sbin/vserver-copy

	install -Dm755 ../setup-vs-template "$pkgdir"/usr/sbin/setup-vs-template
	install -Dm755 ../setup-vs-guest "$pkgdir"/usr/sbin/setup-vs-guest
}

md5sums="21ae909b16d57fdb169743cde35e896d  util-vserver-0.30.216-pre3038.tar.bz2
dd0a433de812dd167e7dbb36c215491e  alpine.patch
fae6626b724dec90a19924d68d355cd2  setup-vs-template
01d1490f82fe926894978c02ef707b3f  setup-vs-guest"
sha256sums="06f7b2390578767e5c27237538eda3803134041c307da2c8409d5a6d49800525  util-vserver-0.30.216-pre3038.tar.bz2
6e51bce42e2f5eddbfc6a939a7672a050044ae80031cd91b1ac87d5e40a0fd76  alpine.patch
193ed2e0e46191f48e25cb450dbb127066812eb08ac9a007e357b0b5f71357e5  setup-vs-template
ae46acd640cbc0f9fcdb654af68d42540aaa9edead76d38d1b1cb986c820265c  setup-vs-guest"
sha512sums="cf00f8482831e6b682faee309b72a899b16177b4783253596a83986828e38a5fb4b88e152e060ecec21e208c42058d56e88eaba3e7cdf5ceb40dc5f5c8f7711d  util-vserver-0.30.216-pre3038.tar.bz2
98c8d64fe2a03a801881e4f65cc80972030a42995db4be0fdebfaa2fb54b33abd302514bd8d25048ec1a1f1cf85060427a0e60791db9bd877e5d5ab529932d34  alpine.patch
195b4f99efb50ad6fe597e37e4de75eecc04d3713c8fd78d232fba46b43f759b2d21762ecf5a9f81aed137b9008d01057bfbb2ac74f6ca4aa73e25991939de1e  setup-vs-template
47a6527d38a7306ba40bc214332ebabf74995c30f5ec85385d3f6cd9c13b30eeaf616e3449dc4a9c6418385c731174844961b661d63db0dbf00d6c610a91f906  setup-vs-guest"