/[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.5 - (show annotations) (download)
Mon Mar 5 01:50:47 2007 UTC (7 years, 4 months ago) by chtekk
Branch: MAIN
Changes since 1.4: +9 -13 lines
New updated PHP eclasses, fix lots of bugs, introduce PHP 5.2 support.

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

  ViewVC Help
Powered by ViewVC 1.1.20