aboutsummaryrefslogtreecommitdiffstats
path: root/main/util-vserver/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/util-vserver/APKBUILD')
-rw-r--r--main/util-vserver/APKBUILD79
1 files changed, 79 insertions, 0 deletions
diff --git a/main/util-vserver/APKBUILD b/main/util-vserver/APKBUILD
new file mode 100644
index 0000000000..9fd6e1b397
--- /dev/null
+++ b/main/util-vserver/APKBUILD
@@ -0,0 +1,79 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=util-vserver
+pkgver=0.30.216_pre2981
+_realver=${pkgver%_*}-${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
+ chmod.patch
+ ensc_pathprog.patch
+ validate.patch
+ alpine.patch
+ bb-grep.patch
+ setup-vs-template
+ setup-vs-guest
+ "
+subpackages="$pkgname-doc $pkgname-dev"
+
+_builddir="$srcdir"/$pkgname-$_realver
+
+prepare() {
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+ msg "Running autotools..."
+ aclocal -I m4 && autoconf && automake && libtoolize || return 1
+
+ # this is an ugly workaround
+ sed -i -e "s:as_echo=.*:as_echo=echo:g" configure
+
+ # issue 305
+ sed -i -e 's/^function //' gentoo/util-vserver
+}
+
+build() {
+ local i
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --sysconfdir=/etc \
+ --with-initscripts=gentoo \
+ --localstatedir=/var \
+ || return 1
+
+ # use busybox ionice rather than util-linux-ng
+ 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="b9064c39a5ee4bfd5f98c419f3e7edfb util-vserver-0.30.216-pre2981.tar.bz2
+73c7437dea6937a57cf38d166ef83c09 chmod.patch
+ff8f561f672524eb46fe633f584ef60e ensc_pathprog.patch
+da8b70c4fd40e68894b3903ffd121397 validate.patch
+04000261fd990a3963b0e98260b481bd alpine.patch
+3fc52e20d998f02995f21912738f5d36 bb-grep.patch
+49bca7969cc284adf68e0ef284c0660e setup-vs-template
+03e109447c2d500dfb27a3046170b92f setup-vs-guest"