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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Jul 6 08:41:27 2012 UTC (21 months, 2 weeks ago) by jdhore
Branch: MAIN
Changes since 1.2: +2 -2 lines
marked x86 per bug 400971

(Portage version: 2.2.0_alpha116/cvs/Linux i686)

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.5.ebuild,v 1.2 2012/06/26 17:40:35 ago Exp $
4
5 EAPI="4"
6
7 inherit user webapp
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/project/${PN}/${PN}/${P}/${P}.tar.gz"
12
13 LICENSE="GPL-2"
14 KEYWORDS="amd64 x86"
15 IUSE="+mysql postgres +vacation xmlrpc"
16 REQUIRED_USE="|| ( mysql postgres )"
17
18 DEPEND="vacation? ( dev-perl/DBI
19 virtual/perl-MIME-Base64
20 dev-perl/MIME-EncWords
21 dev-perl/Email-Valid
22 dev-perl/Mail-Sender
23 dev-perl/log-dispatch
24 dev-perl/Log-Log4perl
25 dev-perl/MIME-Charset
26 mysql? ( dev-perl/DBD-mysql )
27 postgres? ( dev-perl/DBD-Pg ) )
28 xmlrpc? ( dev-php/ZendFramework[-minimal] )
29 dev-lang/php[unicode,imap,postgres?,xmlrpc?]"
30
31 RDEPEND="${DEPEND}
32 virtual/httpd-php
33 mysql? ( || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) )"
34
35 need_httpd_cgi
36
37 pkg_setup() {
38 webapp_pkg_setup
39
40 if use vacation; then
41 enewgroup vacation
42 enewuser vacation -1 -1 -1 vacation
43 fi
44 }
45
46 src_install() {
47 webapp_src_preinst
48
49 if use vacation; then
50 insinto /var/spool/vacation
51 newins VIRTUAL_VACATION/vacation.pl vacation.pl-${SLOT}
52 fowners vacation:vacation /var/spool/vacation/vacation.pl-${SLOT}
53 fperms 770 /var/spool/vacation/vacation.pl-${SLOT}
54 dodoc VIRTUAL_VACATION/FILTER_README
55 newdoc VIRTUAL_VACATION/INSTALL.TXT VIRTUAL_VACATION_INSTALL.TXT
56 rm -r VIRTUAL_VACATION/{vacation.pl,INSTALL.TXT,tests,FILTER_README}
57 fi
58
59 insinto /usr/share/doc/${PF}/
60 doins -r ADDITIONS
61
62 local docs="DOCUMENTS/*.txt INSTALL.TXT CHANGELOG.TXT"
63 dodoc ${docs}
64
65 rm -rf ${docs} DOCUMENTS/ GPL-LICENSE.TXT LICENSE.TXT debian/ tests/ ADDITIONS/
66
67 insinto "${MY_HTDOCSDIR}"
68 doins -r .
69
70 webapp_configfile "${MY_HTDOCSDIR}"/config.inc.php
71
72 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.3.txt
73 webapp_src_install
74 }
75
76 pkg_postinst() {
77 webapp_pkg_postinst
78 if use vacation; then
79 # portage does not update owners of directories (feature :)
80 chown vacation:vacation "${ROOT}"/var/spool/vacation/
81 einfo "/var/spool/vacation/vacation.pl symlink was updated to:"
82 einfo "/var/spool/vacation/vacation.pl-${SLOT}"
83 ln -sf "${ROOT}"/var/spool/vacation/vacation.pl{-${SLOT},}
84 fi
85 }
86
87 pkg_postrm() {
88 # Make sure we don't leave broken vacation.pl symlink
89 find -L "${ROOT}"/var/spool/vacation/ -type l -delete
90 if [[ ! -e "${ROOT}"/var/spool/vacation/vacation.pl ]] &&
91 path_exists "${ROOT}"/var/spool/vacation/vacation.pl-*; then
92 ln -s $(LC_ALL=C ls -1 /var/spool/vacation/vacation.pl-* | tail -n1) \
93 "${ROOT}"/var/spool/vacation/vacation.pl
94 ewarn "/var/spool/vacation/vacation.pl was updated to point on most"
95 ewarn "recent verion, but please, do your own checks"
96 fi
97 }

  ViewVC Help
Powered by ViewVC 1.1.20