summaryrefslogtreecommitdiff
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/perl-post.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/perl-post.eclass')
-rw-r--r--eclass/perl-post.eclass43
1 files changed, 43 insertions, 0 deletions
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
+}