1 |
# $Id: perl-URPM.spec 36978 2006-06-12 10:31:28Z rafael $ |
2 |
|
3 |
%define name perl-URPM |
4 |
%define real_name URPM |
5 |
%define version 3.38 |
6 |
%define release %mkrel 1 |
7 |
|
8 |
%define group %(perl -e 'printf "%%s\\n", "%_vendor" =~ /\\bmandr/i ? "Development/Perl" : "Applications/CPAN"') |
9 |
%define rpm_version %(rpm -q --queryformat '%|EPOCH?{[%{EPOCH}:%{VERSION}]}:{%{VERSION}}|' rpm) |
10 |
|
11 |
%{expand:%%define compat_makeinstall_std %(perl -e 'printf "%%s\n", "%{?makeinstall_std:1}" ? "%%makeinstall_std" : "%%{__make} install PREFIX=%%{buildroot}%%{_prefix}"')} |
12 |
%{expand:%%define compat_perl_vendorarch %(perl -MConfig -e 'printf "%%s\n", "%{?perl_vendorarch:1}" ? "%%{perl_vendorarch}" : "$Config{installvendorarch}"')} |
13 |
%{expand:%%define real_release %%(perl -e 'printf "%%s\\n", ("%_vendor" !~ /\\bmandr/i && ("%release" =~ /(.*?)mdk/)[0] || "%release")')} |
14 |
|
15 |
Summary: URPM module for perl |
16 |
Name: %{name} |
17 |
Version: %{version} |
18 |
Release: %{real_release} |
19 |
License: GPL or Artistic |
20 |
Group: %{group} |
21 |
Source: %{real_name}-%{version}.tar.bz2 |
22 |
URL: http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/rpm/perl-URPM/ |
23 |
BuildRequires: perl%{?mdkversion:-devel} |
24 |
BuildRequires: rpm-devel >= 4.2.3 |
25 |
BuildRequires: perl(MDV::Packdrakeng) |
26 |
|
27 |
# we can now expect librpm API to be backward compatible |
28 |
Requires: rpm >= %{rpm_version} |
29 |
Requires: perl(MDV::Packdrakeng) |
30 |
Provides: perl(URPM::Build) = %{version}-%{release} |
31 |
Provides: perl(URPM::Resolve) = %{version}-%{release} |
32 |
Provides: perl(URPM::Signature) = %{version}-%{release} |
33 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
34 |
|
35 |
Conflicts: urpmi <= 4.10.17 |
36 |
Conflicts: drakx-installer-stage2 <= 10.5.6 |
37 |
|
38 |
%define _requires_exceptions perl(URPM::DB)\\|perl(URPM::Package)\\|perl(URPM::Transaction) |
39 |
|
40 |
%description |
41 |
The URPM module allows you to manipulate rpm files, rpm header files and |
42 |
hdlist files and manage them in memory. |
43 |
|
44 |
%prep |
45 |
%setup -q -n %{real_name}-%{version} |
46 |
|
47 |
%build |
48 |
%{__perl} Makefile.PL INSTALLDIRS=vendor |
49 |
# (tv) fix segfaulting (#61144); -O1 is OK, -O2 is not, the flag that made the difference is -fno-gcse: |
50 |
%{__make} OPTIMIZE="$RPM_OPT_FLAGS -fno-gcse" |
51 |
|
52 |
%check |
53 |
%{__make} test |
54 |
|
55 |
%install |
56 |
%{__rm} -rf %{buildroot} |
57 |
%{compat_makeinstall_std} |
58 |
|
59 |
%clean |
60 |
%{__rm} -rf %{buildroot} |
61 |
|
62 |
%files |
63 |
%defattr(-,root,root) |
64 |
%doc README ChangeLog |
65 |
%{_mandir}/man3/* |
66 |
%{compat_perl_vendorarch}/URPM.pm |
67 |
%{compat_perl_vendorarch}/URPM |
68 |
%dir %{compat_perl_vendorarch}/auto/URPM |
69 |
%{compat_perl_vendorarch}/auto/URPM/URPM.so |
70 |
|