1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Web Based Management tool for Postfix style virtual domains and users"
9 HOMEPAGE="http://postfixadmin.sourceforge.net"
10 SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${P}/${P}.tar.gz"
13 KEYWORDS="~amd64 ~ppc ~x86"
14 IUSE="+mysql postgres +vacation xmlrpc"
15 REQUIRED_USE="|| ( mysql postgres )"
18 dev-lang/php:*[unicode,imap,postgres?,xmlrpc?]
21 virtual/perl-MIME-Base64
22 dev-perl/MIME-EncWords
28 mysql? ( dev-perl/DBD-mysql )
29 postgres? ( dev-perl/DBD-Pg )
31 xmlrpc? ( dev-php/ZendFramework[-minimal] )
36 mysql? ( || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) )"
45 enewuser vacation -1 -1 -1 vacation
53 insinto /var/spool/vacation
54 newins VIRTUAL_VACATION/vacation.pl vacation.pl-${SLOT}
55 fowners vacation:vacation /var/spool/vacation/vacation.pl-${SLOT}
56 fperms 770 /var/spool/vacation/vacation.pl-${SLOT}
57 dodoc VIRTUAL_VACATION/FILTER_README
58 newdoc VIRTUAL_VACATION/INSTALL.TXT VIRTUAL_VACATION_INSTALL.TXT
59 rm -r VIRTUAL_VACATION/{vacation.pl,INSTALL.TXT,tests,FILTER_README} || die
62 insinto /usr/share/doc/${PF}/
65 local docs="DOCUMENTS/*.txt INSTALL.TXT CHANGELOG.TXT"
68 rm -rf ${docs} DOCUMENTS/ GPL-LICENSE.TXT LICENSE.TXT debian/ tests/ ADDITIONS/
70 insinto "${MY_HTDOCSDIR}"
73 webapp_configfile "${MY_HTDOCSDIR}"/config.inc.php
75 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.3.txt
82 # portage does not update owners of directories (feature :)
83 chown vacation:vacation "${ROOT}"/var/spool/vacation/
84 einfo "/var/spool/vacation/vacation.pl symlink was updated to:"
85 einfo "/var/spool/vacation/vacation.pl-${SLOT}"
86 ln -sf "${ROOT}"/var/spool/vacation/vacation.pl{-${SLOT},} || die
91 # Make sure we don't leave broken vacation.pl symlink
92 find -L "${ROOT}"/var/spool/vacation/ -type l -delete
93 if [[ ! -e "${ROOT}"/var/spool/vacation/vacation.pl ]] &&
94 path_exists "${ROOT}"/var/spool/vacation/vacation.pl-*; then
95 ln -s $(LC_ALL=C ls -1 /var/spool/vacation/vacation.pl-* | tail -n1) \
96 "${ROOT}"/var/spool/vacation/vacation.pl || die
97 ewarn "/var/spool/vacation/vacation.pl was updated to point on most"
98 ewarn "recent verion, but please, do your own checks"