aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/znc/APKBUILD35
-rw-r--r--main/znc/znc.confd7
-rw-r--r--main/znc/znc.initd39
-rw-r--r--main/znc/znc.pre-install3
4 files changed, 72 insertions, 12 deletions
diff --git a/main/znc/APKBUILD b/main/znc/APKBUILD
index a00c976831..742e8c0003 100644
--- a/main/znc/APKBUILD
+++ b/main/znc/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=znc
-pkgver=1.2
-pkgrel=1
+pkgver=1.4
+pkgrel=0
pkgdesc="An advanced IRC bouncer"
url="http://znc.in"
arch="all"
@@ -11,12 +11,14 @@ depends=""
depends_dev=""
makedepends="perl-dev openssl-dev cyrus-sasl-dev python-dev c-ares-dev swig
gettext-dev libiconv-dev tcl-dev autoconf automake"
-install=""
+install="$pkgname.pre-install"
+pkgusers="$pkgname"
subpackages="$pkgname-dev $pkgname-doc $pkgname-extra $pkgname-modtcl
$pkgname-modperl"
source="http://znc.in/releases/znc-$pkgver.tar.gz
fix-strerror_r.patch
- "
+ $pkgname.initd
+ $pkgname.confd"
_builddir="$srcdir"/znc-$pkgver
prepare() {
@@ -27,12 +29,10 @@ prepare() {
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
-# aclocal -I m4 && autoheader && autoconf || return 1
}
build() {
cd "$_builddir"
- export CHARSET=
export CFLAGS="$CFLAGS -D_GNU_SOURCE"
./configure \
--build=$CBUILD \
@@ -51,6 +51,11 @@ build() {
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
+ install -D -m755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ install -D -m644 "$srcdir"/$pkgname.confd \
+ "$pkgdir"/etc/conf.d/$pkgname || return 1
+ install -d -o $pkgname $pkgdir/var/lib/znc || return 1
}
_mv_to_sub() {
@@ -103,9 +108,15 @@ modperl() {
_mv_mod modperl modperl.so
}
-md5sums="ef18e5402a82cc3fcab5c2ac5c2e6f3b znc-1.2.tar.gz
-683043a298fcd79eda13a75a91f84c0b fix-strerror_r.patch"
-sha256sums="d9a2cd2a484ff23e6fc9cbde8dd8a43efbcd8d288afca7b1268914ca0d18701d znc-1.2.tar.gz
-06699125318a4caa88e04fa6031e8b0a5a87321720f352fbd63bd619c615401b fix-strerror_r.patch"
-sha512sums="dff24e56127e5599d64b4c62de967d5d48d8ebf23ca8597d33bf0b3622640512db7a462bfa7c2031cd8307f402bab8efa345f6d1fc813e78eb0dcae581de3cf7 znc-1.2.tar.gz
-c066fca1b97e7f5c4897221af6117c64492864f4800d755f0b285bc3df63faa34441625d2361dca4696461caaff0eccdd0ce8fdcf582df103f7caabd42f59ace fix-strerror_r.patch"
+md5sums="630cb74db34d2d5451ba30b47869f6bb znc-1.4.tar.gz
+683043a298fcd79eda13a75a91f84c0b fix-strerror_r.patch
+d46d465d75c526cd21ebee8bfaa4440b znc.initd
+1817e134ec3fa6ec05d36d4995a5aaa5 znc.confd"
+sha256sums="86e98fd0ed182d39828c926809f8075d836ee3b70a6dd43dfbb434822f2a7b52 znc-1.4.tar.gz
+06699125318a4caa88e04fa6031e8b0a5a87321720f352fbd63bd619c615401b fix-strerror_r.patch
+9df9e738efca0e6ace045bdb6a1419082408119ba92c032566c6d4a61b1844b5 znc.initd
+be3155e79e6ed13be88fbf9d99f6889b3ee8425837120c448c827b8302672063 znc.confd"
+sha512sums="0c33b05e8232084999812cbaa467dc7d37b80cafc1001b82e89c702b4303d8db9a27b948fe653e7090404eb1c66f5492f02f3524bc39efabade4be8bdb476671 znc-1.4.tar.gz
+c066fca1b97e7f5c4897221af6117c64492864f4800d755f0b285bc3df63faa34441625d2361dca4696461caaff0eccdd0ce8fdcf582df103f7caabd42f59ace fix-strerror_r.patch
+0d1b9bf71cde1b803e9deddc64006528778dc628603bb4ba8cca17098dcb6b8fc34dcb43eca7de7dec61ce84832dd07d76c7ccb2d9175f859d5aee2a349e8045 znc.initd
+352f18d64cbfbd5970c859f2ae2290c0ddafcbd8f1bb5d74f33976bc8388f65a75f8a9a73a093fbac12f2d243d4bcf74380bbb3aaab8d68f7bf4eab7ce3bea46 znc.confd"
diff --git a/main/znc/znc.confd b/main/znc/znc.confd
new file mode 100644
index 0000000000..9681f8d792
--- /dev/null
+++ b/main/znc/znc.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/znc
+
+# Location of the znc configuration folder
+ZNC_CONF="/var/lib/znc"
+
+# User to run znc as
+ZNC_USER="znc"
diff --git a/main/znc/znc.initd b/main/znc/znc.initd
new file mode 100644
index 0000000000..8b7c8bca5e
--- /dev/null
+++ b/main/znc/znc.initd
@@ -0,0 +1,39 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/znc/files/znc.initd,v 1.1 2012/11/21 18:11:31 wired Exp $
+
+extra_commands="config"
+extra_started_commands="reload save"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting ZNC"
+ start-stop-daemon --start --user ${ZNC_USER} --name znc \
+ --exec /usr/bin/znc -- -d ${ZNC_CONF}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ZNC"
+ start-stop-daemon --signal SIGINT --name znc \
+ --exec /usr/bin/znc -- -d ${ZNC_CONF}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ZNC Configuration File from Disk"
+ start-stop-daemon --signal SIGHUP --name znc \
+ --exec /usr/bin/znc -- -d ${ZNC_CONF}
+ eend $?
+}
+
+save() {
+ ebegin "Saving ZNC Configuration File to Disk"
+ start-stop-daemon --signal SIGUSR1 --name znc \
+ --exec /usr/bin/znc -- -d ${ZNC_CONF}
+ eend $?
+}
diff --git a/main/znc/znc.pre-install b/main/znc/znc.pre-install
new file mode 100644
index 0000000000..91f2f8d27b
--- /dev/null
+++ b/main/znc/znc.pre-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+adduser -H -D -s /sbin/nologin znc 2>/dev/null
+exit 0