diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2013-02-14 13:21:08 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2013-02-14 13:21:08 +0000 |
commit | 5bb40e41350ef7bb5522ab6a71e5c9fcf8b406d8 (patch) | |
tree | 1ca1f9b968e03f6170c9125fe3f63d3bc7803fe9 /main/snmptt | |
parent | d16b1c42cd4aeb8f7114486c4e9dc00059bf4b1d (diff) | |
download | aports-5bb40e41350ef7bb5522ab6a71e5c9fcf8b406d8.tar.bz2 aports-5bb40e41350ef7bb5522ab6a71e5c9fcf8b406d8.tar.xz |
main/snmptt: fix dependecies. Add init script
Diffstat (limited to 'main/snmptt')
-rw-r--r-- | main/snmptt/APKBUILD | 20 | ||||
-rw-r--r-- | main/snmptt/snmptt.confd | 1 | ||||
-rw-r--r-- | main/snmptt/snmptt.initd | 25 |
3 files changed, 40 insertions, 6 deletions
diff --git a/main/snmptt/APKBUILD b/main/snmptt/APKBUILD index a41719aa71..24ea766919 100644 --- a/main/snmptt/APKBUILD +++ b/main/snmptt/APKBUILD @@ -2,15 +2,18 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=snmptt pkgver=1.3 -pkgrel=1 +pkgrel=2 pkgdesc="Translates traps received from snmptrapd into easy to understand messages" url="http://www.snmptt.org" -arch="all" +arch="noarch" license="GPL" -depends=perl +depends="perl perl-config-inifiles perl-list-moreutils" makedepends= install= -source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$pkgver.tgz" +source="http://downloads.sourceforge.net/$pkgname/${pkgname}_$pkgver.tgz + snmptt.initd + snmptt.confd + " build() { return 0 @@ -19,11 +22,16 @@ build() { package() { cd "$srcdir"/snmptt_${pkgver} mkdir -p "$pkgdir"/var/log/snmptt + mkdir -p "$pkgdir"/var/spool/snmptt install -D -m755 snmptt "$pkgdir"/usr/bin/snmptt install -D -m755 snmptthandler "$pkgdir"/usr/bin/snmptthandler install -D -m755 snmpttconvert "$pkgdir"/usr/bin/snmpttconvert install -D -m755 snmpttconvertmib "$pkgdir"/usr/bin/snmpttconvertmib - install -D -m644 snmptt.ini "$pkgdir"/etc/snmptt.ini + install -D -m644 snmptt.ini "$pkgdir"/etc/snmptt/snmptt.ini + install -D -m755 ../snmptt.initd "$pkgdir"/etc/init.d/snmptt + install -D -m644 ../snmptt.confd "$pkgdir"/etc/conf.d/snmptt } -md5sums="ee8d8206d3e0d860fee126e09d8eb207 snmptt_1.3.tgz" +md5sums="ee8d8206d3e0d860fee126e09d8eb207 snmptt_1.3.tgz +581af51464cbce90588de9565e232a9a snmptt.initd +be7faa2e9c09bd9aa4c1a04fa6cdeb52 snmptt.confd" diff --git a/main/snmptt/snmptt.confd b/main/snmptt/snmptt.confd new file mode 100644 index 0000000000..216cc9991a --- /dev/null +++ b/main/snmptt/snmptt.confd @@ -0,0 +1 @@ +OPTS="--ini /etc/snmptt/snmptt.ini" diff --git a/main/snmptt/snmptt.initd b/main/snmptt/snmptt.initd new file mode 100644 index 0000000000..1048ebeb37 --- /dev/null +++ b/main/snmptt/snmptt.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript + +DAEMON=/usr/bin/${SVCNAME} + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --quiet \ + --pidfile /var/run/${SVCNAME}.pid \ + --exec ${DAEMON} -- ${OPTS} --daemon + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet \ + --exec ${DAEMON} \ + --pidfile /var/run/${SVCNAME}.pid \ + eend $? +} + |