aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-04-19 15:40:38 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-04-19 15:40:38 +0000
commitec55037bad13dbda58558be94dd250cd1260239c (patch)
treea9f741f54ab30fd1d654431034cf3b7f9a2c0fcc
parente9a1284b8ca4788f89640f0487ce739d8bb6f1d5 (diff)
downloadalpine_aports-ec55037bad13dbda58558be94dd250cd1260239c.tar.bz2
alpine_aports-ec55037bad13dbda58558be94dd250cd1260239c.tar.xz
alpine_aports-ec55037bad13dbda58558be94dd250cd1260239c.zip
testing/dbmail: new aport
missing init scripts
-rw-r--r--testing/dbmail/APKBUILD63
-rw-r--r--testing/dbmail/code-cleanups.patch64
2 files changed, 127 insertions, 0 deletions
diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD
new file mode 100644
index 0000000000..ed604dc128
--- /dev/null
+++ b/testing/dbmail/APKBUILD
@@ -0,0 +1,63 @@
1# Contributor: Carlo Landmeter <clandmeter@gmail.com>
2# Maintainer:
3pkgname=dbmail
4pkgver=3.0.0_rc2
5_realpkgver=3.0.0-rc2
6pkgrel=0
7pkgdesc="Fast and scalable sql based mail services"
8url="http://dbmail.org"
9arch="all"
10license="GPL"
11depends=
12depends_dev="sqlite-dev mysql-dev postgresql-dev openldap-dev
13 libsieve-dev glib-dev gmime-dev mhash-dev libevent-dev
14 libzdb-dev"
15makedepends="$depends_dev asciidoc xmlto"
16install=""
17subpackages="$pkgname-dev $pkgname-doc"
18source="http://www.dbmail.org/download/3.0/dbmail-3.0.0-rc2.tar.gz
19 code-cleanups.patch"
20
21_builddir="$srcdir/${pkgname}_${_realpkgver}"
22
23prepare() {
24 local i
25 cd "$_builddir"
26 for i in $source; do
27 case $i in
28 *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
29 esac
30 done
31}
32
33build() {
34 cd "$_builddir"
35 ./configure --prefix=/usr \
36 --sysconfdir=/etc \
37 --mandir=/usr/share/man \
38 --infodir=/usr/share/inf \
39 --with-mysql \
40 --with-pgsql \
41 --with-sqlite \
42 --with-sieve \
43 --with-ldap
44 make || return 1
45 #make man pages
46 cd "$_builddir/man"
47 make || return 1
48}
49
50package() {
51 cd "$_builddir"
52 make DESTDIR="$pkgdir" install || return 1
53 install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample
54 mkdir -p "$pkgdir/usr/share/dbmail"
55 mv sql/* "$pkgdir/usr/share/dbmail/"
56 mv dbmail.schema "$pkgdir/usr/share/dbmail/"
57 #install man pages
58 cd "$_builddir/man"
59 make DESTDIR="$pkgdir" install || return 1
60}
61
62md5sums="c4fda2da173ddeda25bcf9e2e57abd1e dbmail-3.0.0-rc2.tar.gz
63b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch"
diff --git a/testing/dbmail/code-cleanups.patch b/testing/dbmail/code-cleanups.patch
new file mode 100644
index 0000000000..83e8f7ea6c
--- /dev/null
+++ b/testing/dbmail/code-cleanups.patch
@@ -0,0 +1,64 @@
1From 6af21775b8c560dd9d65cb2465299a9feae34649 Mon Sep 17 00:00:00 2001
2From: Paul J Stevens <paul@nfg.nl>
3Date: Thu, 14 Apr 2011 14:01:32 +0000
4Subject: cleanups
5
6---
7diff --git a/debian/rules b/debian/rules
8index 7804a1b..f459149 100755
9--- a/debian/rules
10+++ b/debian/rules
11@@ -12,7 +12,7 @@ export SHARED=--enable-static=no
12 export MANPAGES=--enable-manpages=yes
13 export REAL_CLEAN=
14
15-CFLAGS = -Wall -O1
16+CFLAGS = -Wall -std=gnu99 -O1
17 LDFLAGS = -lcrypt
18
19 # These are used for cross-compiling and for saving the configure script
20@@ -27,10 +27,9 @@ ifneq (,$(findstring devel,$(DEB_BUILD_OPTIONS)))
21 export MANPAGES=
22 export SHARED=--enable-shared=no
23 export STATIC=--enable-static=yes
24- export REAL_CLEAN=mrproper
25 export WITH_LDAP=
26 export WITH_SIEVE=
27- CFLAGS = -g -std=gnu99
28+ CFLAGS = -Wall -std=gnu99 -g
29 endif
30 ifneq (,$(findstring ldap,$(DEB_BUILD_OPTIONS)))
31 export WITH_LDAP=--with-ldap
32diff --git a/src/dm_http.c b/src/dm_http.c
33index 4b7d2a6..797e63b 100644
34--- a/src/dm_http.c
35+++ b/src/dm_http.c
36@@ -193,7 +193,7 @@ void Http_getUsers(T R)
37 evbuffer_add_printf(buf, "\n}}\n");
38 }
39
40- if (buf->totallen)
41+ if (EVBUFFER_LENGTH(buf))
42 Request_send(R, HTTP_OK, "OK", buf);
43 else
44 Request_error(R, HTTP_SERVUNAVAIL, "Server error");
45@@ -279,7 +279,7 @@ void Http_getMailboxes(T R)
46 MailboxState_free(&b);
47 }
48
49- if (buf->totallen)
50+ if (EVBUFFER_LENGTH(buf))
51 Request_send(R, HTTP_OK, "OK", buf);
52 else
53 Request_error(R, HTTP_SERVUNAVAIL, "Server error");
54@@ -375,7 +375,7 @@ void Http_getMessages(T R)
55 }
56 }
57
58- if (buf->totallen)
59+ if (EVBUFFER_LENGTH(buf))
60 Request_send(R, HTTP_OK, "OK", buf);
61 else
62 Request_error(R, HTTP_SERVUNAVAIL, "Server error");
63--
64cgit v0.8.3.4