Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 172138 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild (-47 / +25 lines)
Lines 1-46 Link Here
1
# Copyright 1999-2007 Gentoo Foundation
1
# Copyright 1999-2007 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/www-apps/postfixadmin/postfixadmin-2.1.0.ebuild,v 1.5 2007/01/04 10:25:55 wrobel Exp $
3
# $Header: $
4
4
5
# Source: http://bugs.gentoo.org/show_bug.cgi?id=50035
5
inherit eutils webapp depend.php
6
# Submitted-By: SteveB <tp22a@softhome.net>
7
# Reviewed-By: wrobel 2005-12-14
8
# $Id: postfixadmin-2.1.0.ebuild,v 1.5 2007/01/04 10:25:55 wrobel Exp $
9
6
10
inherit eutils webapp
7
DESCRIPTION="Web Based Management tool for Postfix when you are dealing with Postfix Style Virtual Domains and Virtual Users that are stored in MySQL."
11
12
IUSE="vhosts"
13
DESCRIPTION="Postfix Admin is a Web Based Management tool for Postfix when you are dealing with Postfix Style Virtual Domains and Virtual Users that are stored in MySQL."
14
HOMEPAGE="http://high5.net/postfixadmin/"
8
HOMEPAGE="http://high5.net/postfixadmin/"
15
SRC_URI="http://high5.net/page7_files/${PN}-${PV}.tgz"
9
SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
16
RESTRICT="nomirror"
10
11
LICENSE="MPL-1.1"
17
KEYWORDS="~amd64 ~x86"
12
KEYWORDS="~amd64 ~x86"
13
IUSE=""
18
14
19
DEPEND="virtual/httpd-php
15
DEPEND=">=mail-mta/postfix-2.0.0
20
		>=mail-mta/postfix-2.0.0
16
	>=dev-lang/perl-5.0
21
		>=net-www/apache-1.3.27
17
	dev-perl/DBI
22
		>=dev-lang/perl-5.0
18
	dev-perl/DBD-mysql"
23
		dev-perl/DBI
19
RDEPEND="${DEPEND}"
24
		dev-perl/DBD-mysql"
20
25
21
need_php_httpd
26
RDEPEND=">=sys-apps/sed-4.0.5
27
		sys-apps/grep
28
		sys-apps/findutils"
29
22
30
LICENSE="MPL-1.1"
31
23
32
pkg_setup() {
24
pkg_setup() {
33
	webapp_pkg_setup
25
	webapp_pkg_setup
34
	id vacation 2>/dev/null || enewgroup vacation
26
	enewgroup vacation
35
	id vacation 2>/dev/null || enewuser vacation -1 -1 /dev/null vacation
27
	enewuser vacation -1 -1 -1 vacation
36
}
28
}
37
29
38
src_unpack() {
30
src_unpack() {
39
	unpack ${A} || die
31
	unpack ${A} || die
40
	cd ${S}
32
	cd "${S}"
41
33
42
	# Remove .cvs* files and CVS directories
34
	# Remove .cvs* files and CVS directories
43
	find ${S} -name .cvs\* -or \( -type d -name CVS -prune \) -exec rm -rf {} \;
35
	find "${S}" -name .cvs\* -or \( -type d -name CVS -prune \) | xargs rm -rf
44
36
45
	# Database support (we don't care wich one is used. Allow both of them!)
37
	# Database support (we don't care wich one is used. Allow both of them!)
46
	cp ./DATABASE_MYSQL.TXT ${T}/mysql-setup.sql || die "Creating MySQL setup script failed!"
38
	cp ./DATABASE_MYSQL.TXT ${T}/mysql-setup.sql || die "Creating MySQL setup script failed!"
Lines 55-117 Link Here
55
src_install() {
47
src_install() {
56
	webapp_src_preinst
48
	webapp_src_preinst
57
49
58
59
	# Virtual Vacation only works with MySQL
50
	# Virtual Vacation only works with MySQL
60
	diropts -m0770 -o vacation -g vacation
51
	diropts -m0770 -o vacation -g vacation
61
	dodir /var/spool/vacation
52
	dodir /var/spool/vacation
62
	keepdir /var/spool/vacation
53
	keepdir /var/spool/vacation
63
	insinto /var/spool/vacation
54
	insinto /var/spool/vacation
64
	insopts -m770 -o vacation -g vacation
55
	insopts -m770 -o vacation -g vacation
65
	doins ${S}/VIRTUAL_VACATION/vacation.pl
56
	doins "${S}"/VIRTUAL_VACATION/vacation.pl
66
57
67
	# Documentation
58
	# Documentation
68
	#
69
	local docs="BACKUP_MX.TXT CHANGELOG.TXT INSTALL.TXT LANGUAGE.TXT LICENSE.TXT TABLE_BACKUP_MX.TXT TABLE_CHANGES.TXT UPGRADE.TXT"
59
	local docs="BACKUP_MX.TXT CHANGELOG.TXT INSTALL.TXT LANGUAGE.TXT LICENSE.TXT TABLE_BACKUP_MX.TXT TABLE_CHANGES.TXT UPGRADE.TXT"
70
	docs="${docs} DATABASE_MYSQL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT"
60
	docs="${docs} DATABASE_MYSQL.TXT ${T}/VIRTUAL_VACATION_INSTALL.TXT"
71
61
72
	# install the SQL scripts available to us
62
	# install the SQL scripts available to us
73
	#
74
	# unfortunately, we do not have scripts to upgrade from older versions
63
	# unfortunately, we do not have scripts to upgrade from older versions
75
	# these are things we need to add at a later date
64
	# these are things we need to add at a later date
76
	#
77
	webapp_sqlscript mysql ${T}/mysql-setup.sql
65
	webapp_sqlscript mysql ${T}/mysql-setup.sql
78
	webapp_sqlscript mysql ${T}/mysql-update.sql 2.0.x
66
	webapp_sqlscript mysql ${T}/mysql-update.sql 2.0.x
79
	webapp_sqlscript mysql ${T}/mysql-update.sql 1.5x
67
	webapp_sqlscript mysql ${T}/mysql-update.sql 1.5x
80
68
81
69
82
	# Copy the app's main files
70
	# Copy the app's main files
83
	#
84
	einfo "Installing main files"
71
	einfo "Installing main files"
85
	mkdir -p ${D}${MY_HTDOCSDIR}
72
	mkdir -p "${D}"${MY_HTDOCSDIR}
86
	cp -r . ${D}${MY_HTDOCSDIR} || die "cp failed"
73
	cp -r . "${D}"${MY_HTDOCSDIR} || die "cp failed"
87
	cp ${T}/config.inc.php ${D}${MY_HTDOCSDIR} || die "cp failed"
74
	cp ${T}/config.inc.php "${D}"${MY_HTDOCSDIR} || die "cp failed"
88
75
89
	# handle documentation files
76
	# handle documentation files
90
	#
91
	# NOTE that doc files go into /usr/share/doc as normal; they do NOT
92
	# get installed per vhost!
93
	#
94
	dodoc ${docs}
77
	dodoc ${docs}
95
	for foo in ${docs} DATABASE_MYSQL.TXT DATABASE_PGSQL.TXT ADDITIONS VIRTUAL_VACATION
78
	for foo in ${docs} DATABASE_MYSQL.TXT DATABASE_PGSQL.TXT ADDITIONS VIRTUAL_VACATION
96
	do
79
	do
97
		rm -f ${D}${MY_HTDOCSDIR}/${foo}
80
		rm -f "${D}"${MY_HTDOCSDIR}/${foo}
98
	done
81
	done
99
82
100
	# Identify the configuration files that this app uses
83
	# Identify the configuration files that this app uses
101
	#
102
	webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
84
	webapp_configfile ${MY_HTDOCSDIR}/config.inc.php
103
	webapp_configfile ${MY_HTDOCSDIR}/admin/.htpasswd
85
	webapp_configfile ${MY_HTDOCSDIR}/admin/.htpasswd
104
86
105
	# Add the hook file to fix the .htaccess file
87
	# Add the hook file to fix the .htaccess file
106
	webapp_hook_script ${FILESDIR}/config-hook.sh
88
	webapp_hook_script "${FILESDIR}"/config-hook.sh
107
89
108
	# Add the post-installation instructions
90
	# Add the post-installation instructions
109
	#
91
	webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
110
	webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
111
92
112
	# All done
113
	#
114
	# Now we let the eclass strut its stuff ;-)
93
	# Now we let the eclass strut its stuff ;-)
115
	#
116
	webapp_src_install
94
	webapp_src_install
117
}
95
}

Return to bug 172138