Commit de82a410 authored by Leonardo Arena's avatar Leonardo Arena
Browse files

testing/permission: new aport

A Mail retrieval proxy
parent 07fcabcb
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
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"
# 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=
#!/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
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment