| 1 | # Copyright 1999-2004 Gentoo Technologies, Inc. |
1 | # Copyright 1999-2004 Gentoo Technologies, Inc. |
| 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/eclass/webapp.eclass,v 1.12 2004/04/29 13:53:24 stuart Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/webapp.eclass,v 1.13 2004/04/30 08:25:38 stuart Exp $ |
| 4 | # |
4 | # |
| 5 | # eclass/webapp.eclass |
5 | # eclass/webapp.eclass |
| 6 | # Eclass for installing applications to run under a web server |
6 | # Eclass for installing applications to run under a web server |
| 7 | # |
7 | # |
| 8 | # Part of the implementation of GLEP #11 |
8 | # Part of the implementation of GLEP #11 |
| … | |
… | |
| 18 | |
18 | |
| 19 | ECLASS=webapp |
19 | ECLASS=webapp |
| 20 | INHERITED="$INHERITED $ECLASS" |
20 | INHERITED="$INHERITED $ECLASS" |
| 21 | SLOT="${PVR}" |
21 | SLOT="${PVR}" |
| 22 | IUSE="$IUSE vhosts" |
22 | IUSE="$IUSE vhosts" |
| 23 | DEPEND="$DEPEND >=net-www/webapp-config-1.5" |
23 | DEPEND="$DEPEND >=net-www/webapp-config-1.6" |
| 24 | |
24 | |
| 25 | EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install |
25 | EXPORT_FUNCTIONS pkg_postinst pkg_setup src_install |
| 26 | |
26 | |
| 27 | # ------------------------------------------------------------------------ |
27 | # ------------------------------------------------------------------------ |
| 28 | # INTERNAL FUNCTION - USED BY THIS ECLASS ONLY |
28 | # INTERNAL FUNCTION - USED BY THIS ECLASS ONLY |
| … | |
… | |
| 263 | dodir ${MY_SQLSCRIPTSDIR} |
263 | dodir ${MY_SQLSCRIPTSDIR} |
| 264 | } |
264 | } |
| 265 | |
265 | |
| 266 | function webapp_pkg_postinst () |
266 | function webapp_pkg_postinst () |
| 267 | { |
267 | { |
|
|
268 | einfo "webapp_pkg_postinst() called" |
|
|
269 | |
| 268 | # if 'vhosts' is not set in your USE flags, we install a copy of |
270 | # if 'vhosts' is not set in your USE flags, we install a copy of |
| 269 | # this application in /var/www/localhost/htdocs/${PN}/ for you |
271 | # this application in /var/www/localhost/htdocs/${PN}/ for you |
| 270 | |
272 | |
| 271 | |
273 | |
| 272 | if ! use vhosts ; then |
274 | if ! use vhosts ; then |
| … | |
… | |
| 274 | |
276 | |
| 275 | G_HOSTNAME="localhost" |
277 | G_HOSTNAME="localhost" |
| 276 | . /etc/vhosts/webapp-config |
278 | . /etc/vhosts/webapp-config |
| 277 | |
279 | |
| 278 | local my_mode=-I |
280 | local my_mode=-I |
| 279 | local my_dir="${VHOST_ROOT}/htdocs/${PN}" |
281 | local my_dir="/${PN}" |
| 280 | |
282 | |
| 281 | # are we installing afresh - or are we upgrading? |
283 | # are we installing afresh - or are we upgrading? |
| 282 | # find out by looking to see what (if anything) is installed |
284 | # find out by looking to see what (if anything) is installed |
| 283 | # in there already |
285 | # in there already |
| 284 | |
286 | |