Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / XML-Filter-XInclude.spec
blobc3b14571257bea826ad2964ac37b2dc7ff6c8fcd
2 # - XML::Filter::XInclude -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.0 '--author=Matt Sergeant' XML-Filter-XInclude-1.0.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname XML-Filter-XInclude
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-XML-Filter-XInclude
15 summary: XML-Filter-XInclude - XInclude as a SAX Filter
16 version: 1.0
17 release: 1
18 vendor: Matt Sergeant
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-Filter-XInclude-1.0.tar.gz
28 %description
29 This module implements a simple SAX filter that provides XInclude
30 support. It does *NOT* support XPointer.
32 XInclude is very simple, just include something like this in
33 your XML document:
35 <xi:include href="foo.xml"
36 xmlns:xi="http://www.w3.org/2001/XInclude"/>
38 And it will load foo.xml and parse it in the current SAX stream.
40 If you specify the attribute parse="text", it will be treated as
41 a plain text file, and inserted into the stream as a series of calls
42 to the characters() method.
44 URI's are supported via LWP.
46 Currently encoding is not supported.
49 # This package was generated automatically with the cpan2rpm
50 # utility. To get this software or for more information
51 # please visit: http://perl.arix.com/
54 %prep
55 %setup -q -n %{pkgname}-%{version}
56 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
58 %build
59 grep -rsl '^#!.*perl' . |
60 grep -v '.bak$' |xargs --no-run-if-empty \
61 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
62 CFLAGS="$RPM_OPT_FLAGS"
63 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
64 %{__make}
65 %if %maketest
66 %{__make} test
67 %endif
69 %install
70 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
72 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
74 cmd=/usr/share/spec-helper/compress_files
75 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
76 [ -x $cmd ] && $cmd
78 # SuSE Linux
79 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
80 then
81 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
82 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
83 | %{__sed} -e s+%{buildroot}++g \
84 > %{buildroot}/var/adm/perl-modules/%{name}
87 # remove special files
88 find %{buildroot} -name "perllocal.pod" \
89 -o -name ".packlist" \
90 -o -name "*.bs" \
91 |xargs -i rm -f {}
93 # no empty directories
94 find %{buildroot}%{_prefix} \
95 -type d -depth \
96 -exec rmdir {} \; 2>/dev/null
98 %{__perl} -MFile::Find -le '
99 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
100 print "%doc Changes examples README";
101 for my $x (sort @dirs, @files) {
102 push @ret, $x unless indirs($x);
104 print join "\n", sort @ret;
106 sub wanted {
107 return if /auto$/;
109 local $_ = $File::Find::name;
110 my $f = $_; s|^\Q%{buildroot}\E||;
111 return unless length;
112 return $files[@files] = $_ if -f $f;
114 $d = $_;
115 /\Q$d\E/ && return for reverse sort @INC;
116 $d =~ /\Q$_\E/ && return
117 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
119 $dirs[@dirs] = $_;
122 sub indirs {
123 my $x = shift;
124 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
126 ' > %filelist
128 [ -z %filelist ] && {
129 echo "ERROR: empty %files listing"
130 exit -1
133 %clean
134 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
136 %files -f %filelist
137 %defattr(-,root,root)
139 %changelog
140 * Fri Nov 24 2006 root@dca02
141 - Initial build.