1 diff -urN rpm-3.0.5.orig/configure.in rpm-3.0.5/configure.in
2 --- rpm-3.0.5.orig/configure.in Sun Jul 30 00:05:48 2000
3 +++ rpm-3.0.5/configure.in Sun Jul 30 00:07:06 2000
5 AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
6 AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
7 AC_PATH_PROG(__PATCH, patch, /usr/bin/patch, $MYPATH)
8 + AC_PATH_PROG(PERL, perl, /usr/bin/perl, $MYPATH)
9 AC_MSG_CHECKING(old version of patch)
10 PATCHVERSION=`patch --version 2>&1`
13 dnl export LIBS INCPATH CONFIG_SITE
15 AC_CONFIG_SUBDIRS(popt)
16 -AC_OUTPUT([Doxyfile Makefile rpmrc macros macros.pld platform rpmpopt scripts/brp-redhat
17 +AC_OUTPUT([Doxyfile Makefile rpmrc macros macros.pld platform rpmpopt
18 + scripts/brp-redhat macros.perl scripts/perl.req scripts/perl.prov
19 lib/Makefile build/Makefile tools/Makefile scripts/Makefile
20 tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
21 misc/Makefile po/Makefile.in intl/Makefile
22 diff -urN rpm-3.0.5.orig/macros.in rpm-3.0.5/macros.in
23 --- rpm-3.0.5.orig/macros.in Sun Jul 30 00:05:48 2000
24 +++ rpm-3.0.5/macros.in Sun Jul 30 00:07:06 2000
26 # %{perl_sitearch}/Image
27 # %dir %{perl_sitearch}/auto/Image
30 +# NOTE: %{perl_sitearch}, %{perl_archlib} and %{perl_sitelib} macros
31 +# has been moved to macros.perl (see info in this file for details).
33 %requires_eq() %(LC_ALL="C" rpm -q --queryformat 'Requires:%%{NAME} = %%{VERSION}' %1| grep -v "is not")
34 -%perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
35 -%perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
37 #------------------------------------------------------------------------------
38 # arch macro for all Intel i?86 compatibile processors
39 diff -urN rpm-3.0.5.orig/macros.perl.in rpm-3.0.5/macros.perl.in
40 --- rpm-3.0.5.orig/macros.perl.in Thu Jan 1 01:00:00 1970
41 +++ rpm-3.0.5/macros.perl.in Sun Jul 30 00:07:06 2000
43 +# Perl specific macro definitions.
44 +# To make use of these macros insert the following line into your spec file:
45 +# %include @RPMCONFIGDIR@/macros.perl
47 +%define __find_requires @RPMCONFIGDIR@/find-perl-requires
48 +%define __find_provides @RPMCONFIGDIR@/find-perl-provides
50 +%define perl_sitelib %(eval "`perl -V:installsitelib`"; echo $installsitelib)
51 +%define perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch)
52 +%define perl_archlib %(eval "`perl -V:installarchlib`"; echo $installarchlib)
54 diff -urN rpm-3.0.5.orig/scripts/Makefile.am rpm-3.0.5/scripts/Makefile.am
55 --- rpm-3.0.5.orig/scripts/Makefile.am Sun Jul 9 17:36:20 2000
56 +++ rpm-3.0.5/scripts/Makefile.am Sun Jul 30 00:07:51 2000
58 find-prov.pl find-req.pl cpanflute find-provides.perl \
59 find-requires.perl get_magic.pl getpo.sh http.req \
60 magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \
61 - vpkg-provides.sh vpkg-provides2.sh
62 + vpkg-provides.sh vpkg-provides2.sh \
63 + find-perl-requires find-perl-provides
65 installprefix = $(DESTDIR)
68 find-prov.pl find-req.pl cpanflute find-provides.perl \
69 find-requires.perl get_magic.pl getpo.sh http.req \
70 magic.prov magic.req perl.prov perl.req rpmdiff rpmdiff.cgi u_pkg.sh \
71 - vpkg-provides.sh vpkg-provides2.sh
72 + vpkg-provides.sh vpkg-provides2.sh \
73 + find-perl-requires find-perl-provides
74 diff -urN rpm-3.0.5.orig/scripts/find-perl-provides rpm-3.0.5/scripts/find-perl-provides
75 --- rpm-3.0.5.orig/scripts/find-perl-provides Thu Jan 1 01:00:00 1970
76 +++ rpm-3.0.5/scripts/find-perl-provides Sun Jul 30 00:07:06 2000
81 +filelist=`sed "s/['\"]/\\\&/g"`
83 +echo $filelist|/usr/lib/rpm/find-provides
84 +/usr/lib/rpm/perl.prov $filelist
86 diff -urN rpm-3.0.5.orig/scripts/find-perl-requires rpm-3.0.5/scripts/find-perl-requires
87 --- rpm-3.0.5.orig/scripts/find-perl-requires Thu Jan 1 01:00:00 1970
88 +++ rpm-3.0.5/scripts/find-perl-requires Sun Jul 30 00:07:06 2000
93 +filelist=`sed "s/['\"]/\\\&/g"`
95 +requires="`echo $filelist|/usr/lib/rpm/find-requires`"
96 +requires_perl="`/usr/lib/rpm/perl.req $filelist`"
97 +requires_mod="`rpm -q --whatprovides --qf "%{NAME}\n" $requires_perl 2>/dev/null`"
100 +$requires_mod"| sort -u
101 diff -urN rpm-3.0.5.orig/scripts/perl.prov rpm-3.0.5/scripts/perl.prov
102 --- rpm-3.0.5.orig/scripts/perl.prov Wed Jun 14 14:34:50 2000
103 +++ rpm-3.0.5/scripts/perl.prov Sun Jul 30 00:07:06 2000
109 + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) {
116 # contents of the file.
120 + if (! m=(/(doc|usr/src)/|\.(so|gz|ph|pod|h|html)$)=) {
126 diff -urN rpm-3.0.5.orig/scripts/perl.req rpm-3.0.5/scripts/perl.req
127 --- rpm-3.0.5.orig/scripts/perl.req Wed Jun 14 14:34:50 2000
128 +++ rpm-3.0.5/scripts/perl.req Sun Jul 30 00:07:06 2000
133 # RPM (and it's source code) is covered under two separate licenses.
140 + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
141 + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
149 # contents of the file.
153 + if (m=/usr/(sbin|bin|lib|share|X11R6/(lib|bin))/=) {
154 + if (! m=(/(doc|man|info|usr/src)/|\.(so|ph|h|html|pod)$)=) {
162 foreach $module (sort keys %require) {
163 if (length($require{$module}) == 0) {
164 - print "perl($module)\n";
165 + if ($module =~ /^[0-9._]+$/) {
166 + print "perl >= $module\n";
168 + print "perl($module)\n";
172 # I am not using rpm3.0 so I do not want spaces arround my
174 # will be included with the name sys/systeminfo.ph so only use the
175 # basename of *.ph files
177 - ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g );
178 + # ($module =~ m/\.ph$/) && ($module =~ s!.*/!!g );
180 + # there is no need to generate dependencies for ph, pl or test files
181 + # so let's just skip them.
183 + ($module =~ m/\.(ph|pl|t)$/) && next;
185 + # skip all modules for platforms other than linux.
187 + ($module =~ m/Mac|OS2|MSDOS|Win32|VMS|vmsish/) && next;
189 + # if the module name starts in a dot it is not a module name.
191 + ($module =~ m/^\./) && next;
193 + # if the module ends with .pm strip it to leave only basename.
195 + $module =~ s/\.pm$//;
197 + $module =~ s/\//::/;
199 + # trim off trailing parenthesis if any. Sometimes people pass
200 + # the module an empty list.
202 + $module =~ s/\(\s*\)$//;
205 $require{$module}=$version;