summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/rancid/APKBUILD46
-rw-r--r--testing/rancid/rancid.pre-install4
2 files changed, 50 insertions, 0 deletions
diff --git a/testing/rancid/APKBUILD b/testing/rancid/APKBUILD
new file mode 100644
index 000000000..cb11b32e8
--- /dev/null
+++ b/testing/rancid/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=rancid
+pkgver=2.3.8
+pkgrel=0
+pkgdesc="Really Awesome New Cisco confIg Differ"
+url="http://www.shrubbery.net/rancid/"
+arch="all"
+license="CUSTOM"
+depends="expect subversion"
+depends_dev="automake autoconf libtool"
+makedepends="$depends_dev"
+install="$pkgname.pre-install"
+subpackages="$pkgname-doc"
+source="ftp://ftp.shrubbery.net/pub/$pkgname/$pkgname-$pkgver.tar.gz"
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/home/rancid \
+ --sysconfdir=/etc/rancid \
+ --localstatedir=/var/rancid \
+ --with-svn=fsfs
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir"/etc/rancid
+ mkdir -p "$pkgdir"/var/rancid 2>/dev/null
+ chown -R rancid:netadm "$pkgdir"/var/rancid 2>/dev/null
+ chown -R rancid:netadm "$pkgdir"/home/rancid 2>/dev/null
+ make DESTDIR="$pkgdir" install || return 1
+ install -m640 -D "$_builddir"/cloginrc.sample "$pkgdir"/home/rancid/.cloginrc
+ install -m644 -D "$_builddir"/COPYING "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+md5sums="8cdfdfd8ab989e924dae2560d81457a0 rancid-2.3.8.tar.gz"
diff --git a/testing/rancid/rancid.pre-install b/testing/rancid/rancid.pre-install
new file mode 100644
index 000000000..9c90858b5
--- /dev/null
+++ b/testing/rancid/rancid.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+addgroup netadm 2>/dev/null
+adduser -h /home/rancid -s /bin/sh -G netadm -D rancid 2>/dev/null || true
+exit 0