From 60cd184ddee78ba28d90d3e81f6bb391b1df1e27 Mon Sep 17 00:00:00 2001 From: Alin Năstac Date: Fri, 25 Sep 2009 01:20:07 +0000 Subject: Correct doc dependencies and split init script in 3: kannel-{bearerbox,smsbox,wapbox} (#285246). (Portage version: 2.1.6.13/cvs/Linux x86_64) --- app-mobilephone/kannel/ChangeLog | 11 +- .../kannel/files/kannel-1.4.3-autotools.patch | 33 ++++++ .../kannel/files/kannel-1.4.3-nolex.patch | 22 ---- .../kannel/files/kannel-bearerbox.initd | 34 ++++++ app-mobilephone/kannel/files/kannel-smsbox.initd | 33 ++++++ app-mobilephone/kannel/files/kannel-wapbox.initd | 33 ++++++ app-mobilephone/kannel/kannel-1.4.3-r1.ebuild | 120 +++++++++++++++++++++ app-mobilephone/kannel/kannel-1.4.3.ebuild | 116 -------------------- 8 files changed, 263 insertions(+), 139 deletions(-) create mode 100644 app-mobilephone/kannel/files/kannel-1.4.3-autotools.patch delete mode 100644 app-mobilephone/kannel/files/kannel-1.4.3-nolex.patch create mode 100644 app-mobilephone/kannel/files/kannel-bearerbox.initd create mode 100644 app-mobilephone/kannel/files/kannel-smsbox.initd create mode 100644 app-mobilephone/kannel/files/kannel-wapbox.initd create mode 100644 app-mobilephone/kannel/kannel-1.4.3-r1.ebuild delete mode 100644 app-mobilephone/kannel/kannel-1.4.3.ebuild (limited to 'app-mobilephone') diff --git a/app-mobilephone/kannel/ChangeLog b/app-mobilephone/kannel/ChangeLog index 82ac47bc6b2c..f9ce4fb4a9f0 100644 --- a/app-mobilephone/kannel/ChangeLog +++ b/app-mobilephone/kannel/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-mobilephone/kannel # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/ChangeLog,v 1.20 2009/09/17 05:34:16 mrness Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/ChangeLog,v 1.21 2009/09/25 01:20:07 mrness Exp $ + +*kannel-1.4.3-r1 (25 Sep 2009) + + 25 Sep 2009; Alin Năstac -kannel-1.4.3.ebuild, + +kannel-1.4.3-r1.ebuild, +files/kannel-1.4.3-autotools.patch, + -files/kannel-1.4.3-nolex.patch, +files/kannel-bearerbox.initd, + +files/kannel-smsbox.initd, +files/kannel-wapbox.initd: + Correct doc dependencies and split init script in 3: + kannel-{bearerbox,smsbox,wapbox} (#285246). 17 Sep 2009; Alin Năstac kannel-1.4.3.ebuild: Install certificate in /etc/ssl and correct info messages (#285152). diff --git a/app-mobilephone/kannel/files/kannel-1.4.3-autotools.patch b/app-mobilephone/kannel/files/kannel-1.4.3-autotools.patch new file mode 100644 index 000000000000..e39cad8708c8 --- /dev/null +++ b/app-mobilephone/kannel/files/kannel-1.4.3-autotools.patch @@ -0,0 +1,33 @@ +diff -Nru gateway-1.4.3.orig/configure.in gateway-1.4.3/configure.in +--- gateway-1.4.3.orig/configure.in 2009-01-12 16:47:01.000000000 +0000 ++++ gateway-1.4.3/configure.in 2009-03-01 14:18:51.000000000 +0000 +@@ -95,8 +95,9 @@ + AC_SUBST(PKGADD_VENDOR) + + dnl Target installation directory for documentation ++PACKAGE=kannel + AC_SUBST(docdir) +-docdir='${prefix}/share/doc/kannel' ++AC_SUBST(PACKAGE) + + dnl Checks system type. + AC_CONFIG_SECTION([Running system checks]) +@@ -112,7 +112,6 @@ + AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PROG_YACC +-AC_PROG_LEX + AC_CHECK_TOOL(AR, ar) + AC_PATH_PROG(CONVERT, convert) + AC_PATH_PROG(PERL, perl) +diff -Nru gateway-1.4.3.orig/Makefile.in gateway-1.4.3/Makefile.in +--- gateway-1.4.3.orig/Makefile.in 2008-06-24 15:05:24.000000000 +0000 ++++ gateway-1.4.3/Makefile.in 2009-03-01 14:18:14.000000000 +0000 +@@ -61,7 +61,6 @@ + SHELL = @SHELL@ + VERSION = @VERSION@ + SUFFIX = @SUFFIX@ +-LEX = @LEX@ + PERL = @PERL@ + YACC = @YACC@ + diff --git a/app-mobilephone/kannel/files/kannel-1.4.3-nolex.patch b/app-mobilephone/kannel/files/kannel-1.4.3-nolex.patch deleted file mode 100644 index 6562ba46e4de..000000000000 --- a/app-mobilephone/kannel/files/kannel-1.4.3-nolex.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Nru gateway-1.4.3.orig/configure.in gateway-1.4.3/configure.in ---- gateway-1.4.3.orig/configure.in 2009-01-12 16:47:01.000000000 +0000 -+++ gateway-1.4.3/configure.in 2009-03-01 14:18:51.000000000 +0000 -@@ -112,7 +112,6 @@ - AC_PROG_INSTALL - AC_PROG_RANLIB - AC_PROG_YACC --AC_PROG_LEX - AC_CHECK_TOOL(AR, ar) - AC_PATH_PROG(CONVERT, convert) - AC_PATH_PROG(PERL, perl) -diff -Nru gateway-1.4.3.orig/Makefile.in gateway-1.4.3/Makefile.in ---- gateway-1.4.3.orig/Makefile.in 2008-06-24 15:05:24.000000000 +0000 -+++ gateway-1.4.3/Makefile.in 2009-03-01 14:18:14.000000000 +0000 -@@ -61,7 +61,6 @@ - SHELL = @SHELL@ - VERSION = @VERSION@ - SUFFIX = @SUFFIX@ --LEX = @LEX@ - PERL = @PERL@ - YACC = @YACC@ - diff --git a/app-mobilephone/kannel/files/kannel-bearerbox.initd b/app-mobilephone/kannel/files/kannel-bearerbox.initd new file mode 100644 index 000000000000..a573dbe5e21a --- /dev/null +++ b/app-mobilephone/kannel/files/kannel-bearerbox.initd @@ -0,0 +1,34 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/files/kannel-bearerbox.initd,v 1.1 2009/09/25 01:20:06 mrness Exp $ + +KANNEL_SERVICE=${SVCNAME#*-} + +depend() { + need net + after dns mysql postgresql +} + +checkconfig() { + if [ ! -f /etc/kannel/kannel.conf ] ; then + eerror "/etc/kannel/kannel.conf file doesn't exists!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting kannel ${KANNEL_SERVICE}" + start-stop-daemon --start --quiet --exec /usr/sbin/${KANNEL_SERVICE} -- \ + --daemonize --user kannel --logfile /var/log/kannel/${KANNEL_SERVICE}.log \ + --pid-file /var/run/kannel/${KANNEL_SERVICE}.pid /etc/kannel/kannel.conf + eend $? +} + +stop() { + ebegin "Stopping kannel ${KANNEL_SERVICE}" + start-stop-daemon --stop --verbose --pidfile /var/run/kannel/${KANNEL_SERVICE}.pid + eend $? +} diff --git a/app-mobilephone/kannel/files/kannel-smsbox.initd b/app-mobilephone/kannel/files/kannel-smsbox.initd new file mode 100644 index 000000000000..ec0bd4076a2b --- /dev/null +++ b/app-mobilephone/kannel/files/kannel-smsbox.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/files/kannel-smsbox.initd,v 1.1 2009/09/25 01:20:06 mrness Exp $ + +KANNEL_SERVICE=${SVCNAME#*-} + +depend() { + need kannel-bearerbox +} + +checkconfig() { + if [ ! -f /etc/kannel/kannel.conf ] ; then + eerror "/etc/kannel/kannel.conf file doesn't exists!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting kannel ${KANNEL_SERVICE}" + start-stop-daemon --start --quiet --exec /usr/sbin/${KANNEL_SERVICE} -- \ + --daemonize --user kannel --logfile /var/log/kannel/${KANNEL_SERVICE}.log \ + --pid-file /var/run/kannel/${KANNEL_SERVICE}.pid /etc/kannel/kannel.conf + eend $? +} + +stop() { + ebegin "Stopping kannel ${KANNEL_SERVICE}" + start-stop-daemon --stop --verbose --pidfile /var/run/kannel/${KANNEL_SERVICE}.pid + eend $? +} diff --git a/app-mobilephone/kannel/files/kannel-wapbox.initd b/app-mobilephone/kannel/files/kannel-wapbox.initd new file mode 100644 index 000000000000..8bab2310c933 --- /dev/null +++ b/app-mobilephone/kannel/files/kannel-wapbox.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/files/kannel-wapbox.initd,v 1.1 2009/09/25 01:20:06 mrness Exp $ + +KANNEL_SERVICE=${SVCNAME#*-} + +depend() { + need kannel-bearerbox +} + +checkconfig() { + if [ ! -f /etc/kannel/kannel.conf ] ; then + eerror "/etc/kannel/kannel.conf file doesn't exists!" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting kannel ${KANNEL_SERVICE}" + start-stop-daemon --start --quiet --exec /usr/sbin/${KANNEL_SERVICE} -- \ + --daemonize --user kannel --logfile /var/log/kannel/${KANNEL_SERVICE}.log \ + --pid-file /var/run/kannel/${KANNEL_SERVICE}.pid /etc/kannel/kannel.conf + eend $? +} + +stop() { + ebegin "Stopping kannel ${KANNEL_SERVICE}" + start-stop-daemon --stop --verbose --pidfile /var/run/kannel/${KANNEL_SERVICE}.pid + eend $? +} diff --git a/app-mobilephone/kannel/kannel-1.4.3-r1.ebuild b/app-mobilephone/kannel/kannel-1.4.3-r1.ebuild new file mode 100644 index 000000000000..3cca3f35408f --- /dev/null +++ b/app-mobilephone/kannel/kannel-1.4.3-r1.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/kannel-1.4.3-r1.ebuild,v 1.1 2009/09/25 01:20:07 mrness Exp $ + +EAPI="2" +WANT_AUTOMAKE=none + +inherit eutils autotools flag-o-matic ssl-cert + +DESCRIPTION="Powerful SMS and WAP gateway" +HOMEPAGE="http://www.kannel.org/" +SRC_URI="http://www.kannel.org/download/${PV}/gateway-${PV}.tar.gz" + +LICENSE="Kannel" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ssl mysql sqlite postgres pcre doc debug pam" + +RESTRICT="test" # some tests fail with "address already in use" + +RDEPEND="sys-libs/e2fsprogs-libs + dev-libs/libxml2 + dev-lang/perl + sys-libs/zlib + ssl? ( dev-libs/openssl ) + mysql? ( virtual/mysql ) + sqlite? ( dev-db/sqlite:3 ) + postgres? ( virtual/postgresql-server ) + pcre? ( dev-libs/libpcre ) + pam? ( virtual/pam )" +DEPEND="${RDEPEND} + >=sys-devel/bison-2.2 + doc? ( media-gfx/transfig + app-text/jadetex + app-text/docbook-dsssl-stylesheets + app-text/docbook-sgml-dtd:3.1 )" + +S="${WORKDIR}/gateway-${PV}" + +pkg_setup() { + enewgroup kannel + enewuser kannel -1 -1 /var/log/kannel kannel +} + +src_prepare() { + epatch "${FILESDIR}/${P}-custom-wap-ports.patch" + epatch "${FILESDIR}/${P}-autotools.patch" + epatch "${FILESDIR}/${P}-external-libuuid.patch" + + #by default, use current directory for logging + sed -i -e 's:/tmp/::' doc/examples/kannel.conf + + eautoconf +} + +src_configure() { + append-flags -fno-strict-aliasing # some code breaks strict aliasing + econf --docdir=/usr/share/doc/${PF} \ + --enable-localtime \ + --disable-start-stop-daemon \ + --without-sqlite2 \ + $(use_enable pam) \ + $(use_enable debug debug) \ + $(use_enable pcre) \ + $(use_enable doc docs) \ + $(use_enable ssl) \ + $(use_with mysql) \ + $(use_with sqlite sqlite3) \ + $(use_with postgres pgsql) \ + || die "econf failed" +} + +# phase disabled by RESTRICT +# src_test() { +# emake check || die "emake check failed" +# } + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + + if use doc; then + emake DESTDIR="${D}" install-docs || die "emake install-docs failed" + fi + dodoc README + + diropts -g kannel -m0750 + dodir /etc/kannel + insinto /etc/kannel + newins doc/examples/kannel.conf kannel.conf.sample + + local f + for f in bearerbox smsbox wapbox; do + newinitd "${FILESDIR}/kannel-$f.initd" kannel-$f + done + + diropts -g kannel -m0770 + keepdir /var/log/kannel /var/run/kannel +} + +pkg_postinst() { + if use ssl; then + elog "SSL certificate can be created by running" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_config() { + if use ssl; then + if install_cert /etc/ssl/kannel; then + chown kannel "${ROOT}"etc/ssl/kannel.{pem,key} + einfo "For using this certificate, you have to add following line to your kannel.conf:" + einfo ' ssl-client-certkey-file = "/etc/ssl/kannel.pem"' + einfo ' ssl-server-cert-file = "/etc/ssl/kannel.crt"' + einfo ' ssl-server-key-file = "/etc/ssl/kannel.key"' + fi + else + eerror "This phase exists only for creating kannel SSL certificate" + eerror "and ssl USE flag is disabled for this package!" + fi +} diff --git a/app-mobilephone/kannel/kannel-1.4.3.ebuild b/app-mobilephone/kannel/kannel-1.4.3.ebuild deleted file mode 100644 index 8dd550e8eadb..000000000000 --- a/app-mobilephone/kannel/kannel-1.4.3.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/kannel-1.4.3.ebuild,v 1.3 2009/09/17 05:34:16 mrness Exp $ - -EAPI="2" -WANT_AUTOMAKE=none - -inherit eutils autotools flag-o-matic ssl-cert - -DESCRIPTION="Powerful SMS and WAP gateway" -HOMEPAGE="http://www.kannel.org/" -SRC_URI="http://www.kannel.org/download/${PV}/gateway-${PV}.tar.gz" - -LICENSE="Kannel" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="ssl mysql sqlite postgres pcre doc debug pam" - -RDEPEND="sys-libs/e2fsprogs-libs - >=dev-libs/libxml2-2.6.26 - >=dev-lang/perl-5.8.8 - >=sys-libs/zlib-1.2.3 - ssl? ( >=dev-libs/openssl-0.9.8d ) - mysql? ( virtual/mysql ) - sqlite? ( >=dev-db/sqlite-3.2.1 ) - postgres? ( virtual/postgresql-server ) - pcre? ( dev-libs/libpcre ) - doc? ( media-gfx/transfig - app-text/jadetex - app-text/docbook-dsssl-stylesheets ) - pam? ( virtual/pam )" -DEPEND="${RDEPEND} - >=sys-devel/bison-2.2" - -S="${WORKDIR}/gateway-${PV}" - -pkg_setup() { - enewgroup kannel - enewuser kannel -1 -1 /var/log/kannel kannel -} - -src_prepare() { - epatch "${FILESDIR}/${P}-custom-wap-ports.patch" - epatch "${FILESDIR}/${P}-nolex.patch" # flex is not used - epatch "${FILESDIR}/${P}-external-libuuid.patch" - - #by default, use current directory for logging - sed -i -e 's:/tmp/::' doc/examples/kannel.conf - - eautoconf -} - -src_configure() { - append-flags -fno-strict-aliasing # some code breaks strict aliasing - econf --docdir=/usr/share/doc/${P} \ - --enable-localtime \ - --disable-start-stop-daemon \ - --without-sqlite2 \ - $(use_enable pam) \ - $(use_enable debug debug) \ - $(use_enable pcre) \ - $(use_enable doc docs) \ - $(use_enable ssl) \ - $(use_with mysql) \ - $(use_with sqlite sqlite3) \ - $(use_with postgres pgsql) \ - || die "econf failed" -} - -src_test() { - emake check || die "make check failed" -} - -src_install() { - emake DESTDIR="${D}" install || die "emake install failed" - - if use doc; then - emake DESTDIR="${D}" install-docs || die "emake install-docs failed" - fi - dodoc README - - diropts -g kannel -m0750 - dodir /etc/kannel - insinto /etc/kannel - newins doc/examples/kannel.conf kannel.conf.sample - newins doc/examples/modems.conf modems.conf.sample - use mysql && newins doc/examples/dlr-mysql.conf dlr-mysql.conf.sample - - diropts -g kannel -m0770 - keepdir /var/log/kannel - - newinitd "${FILESDIR}/kannel-initd" kannel - newconfd "${FILESDIR}/kannel-confd" kannel -} - -pkg_postinst() { - if use ssl; then - elog "SSL certificate can be created by running" - elog " emerge --config =${CATEGORY}/${PF}" - fi -} - -pkg_config() { - if use ssl; then - if install_cert /etc/ssl/kannel; then - chown kannel "${ROOT}"etc/ssl/kannel.{pem,key} - einfo "For using this certificate, you have to add following line to your kannel.conf:" - einfo ' ssl-client-certkey-file = "/etc/ssl/kannel.pem"' - einfo ' ssl-server-cert-file = "/etc/ssl/kannel.crt"' - einfo ' ssl-server-key-file = "/etc/ssl/kannel.key"' - fi - else - eerror "This phase exists only for creating kannel SSL certificate" - eerror "and ssl USE flag is disabled for this package!" - fi -} -- cgit v1.2.3-65-gdbad