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

Contents of /app-doc/php-docs/php-docs-20100730.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Mon Aug 2 17:41:26 2010 UTC (4 years ago) by mabi
Branch: MAIN
CVS Tags: HEAD
bump
(Portage version: 2.1.8.3/cvs/Linux x86_64)

1 # Copyright 1999-2010 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-20100723.ebuild,v 1.1 2010/07/26 12:57:45 mabi Exp $
4
5 EAPI="3"
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 ~x86-fbsd"
15 IUSE="+linguas_en"
16 SRC_URI="linguas_en? ( http://www.php.net/distributions/manual/${MY_PN}_en.tar.gz )"
17
18 RESTRICT="strip binchecks"
19
20 LANGS="de es fa fr ja pl pt_BR ro tr"
21 for lang in ${LANGS} ; do
22 IUSE="${IUSE} linguas_${lang}"
23 SRC_URI="${SRC_URI}
24 linguas_${lang}? ( http://www.php.net/distributions/manual/${MY_PN}_${lang}.tar.gz )"
25 done
26
27 S=${WORKDIR}
28
29 src_unpack() {
30 for lang in en ${LANGS} ; do
31 if use linguas_${lang} ; then
32 mkdir ${lang}
33 pushd ${lang} >/dev/null
34 unpack ${MY_PN}_${lang}.tar.gz || die "unpack failed on ${lang}"
35 popd >/dev/null
36 fi
37 done
38 }
39
40 pkg_preinst() {
41 # remove broken/stale symlink created by previous ebuilds
42 [[ -L ${EROOT}/usr/share/php-docs ]] && rm -f "${EROOT}"/usr/share/php-docs
43 }
44
45 src_install() {
46 dodir /usr/share/doc/${PF}
47
48 for lang in en ${LANGS} ; do
49 if use linguas_${lang} ; then
50 ebegin "Installing ${lang} manual, will take a while"
51 cp -R "${WORKDIR}"/${lang} "${ED}"/usr/share/doc/${PF} || die "cp failed on ${lang}"
52 eend $?
53 fi
54 done
55
56 einfo "Creating symlink to PHP manual at /usr/share/php-docs"
57 dosym /usr/share/doc/${PF} /usr/share/php-docs
58 }

  ViewVC Help
Powered by ViewVC 1.1.20