summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-13 14:19:10 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2006-03-13 14:19:10 +0000
commit8a76774931ef2104853b265dbeac2563e105a415 (patch)
treecefa442f904c652bab93e025b08621d6fdb52bdc
parenteb231750a5407050b49bea981221f4686fb9f407 (diff)
downloadurpmi-8a76774931ef2104853b265dbeac2563e105a415.tar
urpmi-8a76774931ef2104853b265dbeac2563e105a415.tar.gz
urpmi-8a76774931ef2104853b265dbeac2563e105a415.tar.bz2
urpmi-8a76774931ef2104853b265dbeac2563e105a415.tar.xz
urpmi-8a76774931ef2104853b265dbeac2563e105a415.zip
Portability patch by Buchan Milne. Also, buildrequire perl (for Time::HiRes)
and perl(Net::LDAP) instead of the more mdv-specific perl-ldap.
-rw-r--r--urpmi.spec18
1 files changed, 12 insertions, 6 deletions
diff --git a/urpmi.spec b/urpmi.spec
index bad0e2fe..28cc74fc 100644
--- a/urpmi.spec
+++ b/urpmi.spec
@@ -6,20 +6,25 @@
#
##################################################################
+# local RH-friendly definition of %mkrel, so we can assume it works and drop
+# other release hacking macros
+%{?!mkrel: %define mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?distsuffix:.%distsuffix}%{?distversion}}
+%{?!makeinstall_std: %define makeinstall_std() make DESTDIR=%{?buildroot:%{buildroot}} install}
+
%define name urpmi
%define version 4.8.13
%define release %mkrel 1
%define group %(perl -e 'print "%_vendor" =~ /\\bmandr/i ? "System/Configuration/Packaging" : "System Environment/Base"')
-%{expand:%%define compat_perl_vendorlib %(perl -MConfig -e 'print "%{?perl_vendorlib:1}" ? "%%{perl_vendorlib}" : "$Config{installvendorlib}"')}
-%{expand:%%define allow_gurpmi %%(perl -e 'print "%_vendor" =~ /\\bmandr/i ? 1 : 0')}
-%{expand:%%define req_webfetch %%(perl -e 'print "%_vendor" =~ /\\bmandr/i ? "webfetch" : "curl wget"')}
-%{expand:%%define real_release %%(perl -e 'print "%_vendor" =~ /\\bmandr/i ? "%release" : ("%release" =~ /(\d+)/)[0]')}
+%define compat_perl_vendorlib %(perl -MConfig -e 'print "%{?perl_vendorlib:1}" ? "%{perl_vendorlib}" : "$Config{installvendorlib}"')
+%global allow_gurpmi %(perl -e 'print "%_vendor" =~ /\\bmandr/i ? 1 : 0')
+%define req_webfetch %(perl -e 'print "%_vendor" =~ /\\bmandr/i ? "webfetch" : "curl wget"')
+%{?!%_sys_macros_dir: %global _sys_macros_dir /etc/rpm}
Name: %{name}
Version: %{version}
-Release: %{real_release}
+Release: %{release}
Group: %{group}
License: GPL
Source0: %{name}-%{version}.tar.bz2
@@ -33,8 +38,9 @@ Requires: perl-URPM >= 1.37
Requires: perl-MDV-Packdrakeng >= 1.01
BuildRequires: bzip2-devel
BuildRequires: gettext
+BuildRequires: perl
BuildRequires: perl-File-Slurp
-BuildRequires: perl-ldap
+BuildRequires: perl(Net::LDAP)
BuildRequires: perl-URPM >= 1.36
BuildRequires: perl-MDV-Packdrakeng
BuildRequires: perl-Locale-gettext >= 1.01-14mdk