From 7355868966657a48aae3266d9d23ebccd87f638f Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Mon, 28 Dec 2009 13:20:29 +0000 Subject: testing/ucarp: moved to main --- main/ucarp/APKBUILD | 36 +++++++++++++++++++++++++++++ main/ucarp/ucarp.confd | 13 +++++++++++ main/ucarp/ucarp.initd | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 main/ucarp/APKBUILD create mode 100644 main/ucarp/ucarp.confd create mode 100755 main/ucarp/ucarp.initd (limited to 'main') diff --git a/main/ucarp/APKBUILD b/main/ucarp/APKBUILD new file mode 100644 index 0000000000..0d1ab5cf3a --- /dev/null +++ b/main/ucarp/APKBUILD @@ -0,0 +1,36 @@ +# Contributor: Leonardo Arena +# Maintainer: +pkgname=ucarp +pkgver=1.5.1 +pkgrel=1 +pkgdesc="Share common IP and do fail over" +url="http://www.ucarp.org" +license="GPL" +depends="uclibc libpcap" +makedepends="libpcap-dev" +install= +subpackages="" +source="http://download.pureftpd.org/pub/ucarp/$pkgname-$pkgver.tar.gz + ucarp.initd + ucarp.confd" + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info + make || return 1 +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install || 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="391caa69fc17ffbc8a3543d8692021c9 ucarp-1.5.1.tar.gz +44df7855b8733cb4dcea2e830a738c72 ucarp.initd +bf914f6ce4fe4fea33a45d4d5b2c1fff ucarp.confd" diff --git a/main/ucarp/ucarp.confd b/main/ucarp/ucarp.confd new file mode 100644 index 0000000000..824358b430 --- /dev/null +++ b/main/ucarp/ucarp.confd @@ -0,0 +1,13 @@ +# Things you can set here +# REALIP - if not set, will be first addr on iface +# VHID - Virtual Server ID +# VIP - The Virtual IP +# PASSWORD - The password for the carp announcements +# EXTRA_ARGS - extra arguments + +REALIP= +VHID=2 +VIP=127.0.0.1 +PASSWORD=SecretPassword +#EXTRA_ARGS="--neutral --advbase=3" + diff --git a/main/ucarp/ucarp.initd b/main/ucarp/ucarp.initd new file mode 100755 index 0000000000..ff101fce47 --- /dev/null +++ b/main/ucarp/ucarp.initd @@ -0,0 +1,62 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + + +# A simple script to start and stop a ucarp instance +DAEMON=/usr/sbin/ucarp + +IFACE="${SVCNAME#*.}" +if [ -n "$IFACE" ] && [ "${SVCNAME}" != "ucarp" ]; then + UP="/etc/ucarp/vip-up-$IFACE.sh" + DOWN="/etc/ucarp/vip-down-$IFACE.sh" + . /etc/conf.d/ucarp.$IFACE +else + UP="/etc/ucarp/vip-up.sh" + DOWN="/etc/ucarp/vip-down.sh" +fi + + +# Get the primary ip address for a given interface +get_first_ip() { + local foo=$( ip addr show $1 ) + [ $? != 0 ] && foo="" + echo $( echo "$foo" | grep "inet " | head -n1 | \ + sed "s+^.*inet ++g; s+/.*$++g" ) +} + +if [ -z "$REALIP" ]; then + REALIP=$( get_first_ip $IFACE ) +fi + +start () { + ebegin "Starting ucarp $IFACE" + start-stop-daemon --start --exec $DAEMON \ + --background -m -p /var/run/ucarp-$IFACE.pid -- \ + -i $IFACE -s $REALIP -v $VHID -p $PASSWORD -a $VIP \ + -u $UP -d $DOWN $EXTRA_ARGS -z + eend $? +} + +status () { + ebegin "ucarp $IFACE is ..." + PIDS=$( pidof $( basename $DAEMON )) + PID=$( cat /var/run/ucarp-$IFACE.pid 2>/dev/null ) + [ -n "$PID" ] && OK=$( echo "$PIDS" | grep "$PID" ) + if [ -n "$OK" ]; then + echo "running" + exit 0 + else + echo "not running" + exit 1 + fi +} + +stop () { + ebegin "Shutting down ucarp $IFACE" + start-stop-daemon --stop --exec $DAEMON \ + -p /var/run/ucarp-$IFACE.pid + eend $? +} + -- cgit v1.2.3 From 9e3eb7c584bd90c9d6da24d9302673fb8b3e0741 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 30 Dec 2009 10:17:33 +0000 Subject: main/abuild: upgrade to 2.1 --- main/abuild/APKBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD index 20fddaf6b2..ed4d017cf4 100644 --- a/main/abuild/APKBUILD +++ b/main/abuild/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa pkgdesc="Script to build Alpine Packages" pkgname=abuild -pkgver=2.0.1 +pkgver=2.1 pkgrel=0 url=http://git.alpinelinux.org/cgit/abuild/ source="http://git.alpinelinux.org/cgit/abuild/snapshot/abuild-$pkgver.tar.bz2 @@ -18,4 +18,4 @@ build() { install -m 644 abuild.conf "$pkgdir"/etc/abuild.conf } -md5sums="50d4d0552b4ab2a394422b7ff3016124 abuild-2.0.1.tar.bz2" +md5sums="2268fa6147c8088139ef136184cd2ae0 abuild-2.1.tar.bz2" -- cgit v1.2.3 From 5a870abb1f2b075a701c5b4c62812cc2ee8146ea Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 30 Dec 2009 12:22:07 +0000 Subject: main/ucarp: build fix dont break build when gettext is installed --- main/ucarp/APKBUILD | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/ucarp/APKBUILD b/main/ucarp/APKBUILD index 0d1ab5cf3a..0dc4f3d567 100644 --- a/main/ucarp/APKBUILD +++ b/main/ucarp/APKBUILD @@ -6,7 +6,7 @@ pkgrel=1 pkgdesc="Share common IP and do fail over" url="http://www.ucarp.org" license="GPL" -depends="uclibc libpcap" +depends= makedepends="libpcap-dev" install= subpackages="" @@ -20,7 +20,8 @@ build() { ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --infodir=/usr/share/info + --infodir=/usr/share/info \ + --disable-nls make || return 1 } -- cgit v1.2.3