aboutsummaryrefslogtreecommitdiffstats
path: root/testing/dbmail
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-04-19 19:25:23 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-04-19 19:26:32 +0000
commit983a11e3031ce51a0c7b0ded0d48713d48474522 (patch)
tree8f5d01642361d9a373fc8543792a6deef41ae641 /testing/dbmail
parent57026c20e519d54529d0b8256cdde3eeb6116d0a (diff)
downloadaports-983a11e3031ce51a0c7b0ded0d48713d48474522.tar.bz2
aports-983a11e3031ce51a0c7b0ded0d48713d48474522.tar.xz
testing/dbmail: add initd scripts
Diffstat (limited to 'testing/dbmail')
-rw-r--r--testing/dbmail/APKBUILD39
-rw-r--r--testing/dbmail/dbmail-httpd.initd40
-rw-r--r--testing/dbmail/dbmail-imapd.initd40
-rw-r--r--testing/dbmail/dbmail-lmtpd.initd40
-rw-r--r--testing/dbmail/dbmail-pop3d.initd40
-rw-r--r--testing/dbmail/dbmail-timsieved.initd39
6 files changed, 224 insertions, 14 deletions
diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD
index ed604dc128..4c90f96088 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 0000000000..832e64046d
--- /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 0000000000..8f6984feb0
--- /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 0000000000..cea3da6dd8
--- /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 0000000000..8c9e7b874a
--- /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 0000000000..325badb29f
--- /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 $?
+}
+