| 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: $
|
| 5 |
# The perl-module eclass is designed to allow easier installation of perl
|
| 6 |
# modules, and their incorporation into the Gentoo Linux system.
|
| 7 |
ECLASS=base
|
| 8 |
EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_prerm
|
| 9 |
|
| 10 |
newdepend ">=sys-devel/perl-5"
|
| 11 |
POD_DIR=/usr/share/perl/gentoo-pods
|
| 12 |
|
| 13 |
base_src_compile() {
|
| 14 |
perl Makefile.PL ${myconf}
|
| 15 |
make || die
|
| 16 |
}
|
| 17 |
|
| 18 |
base_src_install() {
|
| 19 |
|
| 20 |
dodir ${POD_DIR}
|
| 21 |
|
| 22 |
make \
|
| 23 |
PREFIX=${D}/usr \
|
| 24 |
INSTALLMAN1DIR=${D}/usr/share/man/man1 \
|
| 25 |
INSTALLMAN2DIR=${D}/usr/share/man/man2 \
|
| 26 |
INSTALLMAN3DIR=${D}/usr/share/man/man3 \
|
| 27 |
INSTALLMAN4DIR=${D}/usr/share/man/man4 \
|
| 28 |
INSTALLMAN5DIR=${D}/usr/share/man/man5 \
|
| 29 |
INSTALLMAN6DIR=${D}/usr/share/man/man6 \
|
| 30 |
INSTALLMAN7DIR=${D}/usr/share/man/man7 \
|
| 31 |
INSTALLMAN8DIR=${D}/usr/share/man/man8 \
|
| 32 |
install || die
|
| 33 |
|
| 34 |
eval `perl '-V:installarchlib'`
|
| 35 |
sed -e "s:${D}::g" \
|
| 36 |
${D}/${installarchlib}/perllocal.pod \
|
| 37 |
> ${D}/${POD_DIR}/${P}
|
| 38 |
|
| 39 |
rm -f ${D}/${installarchlib}/perllocal.pod
|
| 40 |
|
| 41 |
dodoc ChangeLog MANIFEST NOTES README VERSIONS WARNING ToDo
|
| 42 |
}
|
| 43 |
|
| 44 |
|
| 45 |
base_pkg_postinst() {
|
| 46 |
|
| 47 |
base_doperlmod
|
| 48 |
|
| 49 |
}
|
| 50 |
|
| 51 |
base_pkg_postrm() {
|
| 52 |
|
| 53 |
base_doperlpod
|
| 54 |
}
|
| 55 |
|
| 56 |
base_doperlpod() {
|
| 57 |
|
| 58 |
eval `perl '-V:installarchlib'`
|
| 59 |
cat ${POD_DIR}/mod-* >> ${installarchlib}/perllocal.pod
|
| 60 |
|
| 61 |
}
|