/[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.6 - (hide annotations) (download)
Fri Aug 31 09:42:34 2007 UTC (6 years, 10 months ago) by jokey
Branch: MAIN
Changes since 1.5: +12 -1 lines
Support doc and example useflag

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.6 # $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-pecl-r1.eclass,v 1.5 2007/03/05 01:50:47 chtekk Exp $
4 stuart 1.1 #
5     # Author: Tal Peer <coredumb@gentoo.org>
6 chtekk 1.5 # Author: Luca Longinotti <chtekk@gentoo.org>
7     # Maintained by the PHP Team <php-bugs@gentoo.org>
8 stuart 1.1 #
9 chtekk 1.3 # This eclass should be used by all dev-php[4,5]/pecl-* ebuilds, as a uniform way of installing PECL extensions.
10 chtekk 1.5 # For more information about PECL, see http://pecl.php.net/
11 stuart 1.1
12 chtekk 1.5 [[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
13 stuart 1.1
14 chtekk 1.5 PECL_PKG="${PHP_EXT_PECL_PKG}"
15     MY_PV="${PV/_/}"
16     PECL_PKG_V="${PECL_PKG}-${MY_PV}"
17 stuart 1.1
18 chtekk 1.5 [[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}"
19    
20     inherit php-ext-source-r1 depend.php
21 stuart 1.1
22     EXPORT_FUNCTIONS src_compile src_install
23    
24 chtekk 1.5 # Needs to be set if the filename differs from the package name
25     if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
26 sebastian 1.4 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
27 stuart 1.1 else
28     FILENAME="${PECL_PKG_V}.tgz"
29     fi
30    
31     SRC_URI="http://pecl.php.net/get/${FILENAME}"
32     HOMEPAGE="http://pecl.php.net/${PECL_PKG}"
33 chtekk 1.2
34     S="${WORKDIR}/${PECL_PKG_V}"
35 stuart 1.1
36     php-ext-pecl-r1_src_compile() {
37     has_php
38     php-ext-source-r1_src_compile
39     }
40    
41     php-ext-pecl-r1_src_install() {
42     has_php
43     php-ext-source-r1_src_install
44    
45     # Those two are always present
46 chtekk 1.2 dodoc-php "${WORKDIR}/package.xml" CREDITS
47 jokey 1.6
48     # You can add more docs to be installed by defining DOCS variable in ebuild
49     for doc in ${DOCS} ; do
50     [[ -s ${doc} ]] && dodoc-php ${doc}
51     done
52    
53     # To install examples if the package supplies them, just add examples to IUSE
54     if has examples ${IUSE} && use examples ; then
55     insinto /usr/share/doc/${CATEGORY}/${PF}/examples
56     doins -r examples/*
57     fi
58 stuart 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20