| 1 |
# Copyright 1999-2005 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: $
|
| 4 |
#
|
| 5 |
# Author: Tal Peer <coredumb@gentoo.org>
|
| 6 |
#
|
| 7 |
# This eclass should be used by all dev-php/PECL-* ebuilds, as a uniform way of installing PECL extensions.
|
| 8 |
# For more information about PECL, see: http://pecl.php.net
|
| 9 |
|
| 10 |
[ -z "${PHP_EXT_PECL_PKG}" ] && PHP_EXT_PECL_PKG=${PN/pecl-/}
|
| 11 |
PECL_PKG=${PHP_EXT_PECL_PKG}
|
| 12 |
PECL_PKG_V=${PECL_PKG}-${PV}
|
| 13 |
|
| 14 |
[ -z "${PHP_EXT_NAME}" ] && PHP_EXT_NAME=${PECL_PKG}
|
| 15 |
|
| 16 |
inherit php-ext-source-r1
|
| 17 |
|
| 18 |
EXPORT_FUNCTIONS src_compile src_install
|
| 19 |
|
| 20 |
# ---begin ebuild configurable settings
|
| 21 |
|
| 22 |
# Needs to be set if the filename is other than the package name
|
| 23 |
if [ -n "${PHP_EXT_PECL_FILENAME}" ]; then
|
| 24 |
FILENAME="${PHP_EXT_PECL_FILENAME}-${PV}.tgz"
|
| 25 |
else
|
| 26 |
FILENAME="${PECL_PKG_V}.tgz"
|
| 27 |
fi
|
| 28 |
|
| 29 |
# ---end ebuild configurable settings
|
| 30 |
|
| 31 |
SRC_URI="http://pecl.php.net/get/${FILENAME}"
|
| 32 |
HOMEPAGE="http://pecl.php.net/${PECL_PKG}"
|
| 33 |
|
| 34 |
S="${WORKDIR}/${PECL_PKG_V}"
|
| 35 |
|
| 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 |
dodoc-php "${WORKDIR}/package.xml" CREDITS
|
| 47 |
}
|