/[gentoo-x86]/eclass/php-lib-r1.eclass
Gentoo

Contents of /eclass/php-lib-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (download) (vendor branch)
Wed Nov 30 09:59:32 2005 UTC (8 years, 8 months ago) by chriswhite
Changes since 1.1: +8 -8 lines
*** empty log message ***

1 stuart 1.1 # Copyright 1999-2005 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 chriswhite 1.1.1.1 # $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.4 2005/11/20 01:35:05 chtekk Exp $
4 stuart 1.1 #
5     # Author: Stuart Herbert <stuart@gentoo.org>
6 chriswhite 1.1.1.1 # Maintained by the PHP Herd <php-bugs@gentoo.org>
7 stuart 1.1 #
8 chriswhite 1.1.1.1 # The php-lib-r1 eclass provides a unified interface for adding new
9     # PHP libraries. PHP libraries are PHP scripts designed for reuse inside
10 stuart 1.1 # other PHP scripts.
11    
12     inherit depend.php
13    
14     RESTRICT="${RESTRICT} nostrip"
15    
16     EXPORT_FUNCTIONS src_install
17    
18     # ---begin ebuild configurable settings
19    
20     # provide default extension name if necessary
21     [ -z "${PHP_LIB_NAME}" ] && PHP_LIB_NAME="${PN}"
22     # ---end ebuild configurable settings
23    
24     DEPEND="${DEPEND} dev-lang/php"
25 chriswhite 1.1.1.1 RDEPEND="${RDEPEND} ${DEPEND}"
26 stuart 1.1
27     # you have to pass in a list of the PHP files to install
28     #
29     # $1 - directory in ${S} to insert from
30     # $2 ... list of files to install
31    
32 chriswhite 1.1.1.1 php-lib-r1_src_install() {
33 stuart 1.1 has_php
34    
35     # install to the correct phpX folder, if not specified
36     # fall back to /usr/share/php
37 chriswhite 1.1.1.1 if [ -n "${PHP_SHARED_CAT}" ] ; then
38 stuart 1.1 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
39     else
40     PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
41     fi
42    
43     local x
44    
45     S_DIR="$1"
46     shift
47    
48     for x in $@ ; do
49     SUBDIR="`dirname ${x}`"
50     insinto ${PHP_LIB_DIR}/${SUBDIR}
51 chriswhite 1.1.1.1 doins "${S_DIR}/${x}"
52 stuart 1.1 done
53     }

  ViewVC Help
Powered by ViewVC 1.1.20