aboutsummaryrefslogtreecommitdiffstats
path: root/community/dhcp-probe
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 14:25:26 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-22 14:25:30 +0000
commit3a8569ea7a6921ac91005a597112bcb93633595e (patch)
treef612aa7538a056b83e6d54cddec5e1ae5f530137 /community/dhcp-probe
parent05109abdf679143e4e76250ad4fa3b183d36f5b1 (diff)
downloadaports-3a8569ea7a6921ac91005a597112bcb93633595e.tar.bz2
aports-3a8569ea7a6921ac91005a597112bcb93633595e.tar.xz
community/dhcp-probe: moved from testing
Diffstat (limited to 'community/dhcp-probe')
-rw-r--r--community/dhcp-probe/APKBUILD46
-rw-r--r--community/dhcp-probe/dhcp-probe.confd14
-rw-r--r--community/dhcp-probe/dhcp-probe.initd21
3 files changed, 81 insertions, 0 deletions
diff --git a/community/dhcp-probe/APKBUILD b/community/dhcp-probe/APKBUILD
new file mode 100644
index 0000000000..43780489bb
--- /dev/null
+++ b/community/dhcp-probe/APKBUILD
@@ -0,0 +1,46 @@
+# Contributor: Francesco Colista <francesco.colista@gmail.com>
+# Maintainer: Francesco Colista <francesco.colista@gmail.com>
+pkgname=dhcp-probe
+_pkgname=dhcp_probe
+pkgver=1.3.0
+pkgrel=2
+pkgdesc="Allows network administrators to make calculations that will assist in subnetting a network"
+url="http://www.net.princeton.edu/software/dhcp_probe/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev="libnet-dev libpcap-dev"
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="http://www.net.princeton.edu/software/$_pkgname/$_pkgname-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.confd"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ ./configure --prefix=/usr
+ make || return 1
+}
+package() {
+ local f
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ mkdir -p "$srcdir"/etc/dhcp-probe
+ install -Dm755 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -Dm755 "$builddir"/extras/dhcp_probe.cf.sample "$pkgdir"/etc/dhcp-probe/dhcp_probe.cf || return 1
+ for f in dhcp_probe_notify dhcp_probe_notify2 mail-throttled; do
+ install -Dm755 "$builddir"/extras/$f "$pkgdir"/etc/dhcp-probe/$f || return 1
+ done
+}
+md5sums="8067e696fbd88120bdcc2ffef4b64da2 dhcp_probe-1.3.0.tar.gz
+2a7a823651ab64c79654983c94edc347 dhcp-probe.initd
+1ffbda883f84af0daf5a2992370de643 dhcp-probe.confd"
+sha256sums="227cd6a82a7fa4d989994cb076f18092bc2c82592ceaeb31c4fdd09294b9265f dhcp_probe-1.3.0.tar.gz
+af384ec0bc9c52c4da67bdc23c455ced8acebde45811c8f0ba2102ed22ad5589 dhcp-probe.initd
+bb9bd5bc155c05a1e9516bd7319680881e6acc300205206c8b55b649072f3d01 dhcp-probe.confd"
+sha512sums="d643012529ee5149adbc0c1f19f8e579c55201e86de2aec9b3313be9412db4e973162f864d1baaf79fa340b7bd9a7385f0f1406d1b616e801ced3c7bb387c854 dhcp_probe-1.3.0.tar.gz
+3753d6b4c5780f42a4793dfa1f23df2c9a21fa56ca42083f60d23585d720e76cb96f4f38bfeb31cb2e599f3e5659ef7decec1c7c9b3c885db5abd65c4302c63c dhcp-probe.initd
+0e500c4fc58892b70a85434d5dbba45e9ca89455223ac56e8dc544d5e16539bbd4cc63795de02096669951ad7b6a8a1606660a5ee7655f3f4375fa4c4d168b73 dhcp-probe.confd"
diff --git a/community/dhcp-probe/dhcp-probe.confd b/community/dhcp-probe/dhcp-probe.confd
new file mode 100644
index 0000000000..0dee6058cd
--- /dev/null
+++ b/community/dhcp-probe/dhcp-probe.confd
@@ -0,0 +1,14 @@
+#-d debuglevel enable debugging at specified level
+#-f don't fork (only use for debugging)
+#-l log_file log to file instead of syslog
+#-o capture_file enable capturing of unexpected answers
+#-p pid_file override default pid file [/var/run/dhcp_probe.pid]
+#-Q vlan_id tag outgoing frames with an 802.1Q VLAN ID
+#-s capture_bufsize override default capture bufsize [30280]
+#-T enable the socket receive timeout feature
+#-w cwd override default working directory [/]
+
+INTERFACE=eth0
+CONFIGFILE="/etc/dhcp-probe/dhcp_probe.cf"
+PID="/var/run/dhcp_probe.pid"
+PARAMS="-c $CONFIGFILE -p $PID $INTERFACE"
diff --git a/community/dhcp-probe/dhcp-probe.initd b/community/dhcp-probe/dhcp-probe.initd
new file mode 100644
index 0000000000..e5a596414d
--- /dev/null
+++ b/community/dhcp-probe/dhcp-probe.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+ use syslog
+
+}
+
+start() {
+ ebegin "Starting DHCP Probe"
+ start-stop-daemon --start --quiet --background --make-pidfile \
+ --pidfile /var/run/dhcp_probe.pid --exec /usr/sbin/dhcp_probe \
+ -- $PARAMS
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCP Probe"
+ start-stop-daemon --stop --quiet --pidfile /var/run/dhcp_probe.pid
+ eend $?
+}