diff options
author | Seemant Kulleen <seemant@gentoo.org> | 2002-05-05 08:05:32 +0000 |
---|---|---|
committer | Seemant Kulleen <seemant@gentoo.org> | 2002-05-05 08:05:32 +0000 |
commit | 67ca54720c0db631ea83701980be70e431f1d2b5 (patch) | |
tree | d4bcf5f5a7135a7477f32e23c63a56edade1981a /eclass/perl-post.eclass | |
parent | . (diff) | |
download | gentoo-2-67ca54720c0db631ea83701980be70e431f1d2b5.tar.gz gentoo-2-67ca54720c0db631ea83701980be70e431f1d2b5.tar.bz2 gentoo-2-67ca54720c0db631ea83701980be70e431f1d2b5.zip |
tinkering
Diffstat (limited to 'eclass/perl-post.eclass')
-rw-r--r-- | eclass/perl-post.eclass | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/eclass/perl-post.eclass b/eclass/perl-post.eclass index e1a3871486c3..4169b924bdd5 100644 --- a/eclass/perl-post.eclass +++ b/eclass/perl-post.eclass @@ -1,43 +1,63 @@ # Copyright 2002 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 # Author: Seemant Kulleen <seemant@gentoo.org> -# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.1 2002/05/05 07:00:38 seemant Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.2 2002/05/05 08:05:32 seemant Exp $ # The perl-post eclass is designed to allow the ${installarchdir}/perllocal.pod # file to be updated cleanly after perl and/or perl-modules are installed # or removed. ECLASS=perl -EXPORT_FUNCTIONS pkg_postinst pkg_postrm +EXPORT_FUNCTIONS pkg_preinst pkg_postinst pkg_prerm pkg_postrm perlinfo -TMP_VERSION=`perl '-V:version'` -POD_DIR="/usr/share/${version}/gentoo-pods" +perl_pkg_preinst() { + + perlinfo +} perl_pkg_postinst() { - eval `perl '-V:installarchlib'` + perlinfo + if [ -d "${POD_DIR}" ] then for i in `ls ${POD_DIR}` do if [ -f "${i}" ] then - cat ${i} > ${installarchlib}/perllocal.pod + cat ${i} > ${ARCH_LIB}/perllocal.pod fi done fi } -perl_pkg_postrm() { +perl_pkg_prerm() { + + perlinfo +} - eval `perl '-V:installarchlib'` +perl_pkg_postrm() { + + perlinfo + + einfo ${POD_DIR} + if [ -d "${POD_DIR}" ] then for i in ${POD_DIR}/*.pod do if [ -f "${i}" ] then - cat ${i} > ${installarchlib}/perllocal.pod + cat ${i} > ${ARCH_LIB}/perllocal.pod fi done fi } + + +perl_perlinfo() { + + TMP_VERSION="`if [ -f /usr/bin/perl ] ; then perl '-V:version' ; fi`" + ARCH_LIB="`if [ -f /usr/bin/perl ] ; then perl '-V:installarchlib' ; fi`" + POD_DIR="/usr/share/perl/gentoo-pods/${version}" + +} |