/[gentoo-x86]/eclass/php-lib-r1.eclass
Gentoo

Diff of /eclass/php-lib-r1.eclass

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

Revision 1.6 Revision 1.11
1# Copyright 1999-2007 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/php-lib-r1.eclass,v 1.6 2007/09/01 15:58:17 jokey Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-lib-r1.eclass,v 1.11 2012/02/12 21:48:58 mabi Exp $
4#
5# Author: Stuart Herbert <stuart@gentoo.org>
6# Author: Luca Longinotti <chtekk@gentoo.org>
7 4
8# @ECLASS: php-lib-r1.eclass 5# @ECLASS: php-lib-r1.eclass
9# @MAINTAINER: 6# @MAINTAINER:
10# Gentoo PHP team <php-bugs@gentoo.org> 7# Gentoo PHP team <php-bugs@gentoo.org>
8# @AUTHOR:
9# Author: Stuart Herbert <stuart@gentoo.org>
10# Author: Luca Longinotti <chtekk@gentoo.org>
11# @BLURB: A unified interface for adding new PHP libraries. 11# @BLURB: A unified interface for adding new PHP libraries.
12# @DESCRIPTION: 12# @DESCRIPTION:
13# This eclass provides a unified interface for adding new PHP libraries. 13# This eclass provides a unified interface for adding new PHP libraries.
14# PHP libraries are PHP scripts designed for reuse inside other PHP scripts. 14# PHP libraries are PHP scripts designed for reuse inside other PHP scripts.
15 15
29# @USAGE: <directory to install from> <list of files> 29# @USAGE: <directory to install from> <list of files>
30# @DESCRIPTION: 30# @DESCRIPTION:
31# Takes care of install for PHP libraries. 31# Takes care of install for PHP libraries.
32# You have to pass in a list of the PHP files to install. 32# You have to pass in a list of the PHP files to install.
33 33
34# @VARIABLE: DOCS
35# @DESCRIPTION:
36# Set in ebuild if you wish to install additional, package-specific documentation.
37
34# $1 - directory in ${S} to insert from 38# $1 - directory in ${S} to insert from
35# $2 ... list of files to install 39# $2 ... list of files to install
36php-lib-r1_src_install() { 40php-lib-r1_src_install() {
37 has_php
38
39 # install to the correct phpX folder, if not specified
40 # fall back to /usr/share/php
41 if [[ -n "${PHP_SHARED_CAT}" ]] ; then
42 PHP_LIB_DIR="/usr/share/${PHP_SHARED_CAT}/${PHP_LIB_NAME}"
43 else
44 PHP_LIB_DIR="/usr/share/php/${PHP_LIB_NAME}"
45 fi
46
47 local x 41 local x
48 42
49 S_DIR="$1" 43 S_DIR="$1"
50 shift 44 shift
51 45
52 for x in $@ ; do 46 for x in $@ ; do
53 SUBDIR="`dirname ${x}`" 47 SUBDIR="$(dirname ${x})"
54 insinto "${PHP_LIB_DIR}/${SUBDIR}" 48 insinto "/usr/share/php/${PHP_LIB_NAME}/${SUBDIR}"
55 doins "${S_DIR}/${x}" 49 doins "${S_DIR}/${x}"
56 done 50 done
51
52 for doc in ${DOCS} ; do
53 [[ -s ${doc} ]] && dodoc-php ${doc}
54 done
57} 55}

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

  ViewVC Help
Powered by ViewVC 1.1.20