/[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.12 - (hide annotations) (download)
Tue Apr 14 18:32:51 2015 UTC (6 weeks, 3 days ago) by grknight
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +11 -3 lines
Specify :* as slot by default to silence repoman warnings

1 grknight 1.12 # Copyright 1999-2015 Gentoo Foundation
2 stuart 1.1 # Distributed under the terms of the GNU General Public License v2
3 grknight 1.12 # $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.11 2012/02/12 21:48:58 mabi Exp $
4 jokey 1.6
5     # @ECLASS: php-lib-r1.eclass
6     # @MAINTAINER:
7     # Gentoo PHP team <php-bugs@gentoo.org>
8 vapier 1.10 # @AUTHOR:
9     # Author: Stuart Herbert <stuart@gentoo.org>
10     # Author: Luca Longinotti <chtekk@gentoo.org>
11 jokey 1.6 # @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 stuart 1.1
16     inherit depend.php
17    
18     EXPORT_FUNCTIONS src_install
19 grknight 1.12 # Silence repoman warnings
20     case "${EAPI:-0}" in
21     0|1|2|3|4)
22     DEPEND="dev-lang/php"
23     ;;
24     *)
25     DEPEND="dev-lang/php:*"
26     ;;
27     esac
28 stuart 1.1
29 chtekk 1.5 RDEPEND="${DEPEND}"
30 stuart 1.1
31 jokey 1.6 # @ECLASS-VARIABLE: PHP_LIB_NAME
32     # @DESCRIPTION:
33     # Defaults to ${PN} unless set manually in the ebuild.
34 chtekk 1.5 [[ -z "${PHP_LIB_NAME}" ]] && PHP_LIB_NAME="${PN}"
35 stuart 1.1
36 jokey 1.6 # @FUNCTION: php-lib-r1_src_install
37     # @USAGE: <directory to install from> <list of files>
38     # @DESCRIPTION:
39     # Takes care of install for PHP libraries.
40     # You have to pass in a list of the PHP files to install.
41    
42 jokey 1.7 # @VARIABLE: DOCS
43     # @DESCRIPTION:
44     # Set in ebuild if you wish to install additional, package-specific documentation.
45    
46 stuart 1.1 # $1 - directory in ${S} to insert from
47     # $2 ... list of files to install
48 hollow 1.2 php-lib-r1_src_install() {
49 stuart 1.1 local x
50    
51     S_DIR="$1"
52     shift
53    
54     for x in $@ ; do
55 jokey 1.8 SUBDIR="$(dirname ${x})"
56 mabi 1.11 insinto "/usr/share/php/${PHP_LIB_NAME}/${SUBDIR}"
57 chtekk 1.3 doins "${S_DIR}/${x}"
58 stuart 1.1 done
59 jokey 1.7
60 swegener 1.9 for doc in ${DOCS} ; do
61     [[ -s ${doc} ]] && dodoc-php ${doc}
62     done
63 stuart 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20