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

Contents of /eclass/perl-module.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.33 - (hide annotations) (download)
Sun Feb 16 04:26:21 2003 UTC (11 years, 7 months ago) by vapier
Branch: MAIN
Changes since 1.32: +4 -2 lines
header fixes

1 vapier 1.33 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 vapier 1.30 # Distributed under the terms of the GNU General Public License v2
3 vapier 1.33 # $Header: $
4     #
5 seemant 1.1 # Author: Seemant Kulleen <seemant@gentoo.org>
6 vapier 1.33 #
7 seemant 1.1 # The perl-module eclass is designed to allow easier installation of perl
8     # modules, and their incorporation into the Gentoo Linux system.
9 seemant 1.3
10     #first inherit the pkg_postinst() and pkg_postrm() functions
11     inherit perl-post
12    
13 danarmak 1.14 ECLASS=perl-module
14 danarmak 1.13 INHERITED="$INHERITED $ECLASS"
15    
16 seemant 1.8 EXPORT_FUNCTIONS src_compile src_install src_test
17 seemant 1.1
18 mcummings 1.25 eval `perl '-V:version'`
19 mcummings 1.32 DEPEND="sys-devel/perl
20     >=dev-perl/ExtUtils-MakeMaker-6.05-r1
21     ${DEPEND}"
22 azarah 1.11 SRC_PREP="no"
23    
24 aliz 1.15 perl-module_src_prep() {
25 azarah 1.11
26     SRC_PREP="yes"
27 mcummings 1.21 perl Makefile.PL ${myconf} \
28     PREFIX=${D}/usr
29 azarah 1.11 }
30    
31 aliz 1.15 perl-module_src_compile() {
32 seemant 1.6
33 aliz 1.15 [ "${SRC_PREP}" != "yes" ] && perl-module_src_prep
34 seemant 1.7 make ${mymake} || die "compilation failed"
35 seemant 1.8 }
36    
37 aliz 1.15 perl-module_src_test() {
38 seemant 1.9 make test
39 seemant 1.1 }
40    
41 aliz 1.15 perl-module_src_install() {
42 seemant 1.12
43 seemant 1.16 perl-post_perlinfo
44 seemant 1.1 dodir ${POD_DIR}
45    
46 seemant 1.9 test -z ${mytargets} && mytargets="install"
47 mcummings 1.31 eval `perl '-V:installsitearch'`
48     SITE_ARCH=${installsitearch}
49     eval `perl '-V:installarchlib'`
50     ARCH_LIB=${installarchlib}
51    
52 seemant 1.9
53 seemant 1.1 make \
54 seemant 1.27 PREFIX=${D}/usr \
55     INSTALLMAN1DIR=${D}/usr/share/man/man1 \
56     INSTALLMAN2DIR=${D}/usr/share/man/man2 \
57     INSTALLMAN3DIR=${D}/usr/share/man/man3 \
58     INSTALLMAN4DIR=${D}/usr/share/man/man4 \
59     INSTALLMAN5DIR=${D}/usr/share/man/man5 \
60     INSTALLMAN6DIR=${D}/usr/share/man/man6 \
61     INSTALLMAN7DIR=${D}/usr/share/man/man7 \
62     INSTALLMAN8DIR=${D}/usr/share/man/man8 \
63 mcummings 1.31 INSTALLSITEMAN1DIR=${D}/usr/share/man/man1 \
64     INSTALLSITEMAN2DIR=${D}/usr/share/man/man2 \
65     INSTALLSITEMAN3DIR=${D}/usr/share/man/man3 \
66     INSTALLSITEMAN4DIR=${D}/usr/share/man/man4 \
67     INSTALLSITEMAN5DIR=${D}/usr/share/man/man5 \
68     INSTALLSITEMAN6DIR=${D}/usr/share/man/man6 \
69     INSTALLSITEMAN7DIR=${D}/usr/share/man/man7 \
70     INSTALLSITEMAN8DIR=${D}/usr/share/man/man8 \
71     INSTALLSITEARCH=${D}/${SITE_ARCH} \
72     INSTALLSCRIPT=${D}/usr/bin \
73 seemant 1.27 ${myinst} \
74     ${mytargets} || die
75 mcummings 1.20
76    
77     if [ -f ${D}${ARCH_LIB}/perllocal.pod ];
78     then
79 seemant 1.27 touch ${D}/${POD_DIR}/${P}.pod
80     sed -e "s:${D}::g" \
81     ${D}${ARCH_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
82     touch ${D}/${POD_DIR}/${P}.pod.arch
83     cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.arch
84     rm -f ${D}/${ARCH_LIB}/perllocal.pod
85 mcummings 1.20 fi
86 seemant 1.1
87 mcummings 1.20 if [ -f ${D}${SITE_LIB}/perllocal.pod ];
88     then
89 seemant 1.27 touch ${D}/${POD_DIR}/${P}.pod
90     sed -e "s:${D}::g" \
91     ${D}${SITE_LIB}/perllocal.pod >> ${D}/${POD_DIR}/${P}.pod
92     touch ${D}/${POD_DIR}/${P}.pod.site
93     cat ${D}/${POD_DIR}/${P}.pod >>${D}/${POD_DIR}/${P}.pod.site
94     rm -f ${D}/${SITE_LIB}/perllocal.pod
95 mcummings 1.20 fi
96 seemant 1.1
97 seemant 1.9 dodoc Change* MANIFEST* README* ${mydoc}
98 seemant 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20