/[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.6 - (show annotations) (download)
Sat Sep 1 15:58:17 2007 UTC (7 years ago) by jokey
Branch: MAIN
Changes since 1.5: +17 -9 lines
Bunch of php eclass docification

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
8 # @ECLASS: php-lib-r1.eclass
9 # @MAINTAINER:
10 # Gentoo PHP team <php-bugs@gentoo.org>
11 # @BLURB: A unified interface for adding new PHP libraries.
12 # @DESCRIPTION:
13 # This eclass provides a unified interface for adding new PHP libraries.
14 # PHP libraries are PHP scripts designed for reuse inside other PHP scripts.
15
16 inherit depend.php
17
18 EXPORT_FUNCTIONS src_install
19
20 DEPEND="dev-lang/php"
21 RDEPEND="${DEPEND}"
22
23 # @ECLASS-VARIABLE: PHP_LIB_NAME
24 # @DESCRIPTION:
25 # Defaults to ${PN} unless set manually in the ebuild.
26 [[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
27
28 # @FUNCTION: php-lib-r1_src_install
29 # @USAGE: <directory to install from> <list of files>
30 # @DESCRIPTION:
31 # Takes care of install for PHP libraries.
32 # You have to pass in a list of the PHP files to install.
33
34 # $1 - directory in ${S} to insert from
35 # $2 ... list of files to install
36 php-lib-r1_src_install() {
37 has_php
38
39 # install to the correct phpX folder, if not specified
40 # fall back to /usr/share/php
41 if [[ -n "${PHP_SHARED_CAT}" ]] ; then
42 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
43 else
44 PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
45 fi
46
47 local x
48
49 S_DIR="$1"
50 shift
51
52 for x in $@ ; do
53 SUBDIR="`dirname ${x}`"
54 insinto "${PHP_LIB_DIR}/${SUBDIR}"
55 doins "${S_DIR}/${x}"
56 done
57 }

  ViewVC Help
Powered by ViewVC 1.1.20