summaryrefslogtreecommitdiffstats
path: root/main/perdition
diff options
context:
space:
mode:
Diffstat (limited to 'main/perdition')
-rw-r--r--main/perdition/APKBUILD17
-rw-r--r--main/perdition/gdbm-version.patch26
-rwxr-xr-x[-rw-r--r--]main/perdition/perdition.initd15
-rw-r--r--main/perdition/perdition.post-install4
-rw-r--r--main/perdition/perdition.pre-install6
5 files changed, 56 insertions, 12 deletions
diff --git a/main/perdition/APKBUILD b/main/perdition/APKBUILD
index 6d4ce2be7..470dc3ba9 100644
--- a/main/perdition/APKBUILD
+++ b/main/perdition/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perdition
pkgver=1.18
-pkgrel=3
+pkgrel=4
pkgdesc="A Mail retrieval proxy"
url="http://horms.net/projects/perdition/"
arch="all"
@@ -10,15 +10,21 @@ depends=
depends_dev="gdbm-dev openssl-dev popt-dev vanessa_adt-dev vanessa_logger-dev
vanessa_socket-dev"
makedepends="$depends_dev"
-install=$pkgname.post-install
+install=$pkgname.pre-install
subpackages="$pkgname-doc"
-source="http://horms.net/projects/perdition/download/$pkgver/$pkgname-$pkgver.tar.bz2"
+source="http://horms.net/projects/perdition/download/$pkgver/$pkgname-$pkgver.tar.bz2
+ gdbm-version.patch"
_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
return 0
}
@@ -28,10 +34,10 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
+ --enable-gdbm \
--disable-libtool-lock \
--disable-mysql \
--disable-odbc \
- --disable-db \
--disable-pg \
--disable-cdb \
--disable-nis \
@@ -51,4 +57,5 @@ package() {
install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}
-md5sums="df84d5fc4ab78b94a9baf17c5790ba38 perdition-1.18.tar.bz2"
+md5sums="df84d5fc4ab78b94a9baf17c5790ba38 perdition-1.18.tar.bz2
+cfdd151cb92d2283151b8e48caf04337 gdbm-version.patch"
diff --git a/main/perdition/gdbm-version.patch b/main/perdition/gdbm-version.patch
new file mode 100644
index 000000000..ae33fd92a
--- /dev/null
+++ b/main/perdition/gdbm-version.patch
@@ -0,0 +1,26 @@
+gdbm.h has a conficting declaration of gdbm_version
+
+diff --git a/makegdbm/options.h b/makegdbm/options.h
+index 51597d1..9019af7 100644
+--- a/makegdbm/options.h
++++ b/makegdbm/options.h
+@@ -39,7 +39,6 @@
+ #endif
+
+ extern gdbm_error gdbm_errno;
+-extern char *gdbm_version;
+
+ #define COPYRIGHT \
+ "(c) 1999 Horms <horms@verge.net.au>\nReleased under the GNU GPL\n"
+diff --git a/perdition/db/gdbm/perditiondb_gdbm.h b/perdition/db/gdbm/perditiondb_gdbm.h
+index 4047025..c23a8db 100644
+--- a/perdition/db/gdbm/perditiondb_gdbm.h
++++ b/perdition/db/gdbm/perditiondb_gdbm.h
+@@ -31,7 +31,6 @@
+ #include <gdbm.h>
+
+ extern gdbm_error gdbm_errno;
+-extern char *gdbm_version;
+
+ #ifndef PERDITIONDB_GDBM_SYSCONFDIR
+ #define PERDITIONDB_GDBM_SYSCONFDIR "/usr/local/etc/perdition"
diff --git a/main/perdition/perdition.initd b/main/perdition/perdition.initd
index 0242169c4..397ed4775 100644..100755
--- a/main/perdition/perdition.initd
+++ b/main/perdition/perdition.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.2 2008/06/10 18:28:27 dertobi123 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.initd,v 1.3 2011/06/15 15:24:06 eras Exp $
depend() {
need net
@@ -16,7 +16,16 @@ check_key() {
fi
}
+checkconfig() {
+ # create PIDDIR (usually /var/run/perdition) if necessary
+ if [ ! -d "${PIDDIR:-/var/run/perdition}" ] ; then
+ checkpath -q -d -o ${PERDITION_USER:-perdition}:${PERDITION_USER:-perdition} \
+ -m 0775 "${PIDDIR:-/var/run/perdition}" || return 1
+ fi
+}
+
start() {
+ checkconfig || return 1
if [ "${POP3}" = "yes" ]; then
ebegin "Starting perdition services (POP3)"
start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3 -p ${PIDDIR}/pop3.pid \
@@ -70,7 +79,7 @@ stop() {
if [ "${IMAP4S}" = "yes" ]; then
ebegin "Shutting down perdition services (IMAP4S)"
- start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imap4s.pid
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imaps.pid
eend $?
fi
}
diff --git a/main/perdition/perdition.post-install b/main/perdition/perdition.post-install
deleted file mode 100644
index b2820345e..000000000
--- a/main/perdition/perdition.post-install
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-adduser -h /var/run/perdition -s /bin/false -S -D perdition &>/dev/null
-chown perdition /var/run/perdition
diff --git a/main/perdition/perdition.pre-install b/main/perdition/perdition.pre-install
new file mode 100644
index 000000000..6396823f8
--- /dev/null
+++ b/main/perdition/perdition.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S perdition 2>/dev/null
+adduser -h /var/run/perdition -s /bin/false -S -G perdition -D perdition 2>/dev/null
+
+exit 0