1 # Copyright 1999-2023 Gentoo Authors
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="https://github.com/postfixadmin/postfixadmin/archive/${P}.tar.gz"
11 S="${WORKDIR}/${PN}-${P}"
14 KEYWORDS="amd64 ~ppc x86"
15 IUSE="+mysql postgres +vacation"
16 REQUIRED_USE="|| ( mysql postgres )"
19 dev-lang/php:*[unicode,imap,postgres?]
29 dev-perl/MIME-EncWords
30 mysql? ( dev-perl/DBD-mysql )
31 postgres? ( dev-perl/DBD-Pg )
38 mysql? ( || ( dev-lang/php[mysqli] dev-lang/php[mysql] ) )
51 insinto /var/spool/vacation
52 newins VIRTUAL_VACATION/vacation.pl vacation.pl-${SLOT}
53 fperms 755 /var/spool/vacation/vacation.pl-${SLOT}
54 dodoc VIRTUAL_VACATION/FILTER_README
55 newdoc VIRTUAL_VACATION/INSTALL.md VIRTUAL_VACATION_INSTALL.md
56 rm -r VIRTUAL_VACATION/{vacation.pl,INSTALL.md,tests,FILTER_README} || die
61 local docs="DOCUMENTS/*.txt INSTALL.TXT CHANGELOG.TXT"
64 rm -rf ${docs} DOCUMENTS/ GPL-LICENSE.TXT LICENSE.TXT debian/ tests/ ADDITIONS/
66 insinto "${MY_HTDOCSDIR}"
69 webapp_configfile "${MY_HTDOCSDIR}"/config.inc.php
71 webapp_postinst_txt en "${FILESDIR}"/postinstall-en-2.3.txt
78 einfo "Please note that if upgrading from version prior to 3.3.0,"
79 einfo "existing setup_password will no longer work and you will"
80 einfo "need to generate new one. See instructions in setup.php."
83 # portage does not update owners of directories (feature :)
84 chown vacation:vacation "${ROOT}"/var/spool/vacation/
86 einfo "/var/spool/vacation/vacation.pl symlink was updated to:"
87 einfo "/var/spool/vacation/vacation.pl-${SLOT}"
88 ln -sf "${ROOT}"/var/spool/vacation/vacation.pl{-${SLOT},} || die
93 # Make sure we don't leave broken vacation.pl symlink
94 find -L "${ROOT}"/var/spool/vacation/ -type l -delete
95 local shopt_save=$(shopt -p nullglob)
97 local vacation=( "${ROOT}"/var/spool/vacation/vacation.pl-* )
99 if [[ ! -e "${ROOT}"/var/spool/vacation/vacation.pl && -n ${vacation[@]} ]]; then
100 ln -s "${vacation[-1]}" "${ROOT}"/var/spool/vacation/vacation.pl || die
101 ewarn "/var/spool/vacation/vacation.pl was updated to point on most"
102 ewarn "recent verion, but please, do your own checks"