~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

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

Details
Message ID
<1378109501-7544-1-git-send-email-shadow.h511@gmail.com>
Sender timestamp
1378109501
DKIM signature
missing
Download raw message
Patch: +98 -0
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..345c3aa
--- /dev/null
+++ b/testing/shadowircd/APKBUILD
@@ -0,0 +1,70 @@
# Contributor: Sam Dodrill <shadow.h511@gmail.com>
# Maintainer: Sam Dodrill <shadow.h511@gmail.com>
pkgname=shadowircd
pkgver=6.3.3
pkgrel=1
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
9c5473325cf654433ea8844d3e4e4882  shadowircd.initd
585358efa2a9fa1cb15317d4442e1774  shadowircd.confd"
sha256sums="a3b6189a473e837d4248b8f18b1e8454ab111c8eafeb46eda477095771636f24  shadowircd-6.3.3.tar.gz
e969f81f76d32104edd6db7b5a47b6eaef09f595d6940c5a3821a7d2b29c6fd7  shadowircd.initd
0564d57624848d943cb0986d7115d596c98c24b5034b2c81ce489abe4ebd3912  shadowircd.confd"
sha512sums="f3638bee6d49c56738cf05dd7c67d93344ed5787eb8777589390dbc38a1481e9a28895bdd4534124dcc8dbe247f3e28e299fe0bc0bb89e4d974b4aff734701d4  shadowircd-6.3.3.tar.gz
5a3592d3be89af13cdc4e30dd1595e13e70fbb369ab3921d8ca7e8089618ad3be98edf9adb69510f889d8e9bd8f7dd515d7cdd8c4de591d7e36d67d33787abec  shadowircd.initd
40e1d2a7a01b97721893dd6ea2bc1857c4bb74b257362ad8bcde9087fe44d1514cbea12a8ab53feb41499f73807de3fa8de9f89a5eb5cb2d558507e952db5a58  shadowircd.confd"
diff --git a/testing/shadowircd/shadowircd.confd b/testing/shadowircd/shadowircd.confd
new file mode 100644
index 0000000..810fde2
--- /dev/null
+++ b/testing/shadowircd/shadowircd.confd
@@ -0,0 +1,3 @@
SHADOWIRCD_USER="ircd"
SHADOWIRCD_PID="/var/run/shadowircd/ircd.pid"
SHADOWIRCD_CONF="/etc/shadowircd/ircd.conf"
diff --git a/testing/shadowircd/shadowircd.initd b/testing/shadowircd/shadowircd.initd
new file mode 100644
index 0000000..c9abc7f
--- /dev/null
+++ b/testing/shadowircd/shadowircd.initd
@@ -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 shadowircd"
 	start-stop-daemon --start --quiet -u ${SHADOWIRCD_USER} --exec /usr/bin/ircd -- -configfile ${SHADOWIRCD_CONF}>/dev/null
 	eend $?
}
 	
stop() {
 	ebegin "Stopping shadowircd"
 	start-stop-daemon --stop --quiet --pidfile ${SHADOWIRCD_PID}
 	eend $?
}

diff --git a/testing/shadowircd/shadowircd.pre-install b/testing/shadowircd/shadowircd.pre-install
new file mode 100644
index 0000000..e40f840
--- /dev/null
+++ b/testing/shadowircd/shadowircd.pre-install
@@ -0,0 +1,3 @@
#!/bin/sh
adduser -h /var/run/shadowircd -s /bin/false -S -D ircd 2>/dev/null
exit 0
-- 
1.8.3.4



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20130902102545.56d16638@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1378109501-7544-1-git-send-email-shadow.h511@gmail.com> (view parent)
Sender timestamp
1378110345
DKIM signature
missing
Download raw message
Thanks!

a few nitpicks below.

On Mon,  2 Sep 2013 01:11:41 -0700
Sam Dodrill <shadow.h511@gmail.com> wrote:

> Scalable IRC daemon with many useful features
> http://www.github.com/shadowircd/shadowircd
...
> +pkgname=shadowircd
> +pkgver=6.3.3
> +pkgrel=1

initial apkbuild should have pkgrel=0

> +arch="all"
> +license="GPL2"
> +pkgusers="ircd"                                                                

whitespace errors   ^^^ (whitespace at end of line)

> +depends=""
> +depends_dev="bison flex openssl-dev zlib-dev libtool"
> +makedepends="$depends_dev"

The depends_dev package holds the depends for the -dev package. I doubt
that bison, flex and libtool is needed to be able to use the
shadowirc-dev package.

...

> diff --git a/testing/shadowircd/shadowircd.pre-install b/testing/shadowircd/shadowircd.pre-install
> new file mode 100644
> index 0000000..e40f840
> --- /dev/null
> +++ b/testing/shadowircd/shadowircd.pre-install
> @@ -0,0 +1,3 @@
> +#!/bin/sh
> +adduser -h /var/run/shadowircd -s /bin/false -S -D ircd 2>/dev/null

we should use /sbin/nologin instead of /bin/false now as shell.

> +exit 0

I fixed the whitespace errors and applied as is otherwise.

Thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)