Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / XML-SAX-Writer.spec
bloba1e5614412094894c62f37dfe70089899e9656da
2 # - XML::SAX::Writer -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.50 '--author=Perl XML Community' XML-SAX-Writer-0.50.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname XML-SAX-Writer
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-XML-SAX-Writer
15 summary: XML-SAX-Writer - SAX2 XML Writer
16 version: 0.50
17 release: 1
18 vendor: Perl XML Community
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-Writer-0.50.tar.gz
28 %description
29 None.
32 # This package was generated automatically with the cpan2rpm
33 # utility. To get this software or for more information
34 # please visit: http://perl.arix.com/
37 %prep
38 %setup -q -n %{pkgname}-%{version}
39 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
41 %build
42 grep -rsl '^#!.*perl' . |
43 grep -v '.bak$' |xargs --no-run-if-empty \
44 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
45 CFLAGS="$RPM_OPT_FLAGS"
46 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
47 %{__make}
48 %if %maketest
49 %{__make} test
50 %endif
52 %install
53 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
55 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
57 cmd=/usr/share/spec-helper/compress_files
58 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
59 [ -x $cmd ] && $cmd
61 # SuSE Linux
62 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
63 then
64 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
65 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
66 | %{__sed} -e s+%{buildroot}++g \
67 > %{buildroot}/var/adm/perl-modules/%{name}
70 # remove special files
71 find %{buildroot} -name "perllocal.pod" \
72 -o -name ".packlist" \
73 -o -name "*.bs" \
74 |xargs -i rm -f {}
76 # no empty directories
77 find %{buildroot}%{_prefix} \
78 -type d -depth \
79 -exec rmdir {} \; 2>/dev/null
81 %{__perl} -MFile::Find -le '
82 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
83 print "%doc Changes README";
84 for my $x (sort @dirs, @files) {
85 push @ret, $x unless indirs($x);
87 print join "\n", sort @ret;
89 sub wanted {
90 return if /auto$/;
92 local $_ = $File::Find::name;
93 my $f = $_; s|^\Q%{buildroot}\E||;
94 return unless length;
95 return $files[@files] = $_ if -f $f;
97 $d = $_;
98 /\Q$d\E/ && return for reverse sort @INC;
99 $d =~ /\Q$_\E/ && return
100 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
102 $dirs[@dirs] = $_;
105 sub indirs {
106 my $x = shift;
107 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
109 ' > %filelist
111 [ -z %filelist ] && {
112 echo "ERROR: empty %files listing"
113 exit -1
116 %clean
117 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
119 %files -f %filelist
120 %defattr(-,root,root)
122 %changelog
123 * Fri Nov 24 2006 root@dca02
124 - Initial build.