/[gentoo-x86]/www-apps/postfixadmin/postfixadmin-2.3.2.ebuild
Gentoo

Contents of /www-apps/postfixadmin/postfixadmin-2.3.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Tue Jun 26 12:12:11 2012 UTC (2 years ago) by mabi
Branch: MAIN
Changes since 1.4: +3 -3 lines
version bump. this is a security release (bug #400971). also take advantage of EAPI4. remove older ebuilds. commit with approval from sec-team.

(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/postfixadmin-2.3.2.ebuild,v 1.4 2011/03/03 20:58:14 olemarkus Exp $
4
5 EAPI="2"
6
7 inherit eutils user webapp depend.php confutils
8
9 DESCRIPTION="Web Based Management tool for Postfix style virtual domains and users."
10 HOMEPAGE="http://postfixadmin.sourceforge.net"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 KEYWORDS="amd64 x86"
15 IUSE="mysql postgres +vacation xmlrpc"
16
17 DEPEND="vacation? ( dev-perl/DBI
18 virtual/perl-MIME-Base64
19 dev-perl/MIME-EncWords
20 dev-perl/Email-Valid
21 dev-perl/Mail-Sender
22 dev-perl/log-dispatch
23 dev-perl/Log-Log4perl
24 dev-perl/MIME-Charset
25 mysql? ( dev-perl/DBD-mysql )
26 postgres? ( dev-perl/DBD-Pg ) )
27 xmlrpc? ( dev-php/ZendFramework[-minimal] )
28 dev-lang/php[session,unicode,imap,postgres?,xmlrpc?]"
29
30 RDEPEND="${DEPEND}"
31
32 need_httpd_cgi
33 need_php_httpd
34
35 pkg_setup() {
36 webapp_pkg_setup
37
38 confutils_require_any mysql postgres
39
40 if use mysql && ! PHPCHECKNODIE="yes" require_php_with_any_use mysql mysqli; then
41 die "Re-install ${PHP_PKG} with either mysql or mysqli"
42 fi
43
44 if use vacation; then
45 enewgroup vacation
46 enewuser vacation -1 -1 -1 vacation
47 fi
48 }
49
50 src_install() {
51 webapp_src_preinst
52
53 if use vacation; then
54 insinto /var/spool/vacation
55 newins VIRTUAL_VACATION/vacation.pl vacation.pl-${SLOT}
56 fowners vacation:vacation /var/spool/vacation/vacation.pl-${SLOT}
57 fperms 770 /var/spool/vacation/vacation.pl-${SLOT}
58 dodoc VIRTUAL_VACATION/FILTER_README
59 newdoc VIRTUAL_VACATION/INSTALL.TXT VIRTUAL_VACATION_INSTALL.TXT
60 rm -r VIRTUAL_VACATION/{vacation.pl,INSTALL.TXT,tests,FILTER_README}
61 fi
62
63 insinto /usr/share/doc/${PF}/
64 doins -r ADDITIONS
65
66 local docs="DOCUMENTS/*.txt INSTALL.TXT CHANGELOG.TXT"
67 dodoc ${docs}
68
69 rm -rf ${docs} DOCUMENTS/ GPL-LICENSE.TXT LICENSE.TXT debian/ tests/ ADDITIONS/
70
71 insinto "${MY_HTDOCSDIR}"
72 doins -r .
73
74 webapp_configfile "${MY_HTDOCSDIR}"/config.inc.php
75
76 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.3.txt
77 webapp_src_install
78 }
79
80 pkg_postinst() {
81 webapp_pkg_postinst
82 if use vacation; then
83 # portage does not update owners of directories (feature :)
84 chown vacation:vacation "${ROOT}"/var/spool/vacation/
85 einfo "/var/spool/vacation/vacation.pl symlink was updated to:"
86 einfo "/var/spool/vacation/vacation.pl-${SLOT}"
87 ln -sf "${ROOT}"/var/spool/vacation/vacation.pl{-${SLOT},}
88 fi
89 }
90
91 pkg_postrm() {
92 # Make sure we don't leave broken vacation.pl symlink
93 find -L "${ROOT}"/var/spool/vacation/ -type l -delete
94 if [[ ! -e "${ROOT}"/var/spool/vacation/vacation.pl ]] &&
95 path_exists "${ROOT}"/var/spool/vacation/vacation.pl-*; then
96 ln -s $(LC_ALL=C ls -1 /var/spool/vacation/vacation.pl-* | tail -n1) \
97 "${ROOT}"/var/spool/vacation/vacation.pl
98 ewarn "/var/spool/vacation/vacation.pl was updated to point on most"
99 ewarn "recent verion, but please, do your own checks"
100 fi
101 }

  ViewVC Help
Powered by ViewVC 1.1.20