RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / XML-NamespaceSupport.spec
blobe4b989d1aca13ee376837c72217cab8aa344e779
2 # - XML::NamespaceSupport -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.09 '--author=Robin Berjon' XML-NamespaceSupport-1.09.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname XML-NamespaceSupport
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-XML-NamespaceSupport
15 summary: XML-NamespaceSupport - a simple generic namespace support class
16 version: 1.09
17 release: 1
18 vendor: Robin Berjon
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-NamespaceSupport-1.09.tar.gz
28 %description
29 This module offers a simple to process namespaced XML names (unames)
30 from within any application that may need them. It also helps maintain
31 a prefix to namespace URI map, and provides a number of basic checks.
33 The model for this module is SAX2's NamespaceSupport class, readable at
34 http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/helpers/NamespaceSupport.html.
35 It adds a few perlisations where we thought it appropriate.
38 # This package was generated automatically with the cpan2rpm
39 # utility. To get this software or for more information
40 # please visit: http://perl.arix.com/
43 %prep
44 %setup -q -n %{pkgname}-%{version}
45 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
47 %build
48 grep -rsl '^#!.*perl' . |
49 grep -v '.bak$' |xargs --no-run-if-empty \
50 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
51 CFLAGS="$RPM_OPT_FLAGS"
52 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
53 %{__make}
54 %if %maketest
55 %{__make} test
56 %endif
58 %install
59 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
61 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
63 cmd=/usr/share/spec-helper/compress_files
64 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
65 [ -x $cmd ] && $cmd
67 # SuSE Linux
68 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
69 then
70 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
71 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
72 | %{__sed} -e s+%{buildroot}++g \
73 > %{buildroot}/var/adm/perl-modules/%{name}
76 # remove special files
77 find %{buildroot} -name "perllocal.pod" \
78 -o -name ".packlist" \
79 -o -name "*.bs" \
80 |xargs -i rm -f {}
82 # no empty directories
83 find %{buildroot}%{_prefix} \
84 -type d -depth \
85 -exec rmdir {} \; 2>/dev/null
87 %{__perl} -MFile::Find -le '
88 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
89 print "%doc Changes README";
90 for my $x (sort @dirs, @files) {
91 push @ret, $x unless indirs($x);
93 print join "\n", sort @ret;
95 sub wanted {
96 return if /auto$/;
98 local $_ = $File::Find::name;
99 my $f = $_; s|^\Q%{buildroot}\E||;
100 return unless length;
101 return $files[@files] = $_ if -f $f;
103 $d = $_;
104 /\Q$d\E/ && return for reverse sort @INC;
105 $d =~ /\Q$_\E/ && return
106 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
108 $dirs[@dirs] = $_;
111 sub indirs {
112 my $x = shift;
113 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
115 ' > %filelist
117 [ -z %filelist ] && {
118 echo "ERROR: empty %files listing"
119 exit -1
122 %clean
123 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
125 %files -f %filelist
126 %defattr(-,root,root)
128 %changelog
129 * Thu Nov 23 2006 root@dca02
130 - Initial build.