Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / XML-SAX.spec
blob08a7d09ba073903e04cff77901f2ab794ba31bce
2 # - XML::SAX -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.14 '--author=Matt Seargeant' XML-SAX-0.14.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname XML-SAX
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-XML-SAX
15 summary: XML-SAX - Simple API for XML
16 version: 0.14
17 release: 1
18 vendor: Matt Seargeant
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: XML-SAX-0.14.tar.gz
28 %description
29 XML::SAX is a SAX parser access API for Perl. It includes classes
30 and APIs required for implementing SAX drivers, along with a factory
31 class for returning any SAX parser installed on the user's system.
34 # This package was generated automatically with the cpan2rpm
35 # utility. To get this software or for more information
36 # please visit: http://perl.arix.com/
39 %prep
40 %setup -q -n %{pkgname}-%{version}
41 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
43 %build
44 grep -rsl '^#!.*perl' . |
45 grep -v '.bak$' |xargs --no-run-if-empty \
46 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
47 CFLAGS="$RPM_OPT_FLAGS"
48 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
49 %{__make}
50 %if %maketest
51 %{__make} test
52 %endif
54 %install
55 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
57 #%{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
58 make DESTDIR=%{buildroot} install_site `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
59 echo %{buildroot} - %{perl_sitelib}
60 #cat << EOF > $RPM_BUILD_ROOT/%{perl_vendorlib}/XML/SAX/ParserDetails.ini
61 cat << EOF > %{buildroot}/%{perl_sitelib}/XML/SAX/ParserDetails.ini
62 [XML::SAX::PurePerl]
63 http://xml.org/sax/features/namespaces = 1
64 EOF
66 cmd=/usr/share/spec-helper/compress_files
67 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
68 [ -x $cmd ] && $cmd
70 # SuSE Linux
71 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
72 then
73 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
74 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
75 | %{__sed} -e s+%{buildroot}++g \
76 > %{buildroot}/var/adm/perl-modules/%{name}
79 # remove special files
80 find %{buildroot} -name "perllocal.pod" \
81 -o -name ".packlist" \
82 -o -name "*.bs" \
83 |xargs -i rm -f {}
85 # no empty directories
86 find %{buildroot}%{_prefix} \
87 -type d -depth \
88 -exec rmdir {} \; 2>/dev/null
90 %{__perl} -MFile::Find -le '
91 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
92 print "%doc testfiles Changes SAX XML-SAX-Base README LICENSE";
93 for my $x (sort @dirs, @files) {
94 push @ret, $x unless indirs($x);
96 print join "\n", sort @ret;
98 sub wanted {
99 return if /auto$/;
101 local $_ = $File::Find::name;
102 my $f = $_; s|^\Q%{buildroot}\E||;
103 return unless length;
104 return $files[@files] = $_ if -f $f;
106 $d = $_;
107 /\Q$d\E/ && return for reverse sort @INC;
108 $d =~ /\Q$_\E/ && return
109 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
111 $dirs[@dirs] = $_;
114 sub indirs {
115 my $x = shift;
116 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
118 ' > %filelist
120 [ -z %filelist ] && {
121 echo "ERROR: empty %files listing"
122 exit -1
125 %clean
126 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
128 %files -f %filelist
129 %defattr(-,root,root)
130 # %config(noreplace) %{perl_vendorlib}/XML/SAX/ParserDetails.ini
132 %changelog
133 * Fri Nov 24 2006 root@dca02
134 - Initial build.