| 1 | # Copyright 1999-2005 Gentoo Foundation |
1 | # Copyright 1999-2011 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.1.1.1 2005/11/30 09:59:32 chriswhite Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/Attic/php-ext-pecl-r1.eclass,v 1.15 2011/09/03 08:25:34 scarabeus Exp $ |
| 4 | # |
|
|
| 5 | # Author: Tal Peer <coredumb@gentoo.org> |
|
|
| 6 | # Maintained by the PHP Herd <php-bugs@gentoo.org> |
|
|
| 7 | # |
|
|
| 8 | # This eclass should be used by all dev-php[4,5]/pecl-* ebuilds, as a uniform way of installing PECL extensions. |
|
|
| 9 | # For more information about PECL, see: http://pecl.php.net |
|
|
| 10 | |
4 | |
| 11 | [ -z "${PHP_EXT_PECL_PKG}" ] && PHP_EXT_PECL_PKG=${PN/pecl-/} |
5 | # @DEAD |
| 12 | PECL_PKG=${PHP_EXT_PECL_PKG} |
6 | # To be removed on 2011/11/03. |
| 13 | PECL_PKG_V=${PECL_PKG}-${PV} |
7 | ewarn "Please fix your package (${CATEGORY}/${PF}) to not use ${ECLASS}.eclass" |
| 14 | |
|
|
| 15 | [ -z "${PHP_EXT_NAME}" ] && PHP_EXT_NAME=${PECL_PKG} |
|
|
| 16 | |
|
|
| 17 | inherit php-ext-source-r1 |
|
|
| 18 | |
|
|
| 19 | EXPORT_FUNCTIONS src_compile src_install |
|
|
| 20 | |
|
|
| 21 | # ---begin ebuild configurable settings |
|
|
| 22 | |
|
|
| 23 | # Needs to be set if the filename is other than the package name |
|
|
| 24 | if [ -n "${PHP_EXT_PECL_FILENAME}" ]; then |
|
|
| 25 | FILENAME="${PHP_EXT_PECL_FILENAME}-${PV}.tgz" |
|
|
| 26 | else |
|
|
| 27 | FILENAME="${PECL_PKG_V}.tgz" |
|
|
| 28 | fi |
|
|
| 29 | |
|
|
| 30 | # ---end ebuild configurable settings |
|
|
| 31 | |
|
|
| 32 | SRC_URI="http://pecl.php.net/get/${FILENAME}" |
|
|
| 33 | HOMEPAGE="http://pecl.php.net/${PECL_PKG}" |
|
|
| 34 | |
|
|
| 35 | S="${WORKDIR}/${PECL_PKG_V}" |
|
|
| 36 | |
|
|
| 37 | php-ext-pecl-r1_src_compile() { |
|
|
| 38 | has_php |
|
|
| 39 | php-ext-source-r1_src_compile |
|
|
| 40 | } |
|
|
| 41 | |
|
|
| 42 | php-ext-pecl-r1_src_install() { |
|
|
| 43 | has_php |
|
|
| 44 | php-ext-source-r1_src_install |
|
|
| 45 | |
|
|
| 46 | # Those two are always present |
|
|
| 47 | dodoc-php "${WORKDIR}/package.xml" CREDITS |
|
|
| 48 | } |
|
|