Gentoo Archives: gentoo-commits

From: Eray Aslan <eras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/mailbase/
Date: Tue, 25 Sep 2018 05:29:15
Message-Id: 1537853326.ceb8405e2422b24627a1badfdad48bcb1ec4cd39.eras@gentoo
1 commit: ceb8405e2422b24627a1badfdad48bcb1ec4cd39
2 Author: Eray Aslan <eras <AT> gentoo <DOT> org>
3 AuthorDate: Tue Sep 25 05:28:46 2018 +0000
4 Commit: Eray Aslan <eras <AT> gentoo <DOT> org>
5 CommitDate: Tue Sep 25 05:28:46 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ceb8405e
7
8 net-mail/mailbase: EAPI7: ROOT does not end in /
9
10 Closes: https://bugs.gentoo.org/666942
11 Package-Manager: Portage-2.3.50, Repoman-2.3.11
12
13 net-mail/mailbase/mailbase-1.5.ebuild | 67 +++++++++++++++++++++++++++++++++++
14 1 file changed, 67 insertions(+)
15
16 diff --git a/net-mail/mailbase/mailbase-1.5.ebuild b/net-mail/mailbase/mailbase-1.5.ebuild
17 new file mode 100644
18 index 00000000000..898d804dc88
19 --- /dev/null
20 +++ b/net-mail/mailbase/mailbase-1.5.ebuild
21 @@ -0,0 +1,67 @@
22 +# Copyright 1999-2018 Gentoo Authors
23 +# Distributed under the terms of the GNU General Public License v2
24 +
25 +EAPI=7
26 +inherit pam user
27 +
28 +DESCRIPTION="MTA layout package"
29 +SRC_URI=""
30 +HOMEPAGE="https://www.gentoo.org/"
31 +
32 +LICENSE="GPL-2"
33 +SLOT="0"
34 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
35 +IUSE="pam"
36 +
37 +RDEPEND="pam? ( virtual/pam )"
38 +
39 +S=${WORKDIR}
40 +
41 +pkg_setup() {
42 + enewgroup mail 12
43 + enewuser mail 8 -1 /var/spool/mail mail
44 + enewuser postmaster 14 -1 /var/spool/mail
45 +}
46 +
47 +src_install() {
48 + dodir /etc/mail
49 + insinto /etc/mail
50 + doins "${FILESDIR}"/aliases
51 + insinto /etc
52 + doins "${FILESDIR}"/mailcap
53 + doman "${FILESDIR}"/mailcap.5
54 +
55 + keepdir /var/spool/mail
56 + fowners root:mail /var/spool/mail
57 + fperms 03775 /var/spool/mail
58 + dosym spool/mail /var/mail
59 +
60 + newpamd "${FILESDIR}"/common-pamd-include pop
61 + newpamd "${FILESDIR}"/common-pamd-include imap
62 + if use pam ; then
63 + local p
64 + for p in pop3 pop3s pops ; do
65 + dosym pop /etc/pam.d/${p}
66 + done
67 + for p in imap4 imap4s imaps ; do
68 + dosym imap /etc/pam.d/${p}
69 + done
70 + fi
71 +}
72 +
73 +get_permissions_oct() {
74 + if [[ ${USERLAND} = GNU ]] ; then
75 + stat -c%a "${ROOT}$1"
76 + elif [[ ${USERLAND} = BSD ]] ; then
77 + stat -f%p "${ROOT}$1" | cut -c 3-
78 + fi
79 +}
80 +
81 +pkg_postinst() {
82 + # bug 614396
83 + if [[ "$(get_permissions_oct /var/spool/mail)" != "3775" ]] ; then
84 + einfo "Fixing ${ROOT}/var/spool/mail/ permissions"
85 + chown root:mail "${ROOT}/var/spool/mail/"
86 + chmod 03775 "${ROOT}/var/spool/mail/"
87 + fi
88 +}