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

Diff of /eclass/perl-module.eclass

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

Revision 1.1 Revision 1.8
1# Copyright 2002 Gentoo Technologies, Inc. 1# Copyright 2002 Gentoo Technologies, Inc.
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# Author: Seemant Kulleen <seemant@gentoo.org> 3# Author: Seemant Kulleen <seemant@gentoo.org>
4# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.1 2002/05/05 02:58:39 seemant Exp $ 4# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.8 2002/05/06 14:34:55 seemant Exp $
5# The perl-module eclass is designed to allow easier installation of perl 5# The perl-module eclass is designed to allow easier installation of perl
6# modules, and their incorporation into the Gentoo Linux system. 6# modules, and their incorporation into the Gentoo Linux system.
7
8#first inherit the pkg_postinst() and pkg_postrm() functions
9. /usr/portage/eclass/inherit.eclass || die
10inherit perl-post
11
7ECLASS=base 12ECLASS=base
8EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_prerm 13EXPORT_FUNCTIONS src_compile src_install src_test
9 14
10newdepend ">=sys-devel/perl-5" 15newdepend ">=sys-devel/perl-5"
11POD_DIR=/usr/share/perl/gentoo-pods
12 16
13base_src_compile() { 17base_src_compile() {
18
14 perl Makefile.PL ${myconf} 19 perl Makefile.PL ${myconf}
20 make ${mymake} || die "compilation failed"
21}
22
23base_src_test() {
24
15 make || die 25 make test || die
16} 26}
17 27
18base_src_install() { 28base_src_install() {
19 29
20 dodir ${POD_DIR} 30 dodir ${POD_DIR}
21 31
22 make \ 32 make \
23 PREFIX=${D}/usr \ 33 PREFIX=${D}/usr \
24 INSTALLMAN1DIR=${D}/usr/share/man/man1 \ 34 INSTALLMAN1DIR=${D}/usr/share/man/man1 \
27 INSTALLMAN4DIR=${D}/usr/share/man/man4 \ 37 INSTALLMAN4DIR=${D}/usr/share/man/man4 \
28 INSTALLMAN5DIR=${D}/usr/share/man/man5 \ 38 INSTALLMAN5DIR=${D}/usr/share/man/man5 \
29 INSTALLMAN6DIR=${D}/usr/share/man/man6 \ 39 INSTALLMAN6DIR=${D}/usr/share/man/man6 \
30 INSTALLMAN7DIR=${D}/usr/share/man/man7 \ 40 INSTALLMAN7DIR=${D}/usr/share/man/man7 \
31 INSTALLMAN8DIR=${D}/usr/share/man/man8 \ 41 INSTALLMAN8DIR=${D}/usr/share/man/man8 \
42 ${myinst} \
32 install || die 43 install || die
33 44
34 eval `perl '-V:installarchlib'`
35 sed -e "s:${D}::g" \ 45 sed -e "s:${D}::g" \
36 ${D}/${installarchlib}/perllocal.pod \ 46 ${D}/${ARCH_LIB}/perllocal.pod \
37 > ${D}/${POD_DIR}/${P} 47 > ${D}/${POD_DIR}/${P}.pod
38 48
39 rm -f ${D}/${installarchlib}/perllocal.pod 49 rm -f ${D}/${ARCH_LIB}/perllocal.pod
40 50
41 dodoc ChangeLog MANIFEST NOTES README VERSIONS WARNING ToDo 51 dodoc Change* MANIFEST README* ${mydoc}
42} 52}
43
44
45base_pkg_postinst() {
46
47 base_doperlmod
48
49}
50
51base_pkg_postrm() {
52
53 base_doperlpod
54}
55
56base_doperlpod() {
57
58 eval `perl '-V:installarchlib'`
59 cat ${POD_DIR}/mod-* >> ${installarchlib}/perllocal.pod
60
61}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20