/[gentoo-x86]/eclass/perl-module.eclass
Gentoo

Contents of /eclass/perl-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.18 - (show annotations) (download)
Wed Aug 7 01:49:17 2002 UTC (12 years, 4 months ago) by mcummings
Branch: MAIN
Changes since 1.17: +9 -3 lines
Emergency fix - the target dir gets lost in 5.6.1 (installs, just not to
the right path). New eclass checks version before adding PREFIX

1 # Copyright 2002 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License, v2
3 # Author: Seemant Kulleen <seemant@gentoo.org>
4 # $Header: /home/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.17 2002/08/05 20:53:56 mcummings Exp $
5 # The perl-module eclass is designed to allow easier installation of perl
6 # modules, and their incorporation into the Gentoo Linux system.
7
8 #first inherit the pkg_postinst() and pkg_postrm() functions
9 inherit perl-post
10
11 ECLASS=perl-module
12 INHERITED="$INHERITED $ECLASS"
13
14 EXPORT_FUNCTIONS src_compile src_install src_test
15
16 newdepend ">=sys-devel/perl-5"
17
18 SRC_PREP="no"
19
20 perl-module_src_prep() {
21
22 SRC_PREP="yes"
23 eval `perl '-V:version'`
24 if [ ${version} == '5.6.1' ];
25 then
26 perl Makefile.PL ${myconf}
27 else
28 perl Makefile.PL ${myconf} \
29 PREFIX=${D}/usr
30 fi
31 }
32
33 perl-module_src_compile() {
34
35 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
36 make ${mymake} || die "compilation failed"
37 }
38
39 perl-module_src_test() {
40 make test
41 }
42
43 perl-module_src_install() {
44
45 perl-post_perlinfo
46 dodir ${POD_DIR}
47
48 test -z ${mytargets} && mytargets="install"
49
50 make \
51 PREFIX=${D}/usr \
52 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
53 INSTALLMAN2DIR=${D}/usr/share/man/man2 \
54 INSTALLMAN3DIR=${D}/usr/share/man/man3 \
55 INSTALLMAN4DIR=${D}/usr/share/man/man4 \
56 INSTALLMAN5DIR=${D}/usr/share/man/man5 \
57 INSTALLMAN6DIR=${D}/usr/share/man/man6 \
58 INSTALLMAN7DIR=${D}/usr/share/man/man7 \
59 INSTALLMAN8DIR=${D}/usr/share/man/man8 \
60 ${myinst} \
61 ${mytargets} || die
62
63 sed -e "s:${D}::g" \
64 ${D}/${ARCH_LIB}/perllocal.pod \
65 > ${D}/${POD_DIR}/${P}.pod
66
67 rm -f ${D}/${ARCH_LIB}/perllocal.pod
68
69 dodoc Change* MANIFEST* README* ${mydoc}
70 }

  ViewVC Help
Powered by ViewVC 1.1.20