From 11186610007134faa0cf463ab70d54fde7acf74a Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Fri, 17 Sep 2010 08:53:53 +0000 Subject: main/sircbot: moved from testing --- main/sircbot/APKBUILD | 45 +++++++++++++++++++++++++++++++++++++ main/sircbot/sircbot.confd | 5 +++++ main/sircbot/sircbot.initd | 35 +++++++++++++++++++++++++++++ main/sircbot/sircbot.pre-install | 5 +++++ testing/sircbot/APKBUILD | 45 ------------------------------------- testing/sircbot/sircbot.confd | 5 ----- testing/sircbot/sircbot.initd | 35 ----------------------------- testing/sircbot/sircbot.pre-install | 5 ----- 8 files changed, 90 insertions(+), 90 deletions(-) create mode 100644 main/sircbot/APKBUILD create mode 100644 main/sircbot/sircbot.confd create mode 100644 main/sircbot/sircbot.initd create mode 100644 main/sircbot/sircbot.pre-install delete mode 100644 testing/sircbot/APKBUILD delete mode 100644 testing/sircbot/sircbot.confd delete mode 100644 testing/sircbot/sircbot.initd delete mode 100644 testing/sircbot/sircbot.pre-install diff --git a/main/sircbot/APKBUILD b/main/sircbot/APKBUILD new file mode 100644 index 0000000000..ba6a19d59f --- /dev/null +++ b/main/sircbot/APKBUILD @@ -0,0 +1,45 @@ +# Maintainer: Natanael Copa +pkgname=sircbot +pkgver=0.2 +pkgrel=1 +pkgdesc="Minimalistic IRC bot" +url="http://git.alpinelinux.org/cgit/sircbot/" +license="GPL-2" +pkgusers="sircbot" +pkggroups="sircbot" +depends= +makedepends="lua-dev" +install="$pkgname.pre-install" +subpackages="lua-sircbot:luamod" +source="http://git.alpinelinux.org/cgit/sircbot/snapshot/sircbot-$pkgver.tar.bz2 + sircbot.initd + sircbot.confd + " + +_builddir="$srcdir"/$pkgname-$pkgver +prepare() { + cd "$_builddir" +} + +build() { + cd "$_builddir" + make || return 1 +} + +package() { + cd "$_builddir" + make install DESTDIR="$pkgdir" prefix=/usr + install -o sircbot -g sircbot -d "$pkgdir"/var/run/sircbot + install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname +} + +luamod() { + pkgdesc="Luamodule for sirbot client" + mkdir -p "$subpkgdir"/usr/ + mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ +} + +md5sums="a9d16db48c97ebfa30e1c84f37e70838 sircbot-0.2.tar.bz2 +494717b7824e271093511a48955e4a14 sircbot.initd +8443ac189030c7b8beb8e579dc16ebc7 sircbot.confd" diff --git a/main/sircbot/sircbot.confd b/main/sircbot/sircbot.confd new file mode 100644 index 0000000000..63f8590a72 --- /dev/null +++ b/main/sircbot/sircbot.confd @@ -0,0 +1,5 @@ +# example: +# sircbot_opts="-n sircbot -s irc.freenode.net" + +sircbot_channels="#sircbot" +sircbot_opts="" diff --git a/main/sircbot/sircbot.initd b/main/sircbot/sircbot.initd new file mode 100644 index 0000000000..045f7ee2aa --- /dev/null +++ b/main/sircbot/sircbot.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript + +daemon=/usr/bin/sircbot +sircbot_user=${sircbot_user:-sircbot} +sircbot_group=${sircbot_group:-sircbot} +pidfile=/var/run/sircbot/sircbot.pid + +depends() { + need net + after firewall +} + +checkconfig() { + if [ -z "$sircbot_channels" ]; then + eerror "Please specify sircbot_channels in /etc/conf.d/sircbot" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + ebegin "Starting sircbot" + start-stop-daemon --start --user $sircbot_user --group $sircbot_group \ + --umask 0002 --pidfile "$pidfile" \ + --exec $daemon -- $sircbot_opts $sircbot_channels + eend $? +} + +stop() { + ebegin "Stopping sircbot" + start-stop-daemon --stop --pidfile "$pidfile" --exec $daemon + eend $? +} + diff --git a/main/sircbot/sircbot.pre-install b/main/sircbot/sircbot.pre-install new file mode 100644 index 0000000000..99c5a83027 --- /dev/null +++ b/main/sircbot/sircbot.pre-install @@ -0,0 +1,5 @@ +#!/bin/sh + +addgroup sircbot 2>/dev/null +adduser -h /var/run/sircbot -G sircbot -S -D 2>/dev/null +exit 0 diff --git a/testing/sircbot/APKBUILD b/testing/sircbot/APKBUILD deleted file mode 100644 index ba6a19d59f..0000000000 --- a/testing/sircbot/APKBUILD +++ /dev/null @@ -1,45 +0,0 @@ -# Maintainer: Natanael Copa -pkgname=sircbot -pkgver=0.2 -pkgrel=1 -pkgdesc="Minimalistic IRC bot" -url="http://git.alpinelinux.org/cgit/sircbot/" -license="GPL-2" -pkgusers="sircbot" -pkggroups="sircbot" -depends= -makedepends="lua-dev" -install="$pkgname.pre-install" -subpackages="lua-sircbot:luamod" -source="http://git.alpinelinux.org/cgit/sircbot/snapshot/sircbot-$pkgver.tar.bz2 - sircbot.initd - sircbot.confd - " - -_builddir="$srcdir"/$pkgname-$pkgver -prepare() { - cd "$_builddir" -} - -build() { - cd "$_builddir" - make || return 1 -} - -package() { - cd "$_builddir" - make install DESTDIR="$pkgdir" prefix=/usr - install -o sircbot -g sircbot -d "$pkgdir"/var/run/sircbot - install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname - install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname -} - -luamod() { - pkgdesc="Luamodule for sirbot client" - mkdir -p "$subpkgdir"/usr/ - mv "$pkgdir"/usr/lib "$subpkgdir"/usr/ -} - -md5sums="a9d16db48c97ebfa30e1c84f37e70838 sircbot-0.2.tar.bz2 -494717b7824e271093511a48955e4a14 sircbot.initd -8443ac189030c7b8beb8e579dc16ebc7 sircbot.confd" diff --git a/testing/sircbot/sircbot.confd b/testing/sircbot/sircbot.confd deleted file mode 100644 index 63f8590a72..0000000000 --- a/testing/sircbot/sircbot.confd +++ /dev/null @@ -1,5 +0,0 @@ -# example: -# sircbot_opts="-n sircbot -s irc.freenode.net" - -sircbot_channels="#sircbot" -sircbot_opts="" diff --git a/testing/sircbot/sircbot.initd b/testing/sircbot/sircbot.initd deleted file mode 100644 index 045f7ee2aa..0000000000 --- a/testing/sircbot/sircbot.initd +++ /dev/null @@ -1,35 +0,0 @@ -#!/sbin/runscript - -daemon=/usr/bin/sircbot -sircbot_user=${sircbot_user:-sircbot} -sircbot_group=${sircbot_group:-sircbot} -pidfile=/var/run/sircbot/sircbot.pid - -depends() { - need net - after firewall -} - -checkconfig() { - if [ -z "$sircbot_channels" ]; then - eerror "Please specify sircbot_channels in /etc/conf.d/sircbot" - return 1 - fi - return 0 -} - -start() { - checkconfig || return 1 - ebegin "Starting sircbot" - start-stop-daemon --start --user $sircbot_user --group $sircbot_group \ - --umask 0002 --pidfile "$pidfile" \ - --exec $daemon -- $sircbot_opts $sircbot_channels - eend $? -} - -stop() { - ebegin "Stopping sircbot" - start-stop-daemon --stop --pidfile "$pidfile" --exec $daemon - eend $? -} - diff --git a/testing/sircbot/sircbot.pre-install b/testing/sircbot/sircbot.pre-install deleted file mode 100644 index 99c5a83027..0000000000 --- a/testing/sircbot/sircbot.pre-install +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -addgroup sircbot 2>/dev/null -adduser -h /var/run/sircbot -G sircbot -S -D 2>/dev/null -exit 0 -- cgit v1.2.3