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

Contents of /eclass/perl-post.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Mon Jun 2 10:01:15 2003 UTC (17 years, 1 month ago) by mcummings
Branch: MAIN
Branch point for: RELEASE-1_4
Changes since 1.11: +0 -0 lines
recommitting until the cached ebuilds that point here are gone

1 # Copyright 1999-2003 Gentoo Technologies, Inc.
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /home/cvsroot/gentoo-x86/eclass/perl-post.eclass,v 1.10 2003/02/16 04:26:21 vapier Exp $
4 #
5 # Author: Seemant Kulleen <seemant@gentoo.org>
6 #
7 # The perl-post eclass is designed to allow the ${installarchdir}/perllocal.pod
8 # file to be updated cleanly after perl and/or perl-modules are installed
9 # or removed.
10
11 ECLASS=perl-post
12 INHERITED="$INHERITED $ECLASS"
13
14 EXPORT_FUNCTIONS pkg_setup pkg_preinst pkg_postinst pkg_prerm pkg_postrm \
15 perlinfo updatepod
16
17 SITE_LIB=""
18 ARCH_LIB=""
19 POD_DIR=""
20
21
22 perl-post_pkg_setup() {
23
24 perlinfo
25 }
26
27
28 perl-post_pkg_preinst() {
29
30 perlinfo
31 }
32
33 perl-post_pkg_postinst() {
34
35 updatepod
36 }
37
38 perl-post_pkg_prerm() {
39
40 updatepod
41 }
42
43 perl-post_pkg_postrm() {
44
45 updatepod
46 }
47
48 perl-post_perlinfo() {
49
50 if [ -f /usr/bin/perl ]
51 then
52 eval `perl '-V:installarchlib'`
53 eval `perl '-V:installsitearch'`
54 ARCH_LIB=${installarchlib}
55 SITE_LIB=${installsitearch}
56
57 eval `perl '-V:version'`
58 POD_DIR="/usr/share/perl/gentoo-pods/${version}"
59 fi
60
61 }
62
63 perl-post_updatepod() {
64 perlinfo
65
66 if [ -d "${POD_DIR}" ]
67 then
68 for FILE in `find ${POD_DIR} -type f -name "*.pod.arch"`; do
69 cat ${FILE} >> ${ARCH_LIB}/perllocal.pod
70 rm -f ${FILE}
71 done
72 for FILE in `find ${POD_DIR} -type f -name "*.pod.site"`; do
73 cat ${FILE} >> ${SITE_LIB}/perllocal.pod
74 rm -f ${FILE}
75 done
76
77 #cat ${POD_DIR}/*.pod.arch >> ${ARCH_LIB}/perllocal.pod
78 #cat ${POD_DIR}/*.pod.site >> ${SITE_LIB}/perllocal.pod
79 #rm -f ${POD_DIR}/*.pod.site
80 #rm -f ${POD_DIR}/*.pod.site
81 fi
82 }

  ViewVC Help
Powered by ViewVC 1.1.20