Commit b6abc6d0 authored by Roberto Oliveira's avatar Roberto Oliveira Committed by Natanael Copa

main/arpwatch: modernize APKBUILD and mark no test suite

parent 7fbc8a89
......@@ -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
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment