aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Oliveira <robertoguimaraes8@gmail.com>2017-11-07 10:20:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-07 13:54:53 +0000
commitb6abc6d02e35fd54b9db18d863d34f32977db1b7 (patch)
tree471a5e00a65ae5592df5ef0093b15d7bd1e19de4
parent7fbc8a89068fcb70e098e3a93489db8e5aeac5d9 (diff)
downloadaports-b6abc6d02e35fd54b9db18d863d34f32977db1b7.tar.gz
aports-b6abc6d02e35fd54b9db18d863d34f32977db1b7.tar.bz2
aports-b6abc6d02e35fd54b9db18d863d34f32977db1b7.tar.xz
main/arpwatch: modernize APKBUILD and mark no test suite
-rw-r--r--main/arpwatch/APKBUILD43
1 files changed, 18 insertions, 25 deletions
diff --git a/main/arpwatch/APKBUILD b/main/arpwatch/APKBUILD
index 3803fd3cf3..4cdd89fe8b 100644
--- a/main/arpwatch/APKBUILD
+++ b/main/arpwatch/APKBUILD
@@ -2,15 +2,15 @@
# Maintainer: Francesco Colista <francesco.colista@gmail.com>
pkgname=arpwatch
pkgver=2.1a15
-pkgrel=15
+pkgrel=16
pkgdesc="Ethernet monitoring program"
url="http://www-nrg.ee.lbl.gov/"
arch="all"
license="BSD"
-depends=
-pkgusers=arpwatch
+pkgusers="arpwatch"
makedepends="libpcap-dev"
install="$pkgname.pre-install"
+options="!check" # No test suite.
subpackages="$pkgname-ethercodes"
source="ftp://ftp.ee.lbl.gov/$pkgname-$pkgver.tar.gz
arpwatch.confd
@@ -39,54 +39,47 @@ source="ftp://ftp.ee.lbl.gov/$pkgname-$pkgver.tar.gz
22_alpine_bihourly_script.patch
"
-_builddir="$srcdir/$pkgname-$pkgver"
+builddir="$srcdir/$pkgname-$pkgver"
prepare() {
- cd $_builddir
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- update_config_sub || return 1
+ default_prepare
+ update_config_sub
}
build() {
- cd $_builddir
-
+ cd "$builddir"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --infodir=/usr/share/info \
- || return 1
- make -j1 || return 1
+ --infodir=/usr/share/info
+ make -j1
}
package() {
- cd $_builddir
+ cd "$builddir"
#make install command wouldn't create directory
mkdir -p "$pkgdir"/usr/sbin/
- make -j1 DESTDIR="$pkgdir" install || return 1
- install -d -o arpwatch "$pkgdir"/var/lib/arpwatch || return 1
+ make -j1 DESTDIR="$pkgdir" install
+ install -d -o arpwatch "$pkgdir"/var/lib/arpwatch
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
for files in arp2ethers arpfetch massagevendor bihourly.sh; do
- install -m755 "$_builddir"/$files "$pkgdir"/usr/sbin
+ install -m755 "$builddir"/$files "$pkgdir"/usr/sbin
done
}
ethercodes() {
- cd $_builddir
+ cd "$builddir"
pkgdesc="$pkgname ethernet codes"
mkdir -p "$subpkgdir"/usr/share/$pkgname/awk
- install -Dm644 "$_builddir"/ethercodes.dat "$subpkgdir"/usr/share/$pkgname/ethercodes.dat
+ install -Dm644 "$builddir"/ethercodes.dat "$subpkgdir"/usr/share/$pkgname/ethercodes.dat
- install -d "$subpkgdir"/usr/share/$pkgname/awk || return 1
- for f in "$_builddir"/*.awk; do
- install -m644 $f "$subpkgdir"/usr/share/$pkgname/awk/ || return 1
+ install -d "$subpkgdir"/usr/share/$pkgname/awk
+ for f in "$builddir"/*.awk; do
+ install -m644 $f "$subpkgdir"/usr/share/$pkgname/awk/
done
}