diff options
author | Ian Leitch <port001@gentoo.org> | 2003-09-11 17:36:52 +0000 |
---|---|---|
committer | Ian Leitch <port001@gentoo.org> | 2003-09-11 17:36:52 +0000 |
commit | 4dc7d98c7d330075114d2e4f51d96d08647fc8d4 (patch) | |
tree | a53d5fe79cdf7c9cbbc9aa78b0761bda18604e76 /net-mail/popa3d | |
parent | New package; popa3d. #28277 (diff) | |
download | gentoo-2-4dc7d98c7d330075114d2e4f51d96d08647fc8d4.tar.gz gentoo-2-4dc7d98c7d330075114d2e4f51d96d08647fc8d4.tar.bz2 gentoo-2-4dc7d98c7d330075114d2e4f51d96d08647fc8d4.zip |
New package; popa3d. #28277
Diffstat (limited to 'net-mail/popa3d')
-rw-r--r-- | net-mail/popa3d/ChangeLog | 10 | ||||
-rw-r--r-- | net-mail/popa3d/Manifest | 3 | ||||
-rw-r--r-- | net-mail/popa3d/files/digest-popa3d-0.6.3 | 3 | ||||
-rw-r--r-- | net-mail/popa3d/files/pam | 4 | ||||
-rw-r--r-- | net-mail/popa3d/files/popa3d-initrc | 19 | ||||
-rw-r--r-- | net-mail/popa3d/metadata.xml | 12 | ||||
-rw-r--r-- | net-mail/popa3d/popa3d-0.6.3.ebuild | 162 |
7 files changed, 212 insertions, 1 deletions
diff --git a/net-mail/popa3d/ChangeLog b/net-mail/popa3d/ChangeLog new file mode 100644 index 000000000000..149a8cba8bac --- /dev/null +++ b/net-mail/popa3d/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for net-mail/popa3d +# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/popa3d/ChangeLog,v 1.1 2003/09/11 17:36:43 port001 Exp $ + +*popa3d-0.6.3 (11 Sep 2003) + + 11 Sep 2003; Ian Leitch <port001@gentoo.org> popa3d-0.6.3.ebuild: + New package, thanks to Hallgrimur H. Gunnarsson <hhg@data.is> bug #28277, + ebuild modified by Hallgrimur and myself. metadata.xml supplied. + diff --git a/net-mail/popa3d/Manifest b/net-mail/popa3d/Manifest index eae5f26d97e5..c9f9bcd80a04 100644 --- a/net-mail/popa3d/Manifest +++ b/net-mail/popa3d/Manifest @@ -1,4 +1,5 @@ -MD5 25af14481c3bed2999bda931fc209314 popa3d-0.6.3.ebuild 4211 +MD5 4574d601f44884845a726b1b3f6938ae popa3d-0.6.3.ebuild 4309 +MD5 63b45d16b65c58df2eec4c7ca0b7a184 ChangeLog 454 MD5 7532ad037ec89f8de600eee3de8f073e metadata.xml 328 MD5 6e6b9368bd2cafab8d90bde76f5011b7 files/pam 136 MD5 dbeb5d9274a4b4e9093e94a1e8642d07 files/popa3d-initrc 385 diff --git a/net-mail/popa3d/files/digest-popa3d-0.6.3 b/net-mail/popa3d/files/digest-popa3d-0.6.3 new file mode 100644 index 000000000000..940382954d6c --- /dev/null +++ b/net-mail/popa3d/files/digest-popa3d-0.6.3 @@ -0,0 +1,3 @@ +MD5 cceb80f90d0fc1f85fdb5cf7472afe9e popa3d-0.6.3.tar.gz 31551 +MD5 e0f3bc79b0fb6b91bb60957448ad419f popa3d-0.6.3-vname-2.diff 2128 +MD5 3f44bf9519c20afa98ea0dffb30300ed popa3d-0.5.9-maildir-2.diff 9978 diff --git a/net-mail/popa3d/files/pam b/net-mail/popa3d/files/pam new file mode 100644 index 000000000000..b69741c55a2a --- /dev/null +++ b/net-mail/popa3d/files/pam @@ -0,0 +1,4 @@ +#%PAM-1.0 + +auth required /lib/security/pam_stack.so service=system-auth +account required /lib/security/pam_stack.so service=system-auth diff --git a/net-mail/popa3d/files/popa3d-initrc b/net-mail/popa3d/files/popa3d-initrc new file mode 100644 index 000000000000..b1fb2719d59f --- /dev/null +++ b/net-mail/popa3d/files/popa3d-initrc @@ -0,0 +1,19 @@ +#!/sbin/runscript +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need net +} + +start() { + ebegin "Starting popa3d" + start-stop-daemon --start --quiet --exec /usr/sbin/popa3d -- -D + eend $? +} + +stop() { + ebegin "Stopping popa3d" + start-stop-daemon --stop --quiet --exec /usr/sbin/popa3d + eend $? +} diff --git a/net-mail/popa3d/metadata.xml b/net-mail/popa3d/metadata.xml new file mode 100644 index 000000000000..50fde97bfeae --- /dev/null +++ b/net-mail/popa3d/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>net-mail</herd> +<maintainer> + <email>port001@gentoo.org</email> + <name>Ian Leitch</name> +</maintainer> +<longdescription> + A security oriented POP3 server. +</longdescription> +</pkgmetadata> diff --git a/net-mail/popa3d/popa3d-0.6.3.ebuild b/net-mail/popa3d/popa3d-0.6.3.ebuild new file mode 100644 index 000000000000..1ac47ff4a3a4 --- /dev/null +++ b/net-mail/popa3d/popa3d-0.6.3.ebuild @@ -0,0 +1,162 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/popa3d/popa3d-0.6.3.ebuild,v 1.1 2003/09/11 17:36:44 port001 Exp $ + +# +# Mailbox format is determined by the 'mbox' and 'maildir' +# system USE flags. +# +# Mailbox path configuration denoted by the system USE +# flags. +# +# USE flag 'maildir' denotes ~/.maildir +# USE flag 'mbox' denotes /var/mail/username +# +# You can overwrite this by setting the POPA3D_HOME_MAILBOX +# environmental variable (see below) before emerge. +# +# Environmental variables. +# +# POPA3D_HOME_MAILBOX +# +# Overwrite the local user mailbox path. For example +# if you want qmail-styled ~/Mailbox you can set it +# to "Mailbox". For the traditional (although not in +# gentoo Maildir) set it to "Maildir". +# +# POPA3D_VIRTUAL_ONLY +# +# Set this field to "YES" if you dont want local users +# to have POP access. Setting this makes the POPA3D_HOME_MAILBOX +# variable effectively useless. +# +# POPA3D_VIRTUAL_HOME_PATH +# +# Set this field to the base virtual home path. For more information +# read the virtual guide here: http://forums.gentoo.org/viewtopic.php?t=82386 +# + +IUSE="pam mbox maildir" + +DESCRIPTION="A security oriented POP3 server." +HOMEPAGE="http://www.openwall.com/popa3d/" + +SRC_URI="http://www.openwall.com/popa3d/${P}.tar.gz + http://www.data.is/~hhg/popa3d/${P}-vname-2.diff + maildir? ( http://www.data.is/~hhg/popa3d/popa3d-0.5.9-maildir-2.diff )" + +LICENSE="as-is" +SLOT="0" +KEYWORDS="x86" + +DEPEND=">=sys-apps/sed-4 + pam? ( >=sys-libs/pam-0.72 )" + +pkg_setup() { + if use mbox && use maildir ; then + echo + eerror + eerror "You must choose between mbox or maildir," + eerror "both cannot be used together." + eerror + die "Both mbox and maildir specified." + fi + + echo + ewarn + ewarn "You can customize this ebuild with environmental variables." + ewarn "If you don't I'll assume sensible defaults." + ewarn + ewarn "See inside for details." + ewarn + echo + sleep 5 + + if ! grep -q ^popa3d: /etc/group ; then + groupadd popa3d || die "Failed to add group: popa3d" + fi + + if ! grep -q ^popa3d: /etc/passwd ; then + useradd -g popa3d -d /dev/null -s /dev/null popa3d || die "Failed to add user: popa3d" + fi +} + +src_unpack() { + unpack ${P}.tar.gz +} + +src_compile() { + cd ${S} + + epatch ${DISTDIR}/popa3d-0.6.3-vname-2.diff + + if use mbox ; then + einfo "Mailbox format is: MAILBOX." + else + epatch ${DISTDIR}/popa3d-0.5.9-maildir-2.diff + einfo "Mailbox format is: MAILDIR." + if [ "${POPA3D_HOME_MAILBOX}" = "" ] ; then + POPA3D_HOME_MAILBOX=".maildir" + fi + fi + + if [ "${POPA3D_HOME_MAILBOX}" != "" ] ; then + einfo "Mailbox path: ~/$POPA3D_HOME_MAILBOX" + sleep 2 + sed -i -e "s:^\(#define MAIL_SPOOL_PATH.*\)$://\1:" params.h + sed -i -e "s:^#define HOME_MAILBOX_NAME.*$:#define HOME_MAILBOX_NAME \"${POPA3D_HOME_MAILBOX}\":" params.h + else + einfo "Mailbox path: /var/mail/username" + fi + + if [ "${POPA3D_VIRTUAL_ONLY}" = "YES" ] ; then + einfo "Virtual only, no local system users" + sed -i -e "s:^#define VIRTUAL_ONLY.*$:#define VIRTUAL_ONLY 1:" params.h + fi + + if [ "${POPA3D_VIRTUAL_HOME_PATH}" != "" ] ; then + einfo "Virtual home path set to: $POPA3D_VIRTUAL_HOME_PATH" + sed -i -e "s:^#define VIRTUAL_HOME_PATH.*$:#define VIRTUAL_HOME_PATH \"$POPA3D_VIRTUAL_HOME_PATH\":" params.h + fi + + if [ "$POPA3D_VIRTUAL_ONLY" = "YES" ] ; then + einfo "Authentication method: Virtual." + elif use pam ; then + einfo "Authentication method: PAM." + LIBS="${LIBS} -lpam" + sed -i -e "s:^#define AUTH_SHADOW .*$:#define AUTH_SHADOW 0:" params.h + sed -i -e "s:^#define AUTH_PAM .*$:#define AUTH_PAM 1:" params.h + else + einfo "Authentication method: Shadow." + fi + + sed -i -e "s:^#define POP_STANDALONE.*$:#define POP_STANDALONE 1:" params.h + sed -i -e "s:^#define POP_VIRTUAL.*$:#define POP_VIRTUAL 1:" params.h + sed -i -e "s:^#define VIRTUAL_VNAME.*$:#define VIRTUAL_VNAME 1:" params.h + + emake LIBS="${LIBS} -lcrypt" || die "emake failed" +} + +src_install() { + into /usr + + dosbin popa3d + doman popa3d.8 + dodoc DESIGN INSTALL CHANGES VIRTUAL CONTACT + + diropts -m 755 + dodir /var/empty + + exeinto /etc/init.d + newexe ${FILESDIR}/popa3d-initrc popa3d + + if use pam ; then + insinto /etc/pam.d + newins ${FILESDIR}/pam popa3d + fi +} + +pkg_postinst() { + einfo "Running depscan.sh..." + /sbin/depscan.sh +} |