RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / version.spec
blobe3f67a2180c350cd78f78403eb1c62e5ab0ea27d
2 # - version -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.68 '--author=John Peacock' version-0.68.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname version
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-version
15 summary: version - Perl module
16 version: 0.68
17 release: 1
18 vendor: John Peacock
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 prefix: %(echo %{_prefix})
25 source: version-0.68.tar.gz
27 %description
28 None.
31 # This package was generated automatically with the cpan2rpm
32 # utility. To get this software or for more information
33 # please visit: http://perl.arix.com/
36 %prep
37 %setup -q -n %{pkgname}-%{version}
38 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
40 %build
41 grep -rsl '^#!.*perl' . |
42 grep -v '.bak$' |xargs --no-run-if-empty \
43 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
44 %{__perl} Build.PL
45 %{__perl} Build
46 %if %maketest
47 %{__perl} Build test
48 %endif
50 %install
51 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
53 %{__perl} Build install destdir=%{buildroot}
55 cmd=/usr/share/spec-helper/compress_files
56 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
57 [ -x $cmd ] && $cmd
59 # SuSE Linux
60 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
61 then
62 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
63 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
64 | %{__sed} -e s+%{buildroot}++g \
65 > %{buildroot}/var/adm/perl-modules/%{name}
68 # remove special files
69 find %{buildroot} -name "perllocal.pod" \
70 -o -name ".packlist" \
71 -o -name "*.bs" \
72 |xargs -i rm -f {}
74 # no empty directories
75 find %{buildroot}%{_prefix} \
76 -type d -depth \
77 -exec rmdir {} \; 2>/dev/null
79 %{__perl} -MFile::Find -le '
80 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
81 print "%doc vutil vperl Changes README";
82 for my $x (sort @dirs, @files) {
83 push @ret, $x unless indirs($x);
85 print join "\n", sort @ret;
87 sub wanted {
88 return if /auto$/;
90 local $_ = $File::Find::name;
91 my $f = $_; s|^\Q%{buildroot}\E||;
92 return unless length;
93 return $files[@files] = $_ if -f $f;
95 $d = $_;
96 /\Q$d\E/ && return for reverse sort @INC;
97 $d =~ /\Q$_\E/ && return
98 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
100 $dirs[@dirs] = $_;
103 sub indirs {
104 my $x = shift;
105 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
107 ' > %filelist
109 [ -z %filelist ] && {
110 echo "ERROR: empty %files listing"
111 exit -1
114 %clean
115 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
117 %files -f %filelist
118 %defattr(-,root,root)
120 %changelog
121 * Fri Nov 17 2006 root@dca02
122 - Initial build.