From 983a11e3031ce51a0c7b0ded0d48713d48474522 Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Tue, 19 Apr 2011 19:25:23 +0000 Subject: testing/dbmail: add initd scripts --- testing/dbmail/APKBUILD | 39 ++++++++++++++++++++++------------ testing/dbmail/dbmail-httpd.initd | 40 +++++++++++++++++++++++++++++++++++ testing/dbmail/dbmail-imapd.initd | 40 +++++++++++++++++++++++++++++++++++ testing/dbmail/dbmail-lmtpd.initd | 40 +++++++++++++++++++++++++++++++++++ testing/dbmail/dbmail-pop3d.initd | 40 +++++++++++++++++++++++++++++++++++ testing/dbmail/dbmail-timsieved.initd | 39 ++++++++++++++++++++++++++++++++++ 6 files changed, 224 insertions(+), 14 deletions(-) create mode 100644 testing/dbmail/dbmail-httpd.initd create mode 100644 testing/dbmail/dbmail-imapd.initd create mode 100644 testing/dbmail/dbmail-lmtpd.initd create mode 100644 testing/dbmail/dbmail-pop3d.initd create mode 100644 testing/dbmail/dbmail-timsieved.initd diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD index ed604dc12..4c90f9608 100644 --- a/testing/dbmail/APKBUILD +++ b/testing/dbmail/APKBUILD @@ -3,20 +3,25 @@ pkgname=dbmail pkgver=3.0.0_rc2 _realpkgver=3.0.0-rc2 -pkgrel=0 +pkgrel=1 pkgdesc="Fast and scalable sql based mail services" url="http://dbmail.org" arch="all" license="GPL" depends= -depends_dev="sqlite-dev mysql-dev postgresql-dev openldap-dev - libsieve-dev glib-dev gmime-dev mhash-dev libevent-dev - libzdb-dev" +depends_dev="openldap-dev libsieve-dev glib-dev gmime-dev + mhash-dev libevent-dev libzdb-dev" makedepends="$depends_dev asciidoc xmlto" install="" subpackages="$pkgname-dev $pkgname-doc" source="http://www.dbmail.org/download/3.0/dbmail-3.0.0-rc2.tar.gz - code-cleanups.patch" + code-cleanups.patch + $pkgname-imapd.initd + $pkgname-lmtpd.initd + $pkgname-pop3d.initd + $pkgname-httpd.initd + $pkgname-timsieved.initd + " _builddir="$srcdir/${pkgname}_${_realpkgver}" @@ -35,10 +40,7 @@ build() { ./configure --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --infodir=/usr/share/inf \ - --with-mysql \ - --with-pgsql \ - --with-sqlite \ + --infodir=/usr/share/info \ --with-sieve \ --with-ldap make || return 1 @@ -50,14 +52,23 @@ build() { package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 - install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample - mkdir -p "$pkgdir/usr/share/dbmail" - mv sql/* "$pkgdir/usr/share/dbmail/" - mv dbmail.schema "$pkgdir/usr/share/dbmail/" + install -Dm644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf.sample" + mkdir -p "$pkgdir/usr/share/$pkgname" + mv sql/* "$pkgdir/usr/share/$pkgname/" + mv "$pkgname.schema" "$pkgdir/usr/share/$pkgname/" + for i in imapd lmtpd pop3d httpd timsieved; do + install -Dm755 "$srcdir/$pkgname-$i.initd" \ + "$pkgdir/etc/init.d/dbmail-$i" || return 1 + done #install man pages cd "$_builddir/man" make DESTDIR="$pkgdir" install || return 1 } md5sums="c4fda2da173ddeda25bcf9e2e57abd1e dbmail-3.0.0-rc2.tar.gz -b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch" +b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch +76a0f8f96ca70a4af14c81716134cc5d dbmail-imapd.initd +a6d79d7f0cf0fb80ef2ada71c25d9350 dbmail-lmtpd.initd +504dd74912daeea4268f8c25ddf6de0f dbmail-pop3d.initd +42ac86844fedf5d1afec764170e6a5de dbmail-httpd.initd +4253a7580d82e026ecbaf45ea863e9e7 dbmail-timsieved.initd" diff --git a/testing/dbmail/dbmail-httpd.initd b/testing/dbmail/dbmail-httpd.initd new file mode 100644 index 000000000..832e64046 --- /dev/null +++ b/testing/dbmail/dbmail-httpd.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# + +PIDFILE="/var/run/dbmail-httpd.pid" + +depend() { + need net + use mysql + use pgsql + after mta +} + +checkconfig() { + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then + eerror "You need to create apropriate config" + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" + return 1 + fi + # Avoid using root's TMPDIR + unset TMPDIR +} + + +start() { + checkconfig && \ + ebegin "Starting DBMail HTTP daemon" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dbmail-httpd \ + --name dbmail-httpd \ + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 + eend $? +} + +stop() { + ebegin "Stopping DBMail HTTP daemon" + start-stop-daemon --stop --quiet --retry 5 \ + --pidfile ${PIDFILE} + eend $? +} + diff --git a/testing/dbmail/dbmail-imapd.initd b/testing/dbmail/dbmail-imapd.initd new file mode 100644 index 000000000..8f6984feb --- /dev/null +++ b/testing/dbmail/dbmail-imapd.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# + +PIDFILE="/var/run/dbmail-imapd.pid" + +depend() { + need net + use mysql + use pgsql + after mta +} + +checkconfig() { + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then + eerror "You need to create apropriate config" + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" + return 1 + fi + # Avoid using root's TMPDIR + unset TMPDIR +} + + +start() { + checkconfig && \ + ebegin "Starting DBMail IMAP daemon" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dbmail-imapd \ + --name dbmail-imapd \ + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 + eend $? +} + +stop() { + ebegin "Stopping DBMail IMAP daemon" + start-stop-daemon --stop --quiet --retry 5 \ + --pidfile ${PIDFILE} + eend $? +} + diff --git a/testing/dbmail/dbmail-lmtpd.initd b/testing/dbmail/dbmail-lmtpd.initd new file mode 100644 index 000000000..cea3da6dd --- /dev/null +++ b/testing/dbmail/dbmail-lmtpd.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# + +PIDFILE="/var/run/dbmail-lmtpd.pid" + +depend() { + need net + use mysql + use pgsql + after mta +} + +checkconfig() { + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then + eerror "You need to create apropriate config" + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" + return 1 + fi + # Avoid using root's TMPDIR + unset TMPDIR +} + + +start() { + checkconfig && \ + ebegin "Starting DBMail LMTP daemon" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dbmail-lmtpd \ + --name dbmail-lmtpd \ + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 + eend $? +} + +stop() { + ebegin "Stopping DBMail LMTP daemon" + start-stop-daemon --stop --quiet --retry 5 \ + --pidfile ${PIDFILE} + eend $? +} + diff --git a/testing/dbmail/dbmail-pop3d.initd b/testing/dbmail/dbmail-pop3d.initd new file mode 100644 index 000000000..8c9e7b874 --- /dev/null +++ b/testing/dbmail/dbmail-pop3d.initd @@ -0,0 +1,40 @@ +#!/sbin/runscript +# + +PIDFILE="/var/run/dbmail-pop3d.pid" + +depend() { + need net + use mysql + use pgsql + after mta +} + +checkconfig() { + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then + eerror "You need to create apropriate config" + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" + return 1 + fi + # Avoid using root's TMPDIR + unset TMPDIR +} + + +start() { + checkconfig && \ + ebegin "Starting DBMail POP3 daemon" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dbmail-pop3d \ + --name dbmail-pop3d \ + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 + eend $? +} + +stop() { + ebegin "Stopping DBMail POP3 daemon" + start-stop-daemon --stop --quiet --retry 5 \ + --pidfile ${PIDFILE} + eend $? +} + diff --git a/testing/dbmail/dbmail-timsieved.initd b/testing/dbmail/dbmail-timsieved.initd new file mode 100644 index 000000000..325badb29 --- /dev/null +++ b/testing/dbmail/dbmail-timsieved.initd @@ -0,0 +1,39 @@ +#!/sbin/runscript +# + +PIDFILE="/var/run/dbmail-timsieved.pid" + +depend() { + need net + use mysql + use pgsql + after mta +} + +checkconfig() { + if [ ! -e "/etc/dbmail/dbmail.conf" ]; then + eerror "You need to create apropriate config" + eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" + return 1 + fi + # Avoid using root's TMPDIR + unset TMPDIR +} + + +start() { + checkconfig && \ + ebegin "Starting DBMail SIEVE daemon" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/dbmail-timsieved \ + -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 + eend $? +} + +stop() { + ebegin "Stopping DBMail SIEVE daemon" + start-stop-daemon --stop --quiet --retry 5 \ + --pidfile ${PIDFILE} + eend $? +} + -- cgit v1.2.3