diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2011-04-19 19:25:23 +0000 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2011-04-19 19:26:32 +0000 |
commit | 983a11e3031ce51a0c7b0ded0d48713d48474522 (patch) | |
tree | 8f5d01642361d9a373fc8543792a6deef41ae641 | |
parent | 57026c20e519d54529d0b8256cdde3eeb6116d0a (diff) | |
download | alpine_aports-983a11e3031ce51a0c7b0ded0d48713d48474522.tar.bz2 alpine_aports-983a11e3031ce51a0c7b0ded0d48713d48474522.tar.xz alpine_aports-983a11e3031ce51a0c7b0ded0d48713d48474522.zip |
testing/dbmail: add initd scripts
-rw-r--r-- | testing/dbmail/APKBUILD | 39 | ||||
-rw-r--r-- | testing/dbmail/dbmail-httpd.initd | 40 | ||||
-rw-r--r-- | testing/dbmail/dbmail-imapd.initd | 40 | ||||
-rw-r--r-- | testing/dbmail/dbmail-lmtpd.initd | 40 | ||||
-rw-r--r-- | testing/dbmail/dbmail-pop3d.initd | 40 | ||||
-rw-r--r-- | testing/dbmail/dbmail-timsieved.initd | 39 |
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 @@ | |||
3 | pkgname=dbmail | 3 | pkgname=dbmail |
4 | pkgver=3.0.0_rc2 | 4 | pkgver=3.0.0_rc2 |
5 | _realpkgver=3.0.0-rc2 | 5 | _realpkgver=3.0.0-rc2 |
6 | pkgrel=0 | 6 | pkgrel=1 |
7 | pkgdesc="Fast and scalable sql based mail services" | 7 | pkgdesc="Fast and scalable sql based mail services" |
8 | url="http://dbmail.org" | 8 | url="http://dbmail.org" |
9 | arch="all" | 9 | arch="all" |
10 | license="GPL" | 10 | license="GPL" |
11 | depends= | 11 | depends= |
12 | depends_dev="sqlite-dev mysql-dev postgresql-dev openldap-dev | 12 | depends_dev="openldap-dev libsieve-dev glib-dev gmime-dev |
13 | libsieve-dev glib-dev gmime-dev mhash-dev libevent-dev | 13 | mhash-dev libevent-dev libzdb-dev" |
14 | libzdb-dev" | ||
15 | makedepends="$depends_dev asciidoc xmlto" | 14 | makedepends="$depends_dev asciidoc xmlto" |
16 | install="" | 15 | install="" |
17 | subpackages="$pkgname-dev $pkgname-doc" | 16 | subpackages="$pkgname-dev $pkgname-doc" |
18 | source="http://www.dbmail.org/download/3.0/dbmail-3.0.0-rc2.tar.gz | 17 | source="http://www.dbmail.org/download/3.0/dbmail-3.0.0-rc2.tar.gz |
19 | code-cleanups.patch" | 18 | code-cleanups.patch |
19 | $pkgname-imapd.initd | ||
20 | $pkgname-lmtpd.initd | ||
21 | $pkgname-pop3d.initd | ||
22 | $pkgname-httpd.initd | ||
23 | $pkgname-timsieved.initd | ||
24 | " | ||
20 | 25 | ||
21 | _builddir="$srcdir/${pkgname}_${_realpkgver}" | 26 | _builddir="$srcdir/${pkgname}_${_realpkgver}" |
22 | 27 | ||
@@ -35,10 +40,7 @@ build() { | |||
35 | ./configure --prefix=/usr \ | 40 | ./configure --prefix=/usr \ |
36 | --sysconfdir=/etc \ | 41 | --sysconfdir=/etc \ |
37 | --mandir=/usr/share/man \ | 42 | --mandir=/usr/share/man \ |
38 | --infodir=/usr/share/inf \ | 43 | --infodir=/usr/share/info \ |
39 | --with-mysql \ | ||
40 | --with-pgsql \ | ||
41 | --with-sqlite \ | ||
42 | --with-sieve \ | 44 | --with-sieve \ |
43 | --with-ldap | 45 | --with-ldap |
44 | make || return 1 | 46 | make || return 1 |
@@ -50,14 +52,23 @@ build() { | |||
50 | package() { | 52 | package() { |
51 | cd "$_builddir" | 53 | cd "$_builddir" |
52 | make DESTDIR="$pkgdir" install || return 1 | 54 | make DESTDIR="$pkgdir" install || return 1 |
53 | install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample | 55 | install -Dm644 "$pkgname.conf" "$pkgdir/etc/$pkgname.conf.sample" |
54 | mkdir -p "$pkgdir/usr/share/dbmail" | 56 | mkdir -p "$pkgdir/usr/share/$pkgname" |
55 | mv sql/* "$pkgdir/usr/share/dbmail/" | 57 | mv sql/* "$pkgdir/usr/share/$pkgname/" |
56 | mv dbmail.schema "$pkgdir/usr/share/dbmail/" | 58 | mv "$pkgname.schema" "$pkgdir/usr/share/$pkgname/" |
59 | for i in imapd lmtpd pop3d httpd timsieved; do | ||
60 | install -Dm755 "$srcdir/$pkgname-$i.initd" \ | ||
61 | "$pkgdir/etc/init.d/dbmail-$i" || return 1 | ||
62 | done | ||
57 | #install man pages | 63 | #install man pages |
58 | cd "$_builddir/man" | 64 | cd "$_builddir/man" |
59 | make DESTDIR="$pkgdir" install || return 1 | 65 | make DESTDIR="$pkgdir" install || return 1 |
60 | } | 66 | } |
61 | 67 | ||
62 | md5sums="c4fda2da173ddeda25bcf9e2e57abd1e dbmail-3.0.0-rc2.tar.gz | 68 | md5sums="c4fda2da173ddeda25bcf9e2e57abd1e dbmail-3.0.0-rc2.tar.gz |
63 | b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch" | 69 | b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch |
70 | 76a0f8f96ca70a4af14c81716134cc5d dbmail-imapd.initd | ||
71 | a6d79d7f0cf0fb80ef2ada71c25d9350 dbmail-lmtpd.initd | ||
72 | 504dd74912daeea4268f8c25ddf6de0f dbmail-pop3d.initd | ||
73 | 42ac86844fedf5d1afec764170e6a5de dbmail-httpd.initd | ||
74 | 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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # | ||
3 | |||
4 | PIDFILE="/var/run/dbmail-httpd.pid" | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | use mysql | ||
9 | use pgsql | ||
10 | after mta | ||
11 | } | ||
12 | |||
13 | checkconfig() { | ||
14 | if [ ! -e "/etc/dbmail/dbmail.conf" ]; then | ||
15 | eerror "You need to create apropriate config" | ||
16 | eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" | ||
17 | return 1 | ||
18 | fi | ||
19 | # Avoid using root's TMPDIR | ||
20 | unset TMPDIR | ||
21 | } | ||
22 | |||
23 | |||
24 | start() { | ||
25 | checkconfig && \ | ||
26 | ebegin "Starting DBMail HTTP daemon" | ||
27 | start-stop-daemon --start --quiet \ | ||
28 | --exec /usr/sbin/dbmail-httpd \ | ||
29 | --name dbmail-httpd \ | ||
30 | -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 | ||
31 | eend $? | ||
32 | } | ||
33 | |||
34 | stop() { | ||
35 | ebegin "Stopping DBMail HTTP daemon" | ||
36 | start-stop-daemon --stop --quiet --retry 5 \ | ||
37 | --pidfile ${PIDFILE} | ||
38 | eend $? | ||
39 | } | ||
40 | |||
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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # | ||
3 | |||
4 | PIDFILE="/var/run/dbmail-imapd.pid" | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | use mysql | ||
9 | use pgsql | ||
10 | after mta | ||
11 | } | ||
12 | |||
13 | checkconfig() { | ||
14 | if [ ! -e "/etc/dbmail/dbmail.conf" ]; then | ||
15 | eerror "You need to create apropriate config" | ||
16 | eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" | ||
17 | return 1 | ||
18 | fi | ||
19 | # Avoid using root's TMPDIR | ||
20 | unset TMPDIR | ||
21 | } | ||
22 | |||
23 | |||
24 | start() { | ||
25 | checkconfig && \ | ||
26 | ebegin "Starting DBMail IMAP daemon" | ||
27 | start-stop-daemon --start --quiet \ | ||
28 | --exec /usr/sbin/dbmail-imapd \ | ||
29 | --name dbmail-imapd \ | ||
30 | -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 | ||
31 | eend $? | ||
32 | } | ||
33 | |||
34 | stop() { | ||
35 | ebegin "Stopping DBMail IMAP daemon" | ||
36 | start-stop-daemon --stop --quiet --retry 5 \ | ||
37 | --pidfile ${PIDFILE} | ||
38 | eend $? | ||
39 | } | ||
40 | |||
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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # | ||
3 | |||
4 | PIDFILE="/var/run/dbmail-lmtpd.pid" | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | use mysql | ||
9 | use pgsql | ||
10 | after mta | ||
11 | } | ||
12 | |||
13 | checkconfig() { | ||
14 | if [ ! -e "/etc/dbmail/dbmail.conf" ]; then | ||
15 | eerror "You need to create apropriate config" | ||
16 | eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" | ||
17 | return 1 | ||
18 | fi | ||
19 | # Avoid using root's TMPDIR | ||
20 | unset TMPDIR | ||
21 | } | ||
22 | |||
23 | |||
24 | start() { | ||
25 | checkconfig && \ | ||
26 | ebegin "Starting DBMail LMTP daemon" | ||
27 | start-stop-daemon --start --quiet \ | ||
28 | --exec /usr/sbin/dbmail-lmtpd \ | ||
29 | --name dbmail-lmtpd \ | ||
30 | -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 | ||
31 | eend $? | ||
32 | } | ||
33 | |||
34 | stop() { | ||
35 | ebegin "Stopping DBMail LMTP daemon" | ||
36 | start-stop-daemon --stop --quiet --retry 5 \ | ||
37 | --pidfile ${PIDFILE} | ||
38 | eend $? | ||
39 | } | ||
40 | |||
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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # | ||
3 | |||
4 | PIDFILE="/var/run/dbmail-pop3d.pid" | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | use mysql | ||
9 | use pgsql | ||
10 | after mta | ||
11 | } | ||
12 | |||
13 | checkconfig() { | ||
14 | if [ ! -e "/etc/dbmail/dbmail.conf" ]; then | ||
15 | eerror "You need to create apropriate config" | ||
16 | eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" | ||
17 | return 1 | ||
18 | fi | ||
19 | # Avoid using root's TMPDIR | ||
20 | unset TMPDIR | ||
21 | } | ||
22 | |||
23 | |||
24 | start() { | ||
25 | checkconfig && \ | ||
26 | ebegin "Starting DBMail POP3 daemon" | ||
27 | start-stop-daemon --start --quiet \ | ||
28 | --exec /usr/sbin/dbmail-pop3d \ | ||
29 | --name dbmail-pop3d \ | ||
30 | -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 | ||
31 | eend $? | ||
32 | } | ||
33 | |||
34 | stop() { | ||
35 | ebegin "Stopping DBMail POP3 daemon" | ||
36 | start-stop-daemon --stop --quiet --retry 5 \ | ||
37 | --pidfile ${PIDFILE} | ||
38 | eend $? | ||
39 | } | ||
40 | |||
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 @@ | |||
1 | #!/sbin/runscript | ||
2 | # | ||
3 | |||
4 | PIDFILE="/var/run/dbmail-timsieved.pid" | ||
5 | |||
6 | depend() { | ||
7 | need net | ||
8 | use mysql | ||
9 | use pgsql | ||
10 | after mta | ||
11 | } | ||
12 | |||
13 | checkconfig() { | ||
14 | if [ ! -e "/etc/dbmail/dbmail.conf" ]; then | ||
15 | eerror "You need to create apropriate config" | ||
16 | eerror "in /etc/dbmail/ . Example can be found in /etc/dbmail/dbmail.conf.dist" | ||
17 | return 1 | ||
18 | fi | ||
19 | # Avoid using root's TMPDIR | ||
20 | unset TMPDIR | ||
21 | } | ||
22 | |||
23 | |||
24 | start() { | ||
25 | checkconfig && \ | ||
26 | ebegin "Starting DBMail SIEVE daemon" | ||
27 | start-stop-daemon --start --quiet \ | ||
28 | --exec /usr/sbin/dbmail-timsieved \ | ||
29 | -- -p ${PIDFILE} -f /etc/dbmail/dbmail.conf 2>&1 | ||
30 | eend $? | ||
31 | } | ||
32 | |||
33 | stop() { | ||
34 | ebegin "Stopping DBMail SIEVE daemon" | ||
35 | start-stop-daemon --stop --quiet --retry 5 \ | ||
36 | --pidfile ${PIDFILE} | ||
37 | eend $? | ||
38 | } | ||
39 | |||