/[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.7 - (hide annotations) (download)
Fri Aug 31 10:00:56 2007 UTC (7 years ago) by jokey
Branch: MAIN
Changes since 1.6: +29 -10 lines
Make eclass-manpages friendly

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.7 # @VARIABLE: PHP_EXT_PECL_FILENAME
19     # @DESCRIPTION:
20     # Set in ebuild if the filename differs from the package name so that SRC_URI gets set correctly.
21    
22     # @VARIABLE: DOCS
23     # @DESCRIPTION:
24     # Set in ebuild if you wish to install additional, package-specific documentation.
25    
26 chtekk 1.5 [[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
27 stuart 1.1
28 chtekk 1.5 PECL_PKG="${PHP_EXT_PECL_PKG}"
29     MY_PV="${PV/_/}"
30     PECL_PKG_V="${PECL_PKG}-${MY_PV}"
31 stuart 1.1
32 chtekk 1.5 [[ -z "${PHP_EXT_NAME}" ]] && PHP_EXT_NAME="${PECL_PKG}"
33    
34     inherit php-ext-source-r1 depend.php
35 stuart 1.1
36     EXPORT_FUNCTIONS src_compile src_install
37    
38 chtekk 1.5 if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
39 sebastian 1.4 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
40 stuart 1.1 else
41     FILENAME="${PECL_PKG_V}.tgz"
42     fi
43    
44     SRC_URI="http://pecl.php.net/get/${FILENAME}"
45     HOMEPAGE="http://pecl.php.net/${PECL_PKG}"
46 chtekk 1.2
47     S="${WORKDIR}/${PECL_PKG_V}"
48 stuart 1.1
49 jokey 1.7 # @FUNCTION: php-ext-pecl-r1_src_compile
50     # @DESCRIPTION:
51     # Takes care of standard compile for PECL packages.
52 stuart 1.1 php-ext-pecl-r1_src_compile() {
53     has_php
54     php-ext-source-r1_src_compile
55     }
56    
57 jokey 1.7 # @FUNCTION: php-ext-pecl-r1_src_install
58     # @DESCRIPTION:
59     # Takes care of standard install for PECL packages.
60     # You can also simply add examples to IUSE to automagically install
61     # examples supplied with the package.
62 stuart 1.1 php-ext-pecl-r1_src_install() {
63     has_php
64     php-ext-source-r1_src_install
65    
66 jokey 1.7 # Those two are always present.
67 chtekk 1.2 dodoc-php "${WORKDIR}/package.xml" CREDITS
68 jokey 1.7
69 jokey 1.6 for doc in ${DOCS} ; do
70     [[ -s ${doc} ]] && dodoc-php ${doc}
71     done
72 jokey 1.7
73 jokey 1.6 if has examples ${IUSE} && use examples ; then
74     insinto /usr/share/doc/${CATEGORY}/${PF}/examples
75     doins -r examples/*
76     fi
77 stuart 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20