summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSeemant Kulleen <seemant@gentoo.org>2002-05-05 07:00:38 +0000
committerSeemant Kulleen <seemant@gentoo.org>2002-05-05 07:00:38 +0000
commit9462b844df47655b2969ac3363804c605b4b1ed2 (patch)
treeeffbdeacca786d053d23b85f63f5dcfc9a425ac4 /eclass
parentebuild fixes + new kernel (diff)
downloadgentoo-2-9462b844df47655b2969ac3363804c605b4b1ed2.tar.gz
gentoo-2-9462b844df47655b2969ac3363804c605b4b1ed2.tar.bz2
gentoo-2-9462b844df47655b2969ac3363804c605b4b1ed2.zip
perl post_install and post_remove functions
Diffstat (limited to 'eclass')
-rw-r--r--eclass/perl-module.eclass26
-rw-r--r--eclass/perl-post.eclass43
2 files changed, 46 insertions, 23 deletions
diff --git a/eclass/perl-module.eclass b/eclass/perl-module.eclass
index efb84d68cb6d..c560dc1d0eff 100644
--- a/eclass/perl-module.eclass
+++ b/eclass/perl-module.eclass
@@ -1,14 +1,13 @@
# 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-module.eclass,v 1.1 2002/05/05 02:58:39 seemant Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/perl-module.eclass,v 1.2 2002/05/05 07:00:38 seemant Exp $
# The perl-module eclass is designed to allow easier installation of perl
# modules, and their incorporation into the Gentoo Linux system.
ECLASS=base
-EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_prerm
+EXPORT_FUNCTIONS src_compile src_install pkg_postinst pkg_postrm
newdepend ">=sys-devel/perl-5"
-POD_DIR=/usr/share/perl/gentoo-pods
base_src_compile() {
perl Makefile.PL ${myconf}
@@ -34,28 +33,9 @@ base_src_install() {
eval `perl '-V:installarchlib'`
sed -e "s:${D}::g" \
${D}/${installarchlib}/perllocal.pod \
- > ${D}/${POD_DIR}/${P}
+ > ${D}/${POD_DIR}/${PF}.pod
rm -f ${D}/${installarchlib}/perllocal.pod
dodoc ChangeLog MANIFEST NOTES README VERSIONS WARNING ToDo
}
-
-
-base_pkg_postinst() {
-
- base_doperlmod
-
-}
-
-base_pkg_postrm() {
-
- base_doperlpod
-}
-
-base_doperlpod() {
-
- eval `perl '-V:installarchlib'`
- cat ${POD_DIR}/mod-* >> ${installarchlib}/perllocal.pod
-
-}
diff --git a/eclass/perl-post.eclass b/eclass/perl-post.eclass
new file mode 100644
index 000000000000..e1a3871486c3
--- /dev/null
+++ b/eclass/perl-post.eclass
@@ -0,0 +1,43 @@
+# 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 $
+# 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
+
+TMP_VERSION=`perl '-V:version'`
+POD_DIR="/usr/share/${version}/gentoo-pods"
+
+
+perl_pkg_postinst() {
+
+ eval `perl '-V:installarchlib'`
+ if [ -d "${POD_DIR}" ]
+ then
+ for i in `ls ${POD_DIR}`
+ do
+ if [ -f "${i}" ]
+ then
+ cat ${i} > ${installarchlib}/perllocal.pod
+ fi
+ done
+ fi
+}
+
+perl_pkg_postrm() {
+
+ eval `perl '-V:installarchlib'`
+ if [ -d "${POD_DIR}" ]
+ then
+ for i in ${POD_DIR}/*.pod
+ do
+ if [ -f "${i}" ]
+ then
+ cat ${i} > ${installarchlib}/perllocal.pod
+ fi
+ done
+ fi
+}