RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Class-Std.spec
blobc3986e2f614f90566265d4ee89a122d36ba26c43
2 # - Class::Std::v0.0.8.tar.gz -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --spec Class-Std.spec --version=0.0.8 '--author=Damian Conway' Class-Std-v0.0.8.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Class-Std-v0.0.8.tar.gz
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-Class-Std
15 summary: Class-Std - Perl module
16 version: 0.0.8
17 release: 1
18 vendor: Damian Conway
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: Class-Std-v0.0.8.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 Class-Std-v%{version}
39 chmod -R u+w %{_builddir}/Class-Std-v%{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 %{__perl} Build.PL --install_path bin=/usr/bin/ --install_path lib=/usr/lib/perl5/site_perl --install_path libdoc=/usr/share/man/man3
46 %{__perl} Build
47 %if %maketest
48 %{__perl} Build test
49 %endif
51 %install
52 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
54 %{__perl} Build install destdir=%{buildroot}
56 cmd=/usr/share/spec-helper/compress_files
57 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
58 [ -x $cmd ] && $cmd
60 # SuSE Linux
61 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
62 then
63 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
64 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
65 | %{__sed} -e s+%{buildroot}++g \
66 > %{buildroot}/var/adm/perl-modules/%{name}
69 # remove special files
70 find %{buildroot} -name "perllocal.pod" \
71 -o -name ".packlist" \
72 -o -name "*.bs" \
73 |xargs -i rm -f {}
75 # no empty directories
76 find %{buildroot}%{_prefix} \
77 -type d -depth \
78 -exec rmdir {} \; 2>/dev/null
80 %{__perl} -MFile::Find -le '
81 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
82 print "%doc demo Changes README";
83 for my $x (sort @dirs, @files) {
84 push @ret, $x unless indirs($x);
86 print join "\n", sort @ret;
88 sub wanted {
89 return if /auto$/;
91 local $_ = $File::Find::name;
92 my $f = $_; s|^\Q%{buildroot}\E||;
93 return unless length;
94 return $files[@files] = $_ if -f $f;
96 $d = $_;
97 /\Q$d\E/ && return for reverse sort @INC;
98 $d =~ /\Q$_\E/ && return
99 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
101 $dirs[@dirs] = $_;
104 sub indirs {
105 my $x = shift;
106 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
108 ' > %filelist
110 [ -z %filelist ] && {
111 echo "ERROR: empty %files listing"
112 exit -1
115 %clean
116 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
118 %files -f %filelist
119 %defattr(-,root,root)
121 %changelog
122 * Fri Nov 17 2006 root@dca02
123 - Initial build.