RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Regexp-Common.spec
blob74bdb04765e443bc912168b9ed7123a02b683da3
2 # - Regexp::Common -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=2.120 --author=Abigail Regexp-Common-2.120.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Regexp-Common
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Regexp-Common
15 summary: Regexp-Common - Provide commonly requested regular expressions
16 version: 2.120
17 release: 1
18 vendor: Abigail
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: Regexp-Common-2.120.tar.gz
28 %description
29 By default, this module exports a single hash (%RE) that stores or generates
30 commonly needed regular expressions (see "List of available patterns").
32 There is an alternative, subroutine-based syntax described in
33 "Subroutine-based interface".
36 # This package was generated automatically with the cpan2rpm
37 # utility. To get this software or for more information
38 # please visit: http://perl.arix.com/
41 %prep
42 %setup -q -n %{pkgname}-%{version}
43 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
45 %build
46 grep -rsl '^#!.*perl' . |
47 grep -v '.bak$' |xargs --no-run-if-empty \
48 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
49 CFLAGS="$RPM_OPT_FLAGS"
50 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
51 %{__make}
52 %if %maketest
53 %{__make} test
54 %endif
56 %install
57 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
59 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
61 cmd=/usr/share/spec-helper/compress_files
62 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
63 [ -x $cmd ] && $cmd
65 # SuSE Linux
66 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
67 then
68 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
69 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
70 | %{__sed} -e s+%{buildroot}++g \
71 > %{buildroot}/var/adm/perl-modules/%{name}
74 # remove special files
75 find %{buildroot} -name "perllocal.pod" \
76 -o -name ".packlist" \
77 -o -name "*.bs" \
78 |xargs -i rm -f {}
80 # no empty directories
81 find %{buildroot}%{_prefix} \
82 -type d -depth \
83 -exec rmdir {} \; 2>/dev/null
85 %{__perl} -MFile::Find -le '
86 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
87 print "%doc TODO README";
88 for my $x (sort @dirs, @files) {
89 push @ret, $x unless indirs($x);
91 print join "\n", sort @ret;
93 sub wanted {
94 return if /auto$/;
96 local $_ = $File::Find::name;
97 my $f = $_; s|^\Q%{buildroot}\E||;
98 return unless length;
99 return $files[@files] = $_ if -f $f;
101 $d = $_;
102 /\Q$d\E/ && return for reverse sort @INC;
103 $d =~ /\Q$_\E/ && return
104 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
106 $dirs[@dirs] = $_;
109 sub indirs {
110 my $x = shift;
111 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
113 ' > %filelist
115 [ -z %filelist ] && {
116 echo "ERROR: empty %files listing"
117 exit -1
120 %clean
121 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
123 %files -f %filelist
124 %defattr(-,root,root)
126 %changelog
127 * Thu Nov 23 2006 root@dca02
128 - Initial build.