Mail archive
alpine-devel

[alpine-devel] [PATCH] testing/shadowircd: new aport

From: Sam Dodrill <shadow.h511_at_gmail.com>
Date: Mon, 2 Sep 2013 00:57:46 -0700

Scalable IRC daemon with many useful features
http://www.github.com/shadowircd/shadowircd
---
 testing/shadowircd/APKBUILD               | 70 +++++++++++++++++++++++++++++++
 testing/shadowircd/shadowircd.confd       |  3 ++
 testing/shadowircd/shadowircd.initd       | 22 ++++++++++
 testing/shadowircd/shadowircd.pre-install |  3 ++
 4 files changed, 98 insertions(+)
 create mode 100644 testing/shadowircd/APKBUILD
 create mode 100644 testing/shadowircd/shadowircd.confd
 create mode 100644 testing/shadowircd/shadowircd.initd
 create mode 100644 testing/shadowircd/shadowircd.pre-install
diff --git a/testing/shadowircd/APKBUILD b/testing/shadowircd/APKBUILD
new file mode 100644
index 0000000..b2add74
--- /dev/null
+++ b/testing/shadowircd/APKBUILD
_at_@ -0,0 +1,70 @@
+# Contributor: Sam Dodrill <shadow.h511_at_gmail.com>
+# Maintainer: Sam Dodrill <shadow.h511_at_gmail.com>
+pkgname=shadowircd
+pkgver=6.3.3
+pkgrel=2
+pkgdesc="Scalable IRC daemon with many useful features"
+url="http://www.github.com/shadowircd/shadowircd"
+arch="all"
+license="GPL2"
+pkgusers="ircd"                                                                
+depends=""
+depends_dev="bison flex openssl-dev zlib-dev libtool"
+makedepends="$depends_dev"
+install="$pkgname.pre-install"
+subpackages="$pkgname-dev $pkgname-doc"
+source="https://github.com/shadowircd/shadowircd/archive/shadowircd-6.3.3.tar.gz
+	$pkgname.initd
+	$pkgname.confd"
+_builddir="$srcdir"/$pkgname-$pkgname-$pkgver
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+			*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc/shadowircd \
+		--localstatedir=/var \
+		--libexecdir=/usr/lib \
+		--disable-assert \
+		--enable-ssl \
+		--enable-ipv6 \
+		--with-rundir=/var/run \
+		|| return 1
+	 make
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install
+        rm -f "$pkgdir"/usr/lib/*.la   
+        install -m755 -D "$srcdir"/$pkgname.initd \
+              "$pkgdir"/etc/init.d/shadowircd || return 1
+        install -m644 -D "$srcdir"/$pkgname.confd \
+              "$pkgdir"/etc/conf.d/shadowircd || return 1
+        chown ircd "$pkgdir"/var/run/shadowircd
+        chown ircd "$pkgdir"/var/log/shadowircd
+        chown ircd "$pkgdir"/var/shadowircd
+	sed -i -e "s/\"modules\"/\"\/usr\/lib\/shadowircd\/modules\"/g" $pkgdir/etc/$pkgname/example.conf
+	sed -i -e "s/\"modules\/autoload\"/\"\/usr\/lib\/shadowircd\/modules\/autoload\"/g" "$pkgdir"/etc/$pkgname/example.conf
+	sed -i -e "s/usr\/local\/ircd\/modules/usr\/lib\/shadowircd\/modules/g" "$pkgdir"/etc/$pkgname/reference.conf
+}
+
+md5sums="fff418e27b8979285a13b93ec7d6dbd1  shadowircd-6.3.3.tar.gz
+ce8dc0025b4e50fbec2aa643a947c1b0  shadowircd.initd
+11d70cc7c9fa0eb5ad52af35801d57c6  shadowircd.confd"
+sha256sums="a3b6189a473e837d4248b8f18b1e8454ab111c8eafeb46eda477095771636f24  shadowircd-6.3.3.tar.gz
+3bd4b0b58189518fa72b9d0c2226e83499ab718189f054a889f4e680f3a20e18  shadowircd.initd
+3d1d8b8e722efe6a9eb3171a65d96651bb93c8d6265bd4980bcbb4b8d500f6ad  shadowircd.confd"
+sha512sums="f3638bee6d49c56738cf05dd7c67d93344ed5787eb8777589390dbc38a1481e9a28895bdd4534124dcc8dbe247f3e28e299fe0bc0bb89e4d974b4aff734701d4  shadowircd-6.3.3.tar.gz
+fef24d361acd96f1e5891e484cbba8ef1dd4a0091550e6a7ae7fe6d053311b80fcdfe4f2307ebf1c4af7ec08ce35ba15bf4a8d499a0c9eb4956b00cd28cf8487  shadowircd.initd
+1886b312b0ea40945de45db7a379bff2a3af426155fb77676e03f21f8d1d733e057fb5c3cb65fb72bb56008c4c92f3d2d0010563f871fd0802446de443ddfd5e  shadowircd.confd"
diff --git a/testing/shadowircd/shadowircd.confd b/testing/shadowircd/shadowircd.confd
new file mode 100644
index 0000000..b91c0d9
--- /dev/null
+++ b/testing/shadowircd/shadowircd.confd
_at_@ -0,0 +1,3 @@
+CHARYBDIS_USER="ircd"
+CHARYBDIS_PID="/var/run/charybdis/ircd.pid"
+CHARYBDIS_CONF="/etc/charybdis/ircd.conf"
diff --git a/testing/shadowircd/shadowircd.initd b/testing/shadowircd/shadowircd.initd
new file mode 100644
index 0000000..8c3e446
--- /dev/null
+++ b/testing/shadowircd/shadowircd.initd
_at_@ -0,0 +1,22 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/charybdis/files/charybdis-ircd.initd,v 1.2 2008/01/08 21:17:02 jokey Exp $
+
+depend() {
+ 	use net
+ 	provide ircd
+}
+	
+start() {
+ 	ebegin "Starting ircd-charybdis"
+ 	start-stop-daemon --start --quiet -u ${CHARYBDIS_USER} --exec /usr/bin/charybdis-ircd -- -configfile ${CHARYBDIS_CONF}>/dev/null
+ 	eend $?
+}
+ 	
+stop() {
+ 	ebegin "Stopping ircd-charybdis"
+ 	start-stop-daemon --stop --quiet --pidfile ${CHARYBDIS_PID}
+ 	eend $?
+}
+
diff --git a/testing/shadowircd/shadowircd.pre-install b/testing/shadowircd/shadowircd.pre-install
new file mode 100644
index 0000000..6bc4edc
--- /dev/null
+++ b/testing/shadowircd/shadowircd.pre-install
_at_@ -0,0 +1,3 @@
+#!/bin/sh
+adduser -h /var/run/charybdis -s /bin/false -S -D ircd 2>/dev/null
+exit 0
-- 
1.8.3.4
---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Mon Sep 02 2013 - 00:57:46 GMT