From ec55037bad13dbda58558be94dd250cd1260239c Mon Sep 17 00:00:00 2001 From: Carlo Landmeter Date: Tue, 19 Apr 2011 15:40:38 +0000 Subject: testing/dbmail: new aport missing init scripts --- testing/dbmail/APKBUILD | 63 +++++++++++++++++++++++++++++++++++++ testing/dbmail/code-cleanups.patch | 64 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 testing/dbmail/APKBUILD create mode 100644 testing/dbmail/code-cleanups.patch diff --git a/testing/dbmail/APKBUILD b/testing/dbmail/APKBUILD new file mode 100644 index 000000000..ed604dc12 --- /dev/null +++ b/testing/dbmail/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Carlo Landmeter +# Maintainer: +pkgname=dbmail +pkgver=3.0.0_rc2 +_realpkgver=3.0.0-rc2 +pkgrel=0 +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" +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" + +_builddir="$srcdir/${pkgname}_${_realpkgver}" + +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/inf \ + --with-mysql \ + --with-pgsql \ + --with-sqlite \ + --with-sieve \ + --with-ldap + make || return 1 + #make man pages + cd "$_builddir/man" + make || return 1 +} + +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 man pages + cd "$_builddir/man" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="c4fda2da173ddeda25bcf9e2e57abd1e dbmail-3.0.0-rc2.tar.gz +b482ba661bb4b1b6fe50e303f37b2336 code-cleanups.patch" diff --git a/testing/dbmail/code-cleanups.patch b/testing/dbmail/code-cleanups.patch new file mode 100644 index 000000000..83e8f7ea6 --- /dev/null +++ b/testing/dbmail/code-cleanups.patch @@ -0,0 +1,64 @@ +From 6af21775b8c560dd9d65cb2465299a9feae34649 Mon Sep 17 00:00:00 2001 +From: Paul J Stevens +Date: Thu, 14 Apr 2011 14:01:32 +0000 +Subject: cleanups + +--- +diff --git a/debian/rules b/debian/rules +index 7804a1b..f459149 100755 +--- a/debian/rules ++++ b/debian/rules +@@ -12,7 +12,7 @@ export SHARED=--enable-static=no + export MANPAGES=--enable-manpages=yes + export REAL_CLEAN= + +-CFLAGS = -Wall -O1 ++CFLAGS = -Wall -std=gnu99 -O1 + LDFLAGS = -lcrypt + + # These are used for cross-compiling and for saving the configure script +@@ -27,10 +27,9 @@ ifneq (,$(findstring devel,$(DEB_BUILD_OPTIONS))) + export MANPAGES= + export SHARED=--enable-shared=no + export STATIC=--enable-static=yes +- export REAL_CLEAN=mrproper + export WITH_LDAP= + export WITH_SIEVE= +- CFLAGS = -g -std=gnu99 ++ CFLAGS = -Wall -std=gnu99 -g + endif + ifneq (,$(findstring ldap,$(DEB_BUILD_OPTIONS))) + export WITH_LDAP=--with-ldap +diff --git a/src/dm_http.c b/src/dm_http.c +index 4b7d2a6..797e63b 100644 +--- a/src/dm_http.c ++++ b/src/dm_http.c +@@ -193,7 +193,7 @@ void Http_getUsers(T R) + evbuffer_add_printf(buf, "\n}}\n"); + } + +- if (buf->totallen) ++ if (EVBUFFER_LENGTH(buf)) + Request_send(R, HTTP_OK, "OK", buf); + else + Request_error(R, HTTP_SERVUNAVAIL, "Server error"); +@@ -279,7 +279,7 @@ void Http_getMailboxes(T R) + MailboxState_free(&b); + } + +- if (buf->totallen) ++ if (EVBUFFER_LENGTH(buf)) + Request_send(R, HTTP_OK, "OK", buf); + else + Request_error(R, HTTP_SERVUNAVAIL, "Server error"); +@@ -375,7 +375,7 @@ void Http_getMessages(T R) + } + } + +- if (buf->totallen) ++ if (EVBUFFER_LENGTH(buf)) + Request_send(R, HTTP_OK, "OK", buf); + else + Request_error(R, HTTP_SERVUNAVAIL, "Server error"); +-- +cgit v0.8.3.4 -- cgit v1.2.3