summaryrefslogtreecommitdiffstats
path: root/testing/netdot/APKBUILD
blob: 31178e5674622ac965213760d8af95298361f3dd (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
48
49
50
51
52
53
# Contributor: Francesco Colista <francesco.colista@gmail.com>
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=netdot
pkgver=1.0.4
pkgrel=1
pkgdesc="A Network Documentation Tool project"
url="http://netdot.uoregon.edu"
arch="noarch"
license="GPL2+"
depends="perl-dbd-mysql perl-dbd-pg perl-class-dbi perl-class-dbi-abstractsearch 
	perl-html-mason perl-uri perl-dbix-datasource graphviz-dev perl-sql-translator 
	perl-net-snmp perl-netaddr-ip perl-apache-session perl-log-dispatch perl-log-log4perl 
	perl-parallel-forkmanager perl-net-iptrie perl-radiusperl perl-rrd perl-test-simple 
	perl-time-local perl-pathtools perl-net-appliance-session perl-bind-config-parser 
	perl-net-dns  perl-carp-assert perl-net-dns-zonefile-fast perl-socket6 perl-xml-simple 
	perl-net-irr perl-graphviz perl-apache-authcookie 
	perl-libapreq2 perl-net-patricia perl-apache2-sitecontrol"
depends_dev=""
makedepends="$depends_dev"
install=""
subpackages=""
source="http://netdot.uoregon.edu/pub/dists/$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
	# patch to correctly identify alpine packages
	sed -i -e "s/libauthen-radius-perl/perl-radiusperl/" bin/perldeps.pl
	sed -i -e "s/perl-Authen-Radius/perl-radiusperl/" bin/perldeps.pl
	sed -i -e '22 i\print \"usage: ./initdb initdb dropdb generate oui\\n\";\' bin/initdb 
}

build() {
	cd "$_builddir"
	make testdeps
}

package() {
	cd "$_builddir"
	make -j1 install PREFIX="$pkgdir/usr/share/webapps/netdot" REPLACE_PREFIX="/usr/share/webapps/netdot" || return 1
	install -Dm755 "$_builddir/bin/initdb" "$pkgdir"/usr/share/webapps/netdot/bin/initdb
	install -Dm755 "$_builddir/etc/default_data" "$pkgdir"/usr/share/webapps/netdot/etc/default_data
}

md5sums="a4e719498b17452c5c3da8616ac9ef66  netdot-1.0.4.tar.gz"
sha256sums="e474005f90514e452b25cb886e2d6a16b488e008fa67e05ade70e45e24490908  netdot-1.0.4.tar.gz"
sha512sums="8d1a7baffea119bbf2d5a44884c4f06bc147044e823ef0140aae952552c1c302359427c534f5518b30db298f98f898f9182389a246ec030d0240bb931dd79ab1  netdot-1.0.4.tar.gz"