summaryrefslogtreecommitdiffstats
path: root/main/pingu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 08:01:31 +0000
commitb70981b68efcce5256eb11c6cd26ae123b10b6ea (patch)
treea38be6efae5e2ba15c2e839504632f9b7bfd5f91 /main/pingu
parent2b4df81538b8398442d5296650905c70341dd8d3 (diff)
downloadaports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.bz2
aports-b70981b68efcce5256eb11c6cd26ae123b10b6ea.tar.xz
moved extra/* to main/
and fixed misc build issues
Diffstat (limited to 'main/pingu')
-rw-r--r--main/pingu/APKBUILD23
-rw-r--r--main/pingu/pingu.initd27
2 files changed, 50 insertions, 0 deletions
diff --git a/main/pingu/APKBUILD b/main/pingu/APKBUILD
new file mode 100644
index 000000000..fdd91972a
--- /dev/null
+++ b/main/pingu/APKBUILD
@@ -0,0 +1,23 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=pingu
+pkgver=0.3
+pkgrel=0
+pkgdesc="Small daemon that pings hosts and executes a script when status change"
+url="http://git.alpinelinux.org/cgit/pingu"
+license="GPL"
+depends="uclibc"
+source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2
+ pingu.initd
+ "
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make || return 1
+ make BINDIR=/usr/sbin DESTDIR="$pkgdir" install
+ install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+}
+
+md5sums="59f9c927a80c71d85f2363e314a25197 pingu-0.3.tar.bz2
+d2162d9c02a66691bb6360f4f2d9d701 pingu.initd"
diff --git a/main/pingu/pingu.initd b/main/pingu/pingu.initd
new file mode 100644
index 000000000..39301f80e
--- /dev/null
+++ b/main/pingu/pingu.initd
@@ -0,0 +1,27 @@
+#!/sbin/runscript
+
+# Sample init.d file for alpine linux.
+
+NAME=pingu
+DAEMON=/usr/bin/$NAME
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet \
+ --pidfile /var/run/${NAME}.pid \
+ --exec ${DAEMON} -- -d
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON} \
+ --pidfile /var/run/${NAME}.pid
+ eend $?
+}
+