From de82a410d7c65302de84b70d70dbfc50e304d451 Mon Sep 17 00:00:00 2001 From: Leonardo Arena Date: Wed, 11 May 2011 06:18:24 +0000 Subject: testing/permission: new aport A Mail retrieval proxy --- testing/perdition/APKBUILD | 52 +++++++++++++++++++++++++++ testing/perdition/perdition.confd | 50 ++++++++++++++++++++++++++ testing/perdition/perdition.initd | 76 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 178 insertions(+) create mode 100644 testing/perdition/APKBUILD create mode 100644 testing/perdition/perdition.confd create mode 100644 testing/perdition/perdition.initd diff --git a/testing/perdition/APKBUILD b/testing/perdition/APKBUILD new file mode 100644 index 0000000000..82531132a5 --- /dev/null +++ b/testing/perdition/APKBUILD @@ -0,0 +1,52 @@ +# Maintainer: Leonardo Arena +pkgname=perdition +pkgver=1.18 +pkgrel=0 +pkgdesc="A Mail retrieval proxy" +url="http://horms.net/projects/perdition/" +arch="all" +license="GPL" +depends= +depends_dev="gdbm-dev popt-dev vanessa_adt-dev vanessa_logger-dev vanessa_socket-dev" +makedepends="$depends_dev" +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/testing/perdition/perdition.confd b/testing/perdition/perdition.confd new file mode 100644 index 0000000000..7b147286eb --- /dev/null +++ b/testing/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/testing/perdition/perdition.initd b/testing/perdition/perdition.initd new file mode 100644 index 0000000000..0242169c4b --- /dev/null +++ b/testing/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 +} -- cgit v1.2.3