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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/php-ext-pecl-r1.eclass,v 1.6 2007/08/31 09:42:34 jokey Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/Attic/php-ext-pecl-r1.eclass,v 1.7 2007/08/31 10:00:56 jokey Exp $
4# 4#
5# Author: Tal Peer <coredumb@gentoo.org> 5# Author: Tal Peer <coredumb@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org> 6# Author: Luca Longinotti <chtekk@gentoo.org>
7# Author: Jakub Moc <jakub@gentoo.org>
8
9# @ECLASS: php-ext-pecl-r1.eclass
10# @MAINTAINER:
7# Maintained by the PHP Team <php-bugs@gentoo.org> 11# Gentoo PHP team <php-bugs@gentoo.org>
8# 12# @BLURB: A uniform way of installing PECL extensions
9# This eclass should be used by all dev-php[4,5]/pecl-* ebuilds, as 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.
10# For more information about PECL, see http://pecl.php.net/ 16# For more information about PECL, see http://pecl.php.net/
17
18# @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.
11 25
12[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}" 26[[ -z "${PHP_EXT_PECL_PKG}" ]] && PHP_EXT_PECL_PKG="${PN/pecl-/}"
13 27
14PECL_PKG="${PHP_EXT_PECL_PKG}" 28PECL_PKG="${PHP_EXT_PECL_PKG}"
15MY_PV="${PV/_/}" 29MY_PV="${PV/_/}"
19 33
20inherit php-ext-source-r1 depend.php 34inherit php-ext-source-r1 depend.php
21 35
22EXPORT_FUNCTIONS src_compile src_install 36EXPORT_FUNCTIONS src_compile src_install
23 37
24# Needs to be set if the filename differs from the package name
25if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then 38if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
26 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz" 39 FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
27else 40else
28 FILENAME="${PECL_PKG_V}.tgz" 41 FILENAME="${PECL_PKG_V}.tgz"
29fi 42fi
31SRC_URI="http://pecl.php.net/get/${FILENAME}" 44SRC_URI="http://pecl.php.net/get/${FILENAME}"
32HOMEPAGE="http://pecl.php.net/${PECL_PKG}" 45HOMEPAGE="http://pecl.php.net/${PECL_PKG}"
33 46
34S="${WORKDIR}/${PECL_PKG_V}" 47S="${WORKDIR}/${PECL_PKG_V}"
35 48
49# @FUNCTION: php-ext-pecl-r1_src_compile
50# @DESCRIPTION:
51# Takes care of standard compile for PECL packages.
36php-ext-pecl-r1_src_compile() { 52php-ext-pecl-r1_src_compile() {
37 has_php 53 has_php
38 php-ext-source-r1_src_compile 54 php-ext-source-r1_src_compile
39} 55}
40 56
57# @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.
41php-ext-pecl-r1_src_install() { 62php-ext-pecl-r1_src_install() {
42 has_php 63 has_php
43 php-ext-source-r1_src_install 64 php-ext-source-r1_src_install
44 65
45 # Those two are always present 66 # Those two are always present.
46 dodoc-php "${WORKDIR}/package.xml" CREDITS 67 dodoc-php "${WORKDIR}/package.xml" CREDITS
47 68
48 # You can add more docs to be installed by defining DOCS variable in ebuild
49 for doc in ${DOCS} ; do 69 for doc in ${DOCS} ; do
50 [[ -s ${doc} ]] && dodoc-php ${doc} 70 [[ -s ${doc} ]] && dodoc-php ${doc}
51 done 71 done
52 72
53 # To install examples if the package supplies them, just add examples to IUSE
54 if has examples ${IUSE} && use examples ; then 73 if has examples ${IUSE} && use examples ; then
55 insinto /usr/share/doc/${CATEGORY}/${PF}/examples 74 insinto /usr/share/doc/${CATEGORY}/${PF}/examples
56 doins -r examples/* 75 doins -r examples/*
57 fi 76 fi
58} 77}

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20