aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-12-09 19:38:18 +0000
committerFrancois Pons <fpons@mandriva.com>2003-12-09 19:38:18 +0000
commit4ab4b17a8db598b301d84113dba7ba5ac15a39fe (patch)
tree6c59279af0aab139c742a11efec1cef4a91a9e28
parent8e187470d7003693d839ff79b9b346c727127f7b (diff)
downloadrpmtools-4.5.14.tar
rpmtools-4.5.14.tar.gz
rpmtools-4.5.14.tar.bz2
rpmtools-4.5.14.tar.xz
rpmtools-4.5.14.zip
added RH 7.3 support4.5.14
-rw-r--r--Makefile1
-rw-r--r--rpmtools.spec38
2 files changed, 25 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index 2d5e05b..171ee8e 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ ALL_STATIC = $(FROMC_STATIC) $(FROMCC_STATIC)
CFLAGS = -Wall -g
LIBRPM = -lrpm -lrpmio `perl -e 'local $$_ = qx(rpm -q --qf %{VERSION} rpm); /^4\.0\s*$$/ or print "-lrpmdb"'` -lz -lbz2 -I/usr/include/rpm -lpopt
LIBRPM_STATIC =
+RPM=$(HOME)/rpm
all: $(ALL)
echo $(INSTALLVENDORLIB)
diff --git a/rpmtools.spec b/rpmtools.spec
index 8ff4666..84836a1 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,25 +1,32 @@
%define name rpmtools
-%define release 13mdk
+%define release 14mdk
# do not modify here, see Makefile in the CVS
%define version 4.5
-%{expand:%%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)}
+%define group %(perl -e 'printf "%%s\\n", "%_vendor" =~ /mandrake/i ? "System/Configuration/Packaging" : "System Environment/Base"')
+%define rpm_version %(rpm -q --queryformat '%{VERSION}-%{RELEASE}' rpm)
+%{expand:%%define rpm_define %%(perl -e 'printf "%%s\\n", ("%rpm_version" =~ /^(?:4\.[2-9]|[5-9]|\d{2})/ ? "-DRPM_42" : "")')}
+
+%{expand:%%define compat_makeinstall_std %(perl -e 'printf "%%s\n", "%{?makeinstall_std:1}" ? "%%makeinstall_std" : "%%{__make} install PREFIX=%%{buildroot}%%{_prefix}"')}
+%{expand:%%define compat_perl_vendorlib %(perl -MConfig -e 'printf "%%s\n", "%{?perl_vendorlib:1}" ? "%%{perl_vendorlib}" : "$Config{installvendorlib}"')}
+%{expand:%%define buildreq_perl_devel %%(perl -e 'printf "%%s\\n", "%_vendor" =~ /mandrake/i ? "perl-devel" : "perl"')}
+%{expand:%%define real_release %%(perl -e 'printf "%%s\\n", ("%_vendor" !~ /mandrake/i && ("%release" =~ /(.*?)mdk/)[0] || "%release")')}
Summary: Contains various rpm command-line tools
Name: %{name}
Version: %{version}
-Release: %{release}
+Release: %{real_release}
# get the source from our cvs repository (see
# http://www.linuxmandrake.com/en/cvs.php3)
Source0: %{name}-%{version}.tar.bz2
License: GPL
-Group: System/Configuration/Packaging
+Group: %{group}
URL: http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/rpmtools
BuildRoot: %{_tmppath}/%{name}-buildroot
Prefix: %{_prefix}
-BuildRequires: bzip2-devel gcc perl-devel rpm-devel >= 4.0
-Requires: rpm >= %{rpm_version} bzip2 >= 1.0 perl-URPM >= 0.50-2mdk
+BuildRequires: %{buildreq_perl_devel} rpm-devel >= 4.0.3 bzip2-devel
+Requires: rpm >= %{rpm_version} bzip2 >= 1.0 perl-URPM >= 0.94
Conflicts: rpmtools-compat <= 2.0 rpmtools-devel <= 2.0
%description
@@ -32,18 +39,18 @@ Various tools needed by urpmi and drakxtools for handling rpm files.
(
cd packdrake-pm ;
%{__perl} Makefile.PL INSTALLDIRS=vendor
- %{make} OPTIMIZE="$RPM_OPT_FLAGS"
+ %{__make} OPTIMIZE="$RPM_OPT_FLAGS"
)
-%{make} CFLAGS="$RPM_OPT_FLAGS -DRPM_42"
+%{__make} CFLAGS="$RPM_OPT_FLAGS %{rpm_define}"
%install
-rm -rf $RPM_BUILD_ROOT
-%{make} install PREFIX=$RPM_BUILD_ROOT
-%{makeinstall_std} -C packdrake-pm
-rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
+%{__rm} -rf %{buildroot}
+%{__make} install PREFIX=%{buildroot}
+%{compat_makeinstall_std} -C packdrake-pm
+%{__rm} -f %{buildroot}%{perl_archlib}/perllocal.pod
%clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
@@ -53,10 +60,13 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/gendistrib
%{_bindir}/distriblint
%{_bindir}/genhdlist
-%{perl_vendorlib}/packdrake.pm
+%{compat_perl_vendorlib}/packdrake.pm
%{_mandir}/*/*
%changelog
+* Tue Dec 9 2003 François Pons <fpons@mandrakesoft.com> 4.5-14mdk
+- added compability with RH 7.3.
+
* Thu Aug 28 2003 François Pons <fpons@mandrakesoft.com> 4.5-13mdk
- added support for %%{ARCH} in gendistrib.
- removing remaining MD5SUM files when running gendistrib.