summaryrefslogtreecommitdiff
path: root/community/ucarp/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ucarp/PKGBUILD')
-rw-r--r--community/ucarp/PKGBUILD50
1 files changed, 50 insertions, 0 deletions
diff --git a/community/ucarp/PKGBUILD b/community/ucarp/PKGBUILD
new file mode 100644
index 000000000..fa1879371
--- /dev/null
+++ b/community/ucarp/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id$
+# Maintainer: Sebastien Luttringer <seblu+arch@seblu.net>
+
+pkgname=ucarp
+pkgver=1.5.2
+pkgrel=1
+pkgdesc='UCARP is a portable implementation of the CARP protocol'
+arch=('i686' 'x86_64')
+url='http://www.ucarp.org/project/ucarp'
+license=('GPL2')
+depends=('libpcap')
+optdepends=('iproute2')
+source=("http://download.pureftpd.org/pub/ucarp/ucarp-$pkgver.tar.gz"
+ 'ucarp.rc'
+ 'ucarp.conf'
+ '01-fix-getopt.patch'
+ '02-fix-downscript-on-error.c')
+md5sums=('e3caa733316a32c09e5d3817617e9145'
+ 'd941d2978c5b43154a29212115729519'
+ '35d1aabe416384e6fd8bd62312dbdb25'
+ '3f20699aaf2ef8139dcd337f1e7f06ab'
+ '09d26233c37956cf08e629554a91b8cd')
+
+build() {
+ cd $pkgname-$pkgver
+ patch -N -p1 -i ../01-fix-getopt.patch
+ patch -N -p1 -i ../02-fix-downscript-on-error.c
+
+ ./configure --prefix=/usr --mandir=/usr/share/man
+ make
+
+ # fix iproute2 path
+ sed -i "s|/sbin|/usr/sbin|g" examples/linux/vip-down.sh
+ sed -i "s|/sbin|/usr/sbin|g" examples/linux/vip-up.sh
+}
+
+package() {
+ # add initscripts
+ install -D -m 755 $pkgname.rc "${pkgdir}/etc/rc.d/$pkgname"
+ install -D -m 644 $pkgname.conf "${pkgdir}/etc/conf.d/$pkgname"
+
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ install -D -m 755 examples/linux/vip-down.sh "$pkgdir/etc/ucarp/vip-down.sh"
+ install -D -m 755 examples/linux/vip-up.sh "$pkgdir/etc/ucarp/vip-up.sh"
+
+}
+
+# vim:set ts=2 sw=2 ft=sh et: