3 # This spec file was automatically generated by cpan2rpm [ver: 1.16]
4 # The following arguments were used:
5 # --spec-only --version=1.16 '--author=Graham Barr' TimeDate-1.16.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname TimeDate
10 %define filelist
%{pkgname}-%{version}-filelist
11 %define NVR
%{pkgname}-%{version}-%{release}
15 summary
: TimeDate
- Perl module
19 packager
: Arix International
<cpan2rpm@arix.com
>
21 group
: Applications
/CPAN
22 url
: http
://www.cpan.org
23 buildroot
: %{_tmppath}/%{name}-%{version}-%
(id
-u
-n
)
25 prefix
: %
(echo %{_prefix})
26 source: TimeDate
-1.16.tar.gz
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/
38 %setup -q
-n
%{pkgname}-%{version}
39 chmod
-R u
+w
%{_builddir}/%{pkgname}-%{version}
42 grep
-rsl '^
#!.*perl' . |
43 grep
-v '.bak$' |xargs
--no
-run
-if-empty \
44 %__perl -MExtUtils
::MakeMaker
-e 'MY
->fixin
(@ARGV
)'
45 CFLAGS
="$RPM_OPT_FLAGS"
46 %{__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 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
55 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
57 cmd
=/usr
/share
/spec
-helper
/compress_files
58 [ -x $cmd
] || cmd
=/usr
/lib
/rpm
/brp
-compress
62 if [ -e
/etc
/SuSE
-release
-o
-e
/etc
/UnitedLinux
-release
]
64 %{__mkdir_p} %{buildroot}/var
/adm
/perl
-modules
65 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
66 |
%{__sed} -e s+%{buildroot}++g \
67 > %{buildroot}/var/adm/perl-modules/%{name}
70 # remove special files
71 find
%{buildroot} -name "perllocal.pod" \
72 -o
-name ".packlist" \
76 # no empty directories
77 find
%{buildroot}%{_prefix} \
79 -exec rmdir {} \
; 2>/dev
/null
81 %{__perl} -MFile
::Find
-le '
82 find
({ wanted
=> \
&wanted
, no_chdir
=> 1}, "
%{buildroot}"
);
84 for my $x
(sort @
dirs, @files
) {
85 push @ret
, $x unless indirs
($x
);
87 print join "\n"
, sort @ret
;
92 local $_
= $File
::Find
::name
;
93 my $f
= $_
; s|^\Q
%{buildroot}\E||
;
95 return $files
[@files
] = $_
if -f $f
;
98 /\Q$d\E
/ && return for reverse sort @INC
;
99 $d
=~
/\Q$_\E
/ && return
100 for qw|
/etc
%_prefix/man
%_prefix/bin
%_prefix/share|
;
107 $x
=~
/^\Q$_\E\
// && $x ne $_
&& return 1 for @
dirs;
111 [ -z
%filelist ] && {
112 echo "ERROR
: empty
%files listing"
117 [ "
%{buildroot}" != "/" ] && rm -rf %{buildroot}
120 %defattr(-,root
,root
)
123 * Thu Nov
23 2006 root@dca02