/[gentoo-x86]/eclass/php-ext-pecl-r1.eclass
Gentoo

Contents of /eclass/php-ext-pecl-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (hide annotations) (download)
Sat Sep 1 15:58:17 2007 UTC (6 years, 11 months ago) by jokey
Branch: MAIN
Changes since 1.7: +19 -4 lines
Bunch of php eclass docification

1 chtekk 1.5 # Copyright 1999-2007 Gentoo Foundation
2 stuart 1.1 # Distributed under the terms of the GNU General Public License v2
3 jokey 1.7 # $Header: $
4 stuart 1.1 #
5     # Author: Tal Peer <coredumb@gentoo.org>
6 chtekk 1.5 # Author: Luca Longinotti <chtekk@gentoo.org>
7 jokey 1.7 # Author: Jakub Moc <jakub@gentoo.org>
8    
9     # @ECLASS: php-ext-pecl-r1.eclass
10     # @MAINTAINER:
11     # Gentoo PHP team <php-bugs@gentoo.org>
12     # @BLURB: A uniform way of installing PECL extensions
13     # @DESCRIPTION:
14     # This eclass should be used by all dev-php[45]/pecl-* ebuilds
15     # as a uniform way of installing PECL extensions.
16 chtekk 1.5 # For more information about PECL, see http://pecl.php.net/
17 stuart 1.1
18 jokey 1.8 # @ECLASS-VARIABLE: PHP_EXT_PECL_PKG
19     # @DESCRIPTION:
20     # Set in ebuild before inheriting this eclass if the tarball name
21     # differs from ${PN/pecl-/} so that SRC_URI and HOMEPAGE gets set
22     # correctly by the eclass.
23     #
24     # Setting this variable manually also affects PHP_EXT_NAME and ${S}
25     # unless you override those in ebuild. Also see PHP_EXT_PECL_FILENAME
26     # if this is not desired for whatever reason.
27    
28     # @ECLASS-VARIABLE: PHP_EXT_PECL_FILENAME
29     # @DESCRIPTION:
30     # Set in ebuild before inheriting this eclass if the tarball name
31     # differs from ${PN/pecl-/} so that SRC_URI gets set correctly by
32     # the eclass.
33     #
34     # Unlike PHP_EXT_PECL_PKG, setting this variable does not affect
35     # HOMEPAGE, PHP_EXT_NAME or ${S}.
36 jokey 1.7
37     # @VARIABLE: DOCS
38 jokey 1.8 # @DESCRIPTION:
39 jokey 1.7 # Set in ebuild if you wish to install additional, package-specific documentation.
40    
41 chtekk 1.5 [[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
42 stuart 1.1
43 chtekk 1.5 PECL_PKG="${PHP_EXT_PECL_PKG}"
44     MY_PV="${PV/_/}"
45     PECL_PKG_V="${PECL_PKG}-${MY_PV}"
46 stuart 1.1
47 chtekk 1.5 [[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}"
48    
49     inherit php-ext-source-r1 depend.php
50 stuart 1.1
51     EXPORT_FUNCTIONS src_compile src_install
52    
53 chtekk 1.5 if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
54 sebastian 1.4 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
55 stuart 1.1 else
56     FILENAME="${PECL_PKG_V}.tgz"
57     fi
58    
59     SRC_URI="http://pecl.php.net/get/${FILENAME}"
60     HOMEPAGE="http://pecl.php.net/${PECL_PKG}"
61 chtekk 1.2
62     S="${WORKDIR}/${PECL_PKG_V}"
63 stuart 1.1
64 jokey 1.7 # @FUNCTION: php-ext-pecl-r1_src_compile
65     # @DESCRIPTION:
66     # Takes care of standard compile for PECL packages.
67 stuart 1.1 php-ext-pecl-r1_src_compile() {
68     has_php
69     php-ext-source-r1_src_compile
70     }
71    
72 jokey 1.7 # @FUNCTION: php-ext-pecl-r1_src_install
73     # @DESCRIPTION:
74     # Takes care of standard install for PECL packages.
75     # You can also simply add examples to IUSE to automagically install
76     # examples supplied with the package.
77 stuart 1.1 php-ext-pecl-r1_src_install() {
78     has_php
79     php-ext-source-r1_src_install
80    
81 jokey 1.7 # Those two are always present.
82 chtekk 1.2 dodoc-php "${WORKDIR}/package.xml" CREDITS
83 jokey 1.7
84 jokey 1.6 for doc in ${DOCS} ; do
85     [[ -s ${doc} ]] && dodoc-php ${doc}
86     done
87 jokey 1.7
88 jokey 1.6 if has examples ${IUSE} && use examples ; then
89     insinto /usr/share/doc/${CATEGORY}/${PF}/examples
90     doins -r examples/*
91     fi
92 stuart 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20