/[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.3 - (show annotations) (download)
Mon Oct 31 14:08:42 2005 UTC (9 years, 6 months ago) by chtekk
Branch: MAIN
Changes since 1.2: +1 -1 lines
New-style PHP update, see dev-lang/php ChangeLog for detailed list of changes.

1 # Copyright 1999-2005 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 #
7 # The php-lib eclass provides a unified interface for adding new
8 # PHP libraries. PHP libraries are PHP scripts designed for reuse inside
9 # other PHP scripts.
10 #
11 # This eclass doesn't do a lot (yet)
12
13 inherit depend.php
14
15 RESTRICT="${RESTRICT} nostrip"
16
17 EXPORT_FUNCTIONS src_install
18
19 # ---begin ebuild configurable settings
20
21 # provide default extension name if necessary
22 [ -z "${PHP_LIB_NAME}" ] && PHP_LIB_NAME="${PN}"
23 # ---end ebuild configurable settings
24
25 DEPEND="${DEPEND} dev-lang/php"
26 RDEPEND="${RDEPEND} ${DEPEND}"
27
28 # you have to pass in a list of the PHP files to install
29 #
30 # $1 - directory in ${S} to insert from
31 # $2 ... list of files to install
32
33 php-lib-r1_src_install() {
34 has_php
35
36 # install to the correct phpX folder, if not specified
37 # fall back to /usr/share/php
38 if [ -n "${PHP_SHARED_CAT}" ] ; then
39 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
40 else
41 PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
42 fi
43
44 local x
45
46 S_DIR="$1"
47 shift
48
49 for x in $@ ; do
50 SUBDIR="`dirname ${x}`"
51 insinto ${PHP_LIB_DIR}/${SUBDIR}
52 doins "${S_DIR}/${x}"
53 done
54 }

  ViewVC Help
Powered by ViewVC 1.1.20