aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/perdition/APKBUILD53
-rw-r--r--main/perdition/perdition.confd50
-rw-r--r--main/perdition/perdition.initd76
-rw-r--r--main/perdition/perdition.post-install4
4 files changed, 183 insertions, 0 deletions
diff --git a/main/perdition/APKBUILD b/main/perdition/APKBUILD
new file mode 100644
index 0000000000..ca7c4a62aa
--- /dev/null
+++ b/main/perdition/APKBUILD
@@ -0,0 +1,53 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=perdition
+pkgver=1.18
+pkgrel=2
+pkgdesc="A Mail retrieval proxy"
+url="http://horms.net/projects/perdition/"
+arch="all"
+license="LGPL"
+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
+subpackages="$pkgname-doc"
+source="http://horms.net/projects/perdition/download/$pkgver/$pkgname-$pkgver.tar.bz2"
+
+
+_builddir="$srcdir"/$pkgname-$pkgver
+
+prepare() {
+ cd "$_builddir"
+ return 0
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-libtool-lock \
+ --disable-mysql \
+ --disable-odbc \
+ --disable-db \
+ --disable-pg \
+ --disable-cdb \
+ --disable-nis \
+ --disable-posix-regex \
+ --disable-ldap \
+ --disable-daemon-map
+
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+
+ install -m755 -D ../../$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
+ install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+}
+
+md5sums="df84d5fc4ab78b94a9baf17c5790ba38 perdition-1.18.tar.bz2"
diff --git a/main/perdition/perdition.confd b/main/perdition/perdition.confd
new file mode 100644
index 0000000000..7b147286eb
--- /dev/null
+++ b/main/perdition/perdition.confd
@@ -0,0 +1,50 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/perdition/files/perdition.confd,v 1.1 2005/01/25 18:07:46 ferdy Exp $
+
+# Run time configuration parameters for /etc/init.d/perdition
+
+# User to run perdition as
+# ( change it only if you know what you're doing )
+PERDITION_USER=perdition
+
+# Where pid files will be stored
+PIDDIR=/var/run/perdition
+
+# Command line parameters to pass to perdition when run in any mode.
+# This is in addition to any mode specific flags.
+# That is, it is in addtion to any command line options supplied
+# by POP3_FLAGS, POP3S_FLAGS, IMAP4_FLAGS or IMAP4S_FLAGS
+FLAGS="-f /etc/perdition/perdition.conf"
+
+# Run an instance of perdition in POP3 mode
+# Set to "yes" to run this instance of perdition
+# Set to any other valye to not run this instance of perdition
+POP3=yes
+
+#Command line parameters to pass to perdition when run in POP3 mode
+POP3_FLAGS=
+
+# Run an instance of perdition in POP3S mode
+# Set to "yes" to run this instance of perdition
+# Set to any other valye to not run this instance of perdition
+POP3S=no
+
+#Command line parameters to pass to perdition when run in POP3S mode
+POP3S_FLAGS=
+
+# Run an instance of perdition in IMAP4 mode
+# Set to "yes" to run this instance of perdition
+# Set to any other valye to not run this instance of perdition
+IMAP4=yes
+
+#Command line parameters to pass to perdition when run in IMAP4 mode
+IMAP4_FLAGS=
+
+# Run an instance of perdition in IMAP4S mode
+# Set to "yes" to run this instance of perdition
+# Set to any other valye to not run this instance of perdition
+IMAP4S=no
+
+#Command line parameters to pass to perdition when run in IMAP4S mode
+IMAP4S_FLAGS=
diff --git a/main/perdition/perdition.initd b/main/perdition/perdition.initd
new file mode 100644
index 0000000000..0242169c4b
--- /dev/null
+++ b/main/perdition/perdition.initd
@@ -0,0 +1,76 @@
+#!/sbin/runscript
+# Copyright 1999-2005 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 $
+
+depend() {
+ need net
+}
+
+
+check_key() {
+ if [ ! -e /etc/perdition/perdition.crt.pem ] ; then
+ einfo "No SSL keys; see man perdition to create them. Or run: "
+ einfo "$ openssl req -new -x509 -nodes -out /etc/perdition/perdition.crt.pem -keyout /etc/perdition/perdition.key.pem -days 365"
+ return 1
+ fi
+}
+
+start() {
+ if [ "${POP3}" = "yes" ]; then
+ ebegin "Starting perdition services (POP3)"
+ start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3 -p ${PIDDIR}/pop3.pid \
+ -- ${FLAGS} ${POP3_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/pop3.pid
+ eend $?
+ fi
+
+ if [ "${POP3S}" = "yes" ]; then
+ check_key || return 1
+ ebegin "Starting perdition services (POP3S)"
+ start-stop-daemon --quiet --start --startas /usr/sbin/perdition.pop3s -p ${PIDDIR}/pop3s.pid \
+ -- ${FLAGS} ${POP3S_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/pop3s.pid
+ eend $?
+ fi
+
+ if [ "${IMAP4}" = "yes" ]; then
+ ebegin "Starting perdition services (IMAP4)"
+ start-stop-daemon --quiet --start --startas /usr/sbin/perdition.imap4 -p ${PIDDIR}/imap4.pid \
+ -- ${FLAGS} ${IMAP4_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/imap4.pid
+ eend $?
+ fi
+
+ if [ "${IMAP4S}" = "yes" ]; then
+ check_key || return 1
+ ebegin "Starting perdition services (IMAP4S)"
+ start-stop-daemon --quiet --start --startas /usr/sbin/perdition.imap4s -p ${PIDDIR}/imap4s.pid \
+ -- ${FLAGS} ${IMAP4S_FLAGS} -u ${PERDITION_USER} --pid_file ${PIDDIR}/imap4s.pid
+ eend $?
+ fi
+}
+
+
+stop() {
+ if [ "${POP3}" = "yes" ]; then
+ ebegin "Shutting down perdition services (POP3)"
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/pop3.pid
+ eend $?
+ fi
+
+ if [ "${POP3S}" = "yes" ]; then
+ ebegin "Shutting down perdition services (POP3S)"
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/pop3s.pid
+ eend $?
+ fi
+
+ if [ "${IMAP4}" = "yes" ]; then
+ ebegin "Shutting down perdition services (IMAP4)"
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imap4.pid
+ eend $?
+ fi
+
+ if [ "${IMAP4S}" = "yes" ]; then
+ ebegin "Shutting down perdition services (IMAP4S)"
+ start-stop-daemon -o --quiet --stop --pidfile ${PIDDIR}/imap4s.pid
+ eend $?
+ fi
+}
diff --git a/main/perdition/perdition.post-install b/main/perdition/perdition.post-install
new file mode 100644
index 0000000000..b2820345e5
--- /dev/null
+++ b/main/perdition/perdition.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+adduser -h /var/run/perdition -s /bin/false -S -D perdition &>/dev/null
+chown perdition /var/run/perdition