diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2016-08-29 04:17:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2016-08-29 04:22:48 +0000 |
commit | 282710de7d09bec8633510f6776b801475ec7757 (patch) | |
tree | 8d7b2dd538c69043ae793c9ed406f9b55923e9bc /testing/ipvsadm | |
parent | 3662ca6f176a9e180234b16ff380eab62bb0649e (diff) | |
download | aports-282710de7d09bec8633510f6776b801475ec7757.tar.bz2 aports-282710de7d09bec8633510f6776b801475ec7757.tar.xz |
testing/ipvsadm: upgrade to 1.28
Diffstat (limited to 'testing/ipvsadm')
-rw-r--r-- | testing/ipvsadm/APKBUILD | 47 | ||||
-rw-r--r-- | testing/ipvsadm/ipvsadm.initd | 42 |
2 files changed, 89 insertions, 0 deletions
diff --git a/testing/ipvsadm/APKBUILD b/testing/ipvsadm/APKBUILD new file mode 100644 index 0000000000..dbd047ed74 --- /dev/null +++ b/testing/ipvsadm/APKBUILD @@ -0,0 +1,47 @@ +# Contributor: Leonardo Arena <rnalrd@gmail.com> +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=ipvsadm +pkgver=1.28 +pkgrel=0 +pkgdesc="The IP Virtual Server administration utility" +url="http://www.linuxvirtualserver.org/software/ipvs.html" +arch="all" +license="GPL2" +depends= +depends_dev="libnl-dev popt-dev" +makedepends="$depends_dev linux-headers" +install= +subpackages="$pkgname-doc" +source="https://kernel.org/pub/linux/utils/kernel/ipvsadm/$pkgname-$pkgver.tar.xz + $pkgname.initd" + +builddir="$srcdir"/$pkgname-$pkgver + +build() { + cd "$builddir" + make libs && make BUILD_ROOT="$pkgdir" \ + MANDIR=usr/share/man \ + SBIN="$pkgdir/usr/sbin" \ + INIT="$pkgdir/etc/init.d" \ + || return 1 +} + +package() { + cd "$builddir" + make -j1 BUILD_ROOT="$pkgdir" \ + MANDIR=usr/share/man \ + SBIN="$pkgdir/usr/sbin" \ + INIT="$pkgdir/etc/init.d" \ + install + + # remove the 2 lines below (and this) if there is no init.d script + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +md5sums="b2c8fa302d5a9e9ebd4f60dd34aecd83 ipvsadm-1.28.tar.xz +bebb015ea02ead2a84be2bd5af4eb74c ipvsadm.initd" +sha256sums="90e0e49cad5acb9db1c04ed4cdadf7933152a472c2f694039b9d7a291c37f3ab ipvsadm-1.28.tar.xz +d18d70c39d5dff6325b7e21fbd61485384b642b15a0dfee935ec9b7d4b9f0b66 ipvsadm.initd" +sha512sums="a1e10ce30751d9439f832e221e5c41b338f87dcc94a0b21329d908a9164f8882049af9d9d918b764b36c30e353d5b8db49d7088e60c24e4748713c06cccf7035 ipvsadm-1.28.tar.xz +43b2186f48f17d43524c1f4e9de06227c6d491845c466cf6f00214b74fcd5e181e8b855fef8c6fa78c62a924ee3cc3317099278f9656183de8678440bb070625 ipvsadm.initd" diff --git a/testing/ipvsadm/ipvsadm.initd b/testing/ipvsadm/ipvsadm.initd new file mode 100644 index 0000000000..17a4bfac5e --- /dev/null +++ b/testing/ipvsadm/ipvsadm.initd @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/files/ipvsadm-init,v 1.5 2011/12/04 10:40:20 swegener Exp $ + +extra_commands="save" + +depend() { + need net +} + +checkconfig() { + + checkpath --directory /var/lib/ipvsadm + + if [ ! -f /var/lib/ipvsadm/rules-save ] ; then + eerror "Not starting ipvsadm. First create some rules then run" + eerror "/etc/init.d/ipvsadm save" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ipvsadm" + einfo "Clearing previous rules" + ipvsadm -C + ipvsadm-restore < /var/lib/ipvsadm/rules-save + eend $? +} + +stop() { + ebegin "Stopping ipvsadm" + eend $? +} + +save() { + ebegin "Saving ipvsadm state" + ipvsadm-save > /var/lib/ipvsadm/rules-save + eend $? +} + |