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