Debian package updates by Jochen Kunkel
[openxpki.git] / trunk / package / suse / external-dependencies / DateTime.spec
blob86a6622a29b4a75ab3c98f73de4bf333b0bbfe0b
2 # - DateTime -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=0.35 '--author=Dave Rolsky' DateTime-0.35.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname DateTime
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 1
14 name: perl-DateTime
15 summary: DateTime - DateTime base objects
16 version: 0.35
17 release: 1
18 vendor: Dave Rolsky
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: DateTime-0.35.tar.gz
27 %description
28 DateTime is a class for the representation of date/time combinations,
29 and is part of the Perl DateTime project. For details on this project
30 please see <http://datetime.perl.org/>. The DateTime site has a FAQ
31 which may help answer many "how do I do X?" questions. The FAQ is at
32 <http://datetime.perl.org/faq.html>.
34 It represents the Gregorian calendar, extended backwards in time
35 before its creation (in 1582). This is sometimes known as the
36 "proleptic Gregorian calendar". In this calendar, the first day of
37 the calendar (the epoch), is the first day of year 1, which
38 corresponds to the date which was (incorrectly) believed to be the
39 birth of Jesus Christ.
41 The calendar represented does have a year 0, and in that way differs
42 from how dates are often written using "BCE/CE" or "BC/AD".
44 For infinite datetimes, please see the
45 DateTime::Infinite module.
48 # This package was generated automatically with the cpan2rpm
49 # utility. To get this software or for more information
50 # please visit: http://perl.arix.com/
53 %prep
54 %setup -q -n %{pkgname}-%{version}
55 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
57 %build
58 grep -rsl '^#!.*perl' . |
59 grep -v '.bak$' |xargs --no-run-if-empty \
60 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
61 CFLAGS="$RPM_OPT_FLAGS"
62 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
63 %{__make}
64 %if %maketest
65 %{__make} test
66 %endif
68 %install
69 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
71 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
73 cmd=/usr/share/spec-helper/compress_files
74 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
75 [ -x $cmd ] && $cmd
77 # SuSE Linux
78 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
79 then
80 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
81 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
82 | %{__sed} -e s+%{buildroot}++g \
83 > %{buildroot}/var/adm/perl-modules/%{name}
86 # remove special files
87 find %{buildroot} -name "perllocal.pod" \
88 -o -name ".packlist" \
89 -o -name "*.bs" \
90 |xargs -i rm -f {}
92 # no empty directories
93 find %{buildroot}%{_prefix} \
94 -type d -depth \
95 -exec rmdir {} \; 2>/dev/null
97 %{__perl} -MFile::Find -le '
98 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
99 print "%doc leaptab.txt TODO tools Changes README LICENSE";
100 for my $x (sort @dirs, @files) {
101 push @ret, $x unless indirs($x);
103 print join "\n", sort @ret;
105 sub wanted {
106 return if /auto$/;
108 local $_ = $File::Find::name;
109 my $f = $_; s|^\Q%{buildroot}\E||;
110 return unless length;
111 return $files[@files] = $_ if -f $f;
113 $d = $_;
114 /\Q$d\E/ && return for reverse sort @INC;
115 $d =~ /\Q$_\E/ && return
116 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
118 $dirs[@dirs] = $_;
121 sub indirs {
122 my $x = shift;
123 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
125 ' > %filelist
127 [ -z %filelist ] && {
128 echo "ERROR: empty %files listing"
129 exit -1
132 %clean
133 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
135 %files -f %filelist
136 %defattr(-,root,root)
138 %changelog
139 * Thu Nov 23 2006 root@dca02
140 - Initial build.