summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2018-04-05 14:07:29 +0300
committerEray Aslan <eras@gentoo.org>2018-04-05 14:07:29 +0300
commit58d2aaeaf1e56c989f72deda4e6c773171c9d420 (patch)
tree5c3345bcc8d9fc8a4cffb387de2230539db25306 /net-mail
parentsys-auth/pam_yubico: Removed old. (diff)
downloadgentoo-58d2aaeaf1e56c989f72deda4e6c773171c9d420.tar.gz
gentoo-58d2aaeaf1e56c989f72deda4e6c773171c9d420.tar.bz2
gentoo-58d2aaeaf1e56c989f72deda4e6c773171c9d420.zip
net-mail/mailbase: EAPI bump
Package-Manager: Portage-2.3.28, Repoman-2.3.9
Diffstat (limited to 'net-mail')
-rw-r--r--net-mail/mailbase/mailbase-1.3.ebuild66
1 files changed, 66 insertions, 0 deletions
diff --git a/net-mail/mailbase/mailbase-1.3.ebuild b/net-mail/mailbase/mailbase-1.3.ebuild
new file mode 100644
index 000000000000..6a3ab7e4c86d
--- /dev/null
+++ b/net-mail/mailbase/mailbase-1.3.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit pam eutils user
+
+DESCRIPTION="MTA layout package"
+SRC_URI=""
+HOMEPAGE="https://www.gentoo.org/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="pam"
+
+RDEPEND="pam? ( virtual/pam )"
+
+S=${WORKDIR}
+
+pkg_setup() {
+ enewgroup mail 12
+ enewuser mail 8 -1 /var/spool/mail mail
+ enewuser postmaster 14 -1 /var/spool/mail
+}
+
+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 03775 /var/spool/mail
+ dosym spool/mail /var/mail
+
+ newpamd "${FILESDIR}"/common-pamd-include pop
+ newpamd "${FILESDIR}"/common-pamd-include imap
+ if use pam ; then
+ local p
+ for p in pop3 pop3s pops ; do
+ dosym pop /etc/pam.d/${p}
+ done
+ for p in imap4 imap4s imaps ; do
+ dosym imap /etc/pam.d/${p}
+ done
+ fi
+}
+
+get_permissions_oct() {
+ if [[ ${USERLAND} = GNU ]] ; then
+ stat -c%a "${ROOT}$1"
+ elif [[ ${USERLAND} = BSD ]] ; then
+ stat -f%p "${ROOT}$1" | cut -c 3-
+ fi
+}
+
+pkg_postinst() {
+ # bug 614396
+ if [[ "$(get_permissions_oct /var/spool/mail)" != "3775" ]] ; then
+ einfo "Fixing ${ROOT}var/spool/mail/ permissions"
+ chown root:mail "${ROOT}var/spool/mail/"
+ chmod 03775 "${ROOT}var/spool/mail/"
+ fi
+}