/[gentoo-x86]/app-doc/php-docs/php-docs-20101029-r1.ebuild
Gentoo

Contents of /app-doc/php-docs/php-docs-20101029-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Tue May 29 16:55:57 2012 UTC (2 years, 3 months ago) by aballier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
keyword ~amd64-fbsd

(Portage version: 2.2.0_alpha108/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-doc/php-docs/php-docs-20101029-r1.ebuild,v 1.8 2012/03/19 19:08:08 armin76 Exp $
4
5 EAPI="4"
6
7 DESCRIPTION="HTML documentation for PHP"
8 HOMEPAGE="http://www.php.net/download-docs.php"
9
10 MY_PN="php_manual"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd"
15 IUSE=""
16
17 RESTRICT="strip binchecks"
18
19 LANGS="en de es fa fr ja pl pt_BR ro tr"
20 for lang in ${LANGS} ; do
21 IUSE="${IUSE} linguas_${lang}"
22 SRC_URI="${SRC_URI}
23 linguas_${lang}? ( http://olemarkus.org/~olemarkus/gentoo/${MY_PN}_${lang}-${PV}.tar.gz )"
24 done
25
26 REQUIRED_USE="|| ( ${IUSE} )"
27
28 # Set English to default
29 IUSE="${IUSE/linguas_en/+linguas_en}"
30
31 S=${WORKDIR}
32
33 src_unpack() {
34 for lang in ${LANGS} ; do
35 if use linguas_${lang} ; then
36 mkdir ${lang}
37 pushd ${lang} >/dev/null
38 unpack ${MY_PN}_${lang}-${PV}.tar.gz || die "unpack failed on ${lang}"
39 popd >/dev/null
40 fi
41 done
42 }
43
44 pkg_preinst() {
45 # remove broken/stale symlink created by previous ebuilds
46 [[ -L ${EROOT}/usr/share/php-docs ]] && rm -f "${EROOT}"/usr/share/php-docs
47 }
48
49 src_install() {
50 dodir /usr/share/doc/${PF}
51
52 for lang in ${LANGS} ; do
53 if use linguas_${lang} ; then
54 ebegin "Installing ${lang} manual, will take a while"
55 cp -R "${WORKDIR}"/${lang} "${ED}"/usr/share/doc/${PF} || die "cp failed on ${lang}"
56 eend $?
57 fi
58 done
59
60 einfo "Creating symlink to PHP manual at /usr/share/php-docs"
61 dosym /usr/share/doc/${PF} /usr/share/php-docs
62 }

  ViewVC Help
Powered by ViewVC 1.1.20