summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando J. Pereda <ferdy@gentoo.org>2005-02-11 13:29:54 +0000
committerFernando J. Pereda <ferdy@gentoo.org>2005-02-11 13:29:54 +0000
commit200b08a773cc2ccee1ec5d8b420a74bb434289c2 (patch)
treea55b7844452bed47b847b431701f539faee44896 /net-mail/mailbase/mailbase-0.00-r8.ebuild
parentBump to x86 stable (diff)
downloadgentoo-2-200b08a773cc2ccee1ec5d8b420a74bb434289c2.tar.gz
gentoo-2-200b08a773cc2ccee1ec5d8b420a74bb434289c2.tar.bz2
gentoo-2-200b08a773cc2ccee1ec5d8b420a74bb434289c2.zip
Revision bump. Handle instalation of pam.d files with newins instead of using cp
(Portage version: 2.0.51-r15)
Diffstat (limited to 'net-mail/mailbase/mailbase-0.00-r8.ebuild')
-rw-r--r--net-mail/mailbase/mailbase-0.00-r8.ebuild82
1 files changed, 82 insertions, 0 deletions
diff --git a/net-mail/mailbase/mailbase-0.00-r8.ebuild b/net-mail/mailbase/mailbase-0.00-r8.ebuild
new file mode 100644
index 000000000000..9bab4f2f8354
--- /dev/null
+++ b/net-mail/mailbase/mailbase-0.00-r8.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailbase/mailbase-0.00-r8.ebuild,v 1.1 2005/02/11 13:29:53 ferdy Exp $
+
+DESCRIPTION="MTA layout package"
+SRC_URI=""
+HOMEPAGE="http://www.gentoo.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~ppc64 ~s390 ~ppc-macos"
+IUSE=""
+
+DEPEND=""
+
+S=${WORKDIR}
+
+pkg_setup() {
+ local filestoremove=0;
+ local lineorig=`head -n 1 ${FILESDIR}/common-pamd`
+ local lineold=""
+
+ einfo "Checking for possible file collisions..."
+
+ for i in pop pop3 pop3s pops imap imap4 imap4s imaps;
+ do
+ if [[ -e ${ROOT}/etc/pam.d/${i} ]]
+ then
+ lineold="`head -n 1 ${ROOT}/etc/pam.d/${i}`"
+
+ if [[ "${lineorig}" != "${lineold}" ]]
+ then
+ ewarn "${ROOT}/etc/pam.d/${i} exists and wasn't provided by mailbase"
+ (( filestoremove++ ))
+ fi
+ fi
+ done
+
+ if [[ filestoremove -gt 0 ]]
+ then
+ echo
+ einfo "Those files listed above have to be removed in order to"
+ einfo " install this version of mailbase."
+ echo
+ ewarn "If you edited them, remember to backup and when restoring make"
+ ewarn " sure the first line in each file is:"
+ einfo ${lineorig}
+ die "Can't be installed, files will collide"
+ else
+ einfo "... everything looks ok"
+ fi
+}
+
+src_install() {
+ dodir /etc/mail
+ insinto /etc/mail
+ doins ${FILESDIR}/aliases
+ insinto /etc/
+ doins ${FILESDIR}/mailcap
+
+ keepdir /var/spool/mail
+ fowners root:mail /var/spool/mail
+ fperms 0775 /var/spool/mail
+ dosym /var/spool/mail /var/mail
+
+ insinto /etc/pam.d/
+ for i in pop pop3 pop3d pops imap imap4 imap4s imaps;
+ do
+ newins ${FILESDIR}/common-pamd ${i}
+ done
+}
+
+pkg_postinst() {
+ if [ ! -d ${ROOT}/var/spool/mail ]
+ then
+ mkdir -p ${ROOT}/var/spool/mail
+ fi
+
+ # Always set these to close bug #8029.
+ chown root:mail ${ROOT}/var/spool/mail
+ chmod 0775 ${ROOT}/var/spool/mail
+}