aboutsummaryrefslogtreecommitdiffstats
path: root/testing/rancid/APKBUILD
blob: 22f60753fb3b13b80553079757d7de3740680bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# 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 || return 1
	make
}

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"