X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.spec;h=c31428a3498423c9b769a0547294177c3bb4d6aa;hb=d68708d13fa5e28142a4edf58a8fd491cb85b72d;hp=ad79f0db527c334f8d7c56d2f0b46e515a2a8ee3;hpb=bb75684277c021eaf8f6b4965cf5526cfeb4dafa;p=packages%2Frpm.git diff --git a/rpm.spec b/rpm.spec index ad79f0d..c31428a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,23 +1,24 @@ # # TODO: -# - use system libmagic not internal libfmagic -# - when really needed: _noauto{req,prov} for non-helper-generated deps +# - consider using system libmagic not internal libfmagic +# (but internal has different method of passing output) # # Conditional build: %bcond_with static # build static rpmi (not supported at the moment) %bcond_without doc # don't generate documentation with doxygen %bcond_without python # don't build python bindings +%bcond_without selinux # dont enable selinux support # force_cc - force using __cc other than "%{_target_cpu}-pld-linux-gcc" # force_cxx - force using __cxx other than "%{_target_cpu}-pld-linux-g++" # force_cpp - force using __cpp other than "%{_target_cpu}-pld-linux-gcc -E" -%include /usr/lib/rpm/macros.python -%define snap 20040107 +%include /usr/lib/rpm/macros.python +%define snap 20040107 # versions of required libraries %define reqdb_ver 4.2.50-1 %define reqpopt_ver 1.9 %define beecrypt_ver 3.0.0-0.20030610.1 -%define rpm_macros_rev 1.143 +%define rpm_macros_rev 1.153 Summary: RPM Package Manager Summary(de): RPM Packet-Manager Summary(es): Gestor de paquetes RPM @@ -28,7 +29,7 @@ Summary(uk): Name: rpm %define ver 4.3 Version: %{ver} -Release: 0.%{snap}.12 +Release: 0.%{snap}.23 License: GPL Group: Base #Source0: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x/%{name}-%{version}.%{snap}.tar.gz @@ -91,6 +92,9 @@ Patch38: %{name}-file-readelf.patch Patch39: %{name}-pentiumX.patch Patch40: %{name}-epoch0.patch Patch41: %{name}-file-readelf-fix.patch +Patch42: %{name}-cpuid.patch +Patch43: %{name}-perl_req-INC_dirs.patch +Patch44: %{name}-debuginfo.patch URL: http://www.rpm.org/ Icon: rpm.gif BuildRequires: autoconf >= 2.52 @@ -102,7 +106,9 @@ BuildRequires: db-devel >= %{reqdb_ver} BuildRequires: gettext-devel >= 0.11.4-2 BuildRequires: elfutils-devel #BuildRequires: libmagic-devel -BuildRequires: libselinux-devel +%{?with_selinux:BuildRequires: libselinux-devel} +# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros +BuildRequires: libstdc++-devel BuildRequires: libtool BuildRequires: patch >= 2.2 BuildRequires: popt-devel >= %{reqpopt_ver} @@ -119,7 +125,7 @@ BuildRequires: db-static >= %{reqdb_ver} BuildRequires: glibc-static >= 2.2.94 BuildRequires: elfutils-static #BuildRequires: libmagic-static -BuildRequires: libselinux-static +%{?with_selinux:BuildRequires: libselinux-static} BuildRequires: popt-static >= %{reqpopt_ver} BuildRequires: zlib-static %endif @@ -207,7 +213,7 @@ Requires: beecrypt-devel >= %{beecrypt_ver} Requires: bzip2-devel Requires: db-devel >= %{reqdb_ver} Requires: elfutils-devel -Requires: libselinux-devel +%{?with_selinux:Requires: libselinux-devel} Requires: popt-devel >= %{reqpopt_ver} Requires: zlib-devel @@ -563,8 +569,8 @@ construir pacotes usando o RPM. %patch21 -p1 sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in cp -f platform.in macros.pld.in -echo '%%define __perl_provides /usr/lib/rpm/perl.prov' > macros.perl -echo '%%define __perl_requires /usr/lib/rpm/perl.req' >> macros.perl +echo '%%define __perl_provides %%{__perl} /usr/lib/rpm/perl.prov' > macros.perl +echo '%%define __perl_requires %%{__perl} /usr/lib/rpm/perl.req' >> macros.perl echo '# obsoleted file' > macros.python echo '%%define __php_provides /usr/lib/rpm/php.prov' > macros.php echo '%%define __php_requires /usr/lib/rpm/php.req' >> macros.php @@ -593,6 +599,9 @@ cat %{SOURCE11} >> macros.in %patch39 -p1 %patch40 -p1 %patch41 -p1 +%patch42 -p1 +%patch43 -p0 +%patch44 -p1 cd scripts; mv -f perl.req perl.req.in @@ -631,8 +640,8 @@ cd .. # config.guess doesn't handle athlon, so we have to change it by hand. # rpm checks for CPU type at runtime, but it looks better -sed -e 's|@host@|%{_target_cpu}-%{_target_vendor}-linux-gnu|' \ - -e 's|@host_cpu@|%{_target_cpu}|' macros.in > macros.tmp +sed -e 's|@host@|%{_target_cpu}-%{_target_vendor}-linux-gnu|' \ + -e 's|@host_cpu@|%{_target_cpu}|' macros.in > macros.tmp mv -f macros.tmp macros.in # pass CC and CXX too in case of building with some older configure macro @@ -645,6 +654,7 @@ mv -f macros.tmp macros.in %{?with_doc:--with-apidocs} \ %{?with_python:--with-python=auto} \ %{!?with_python:--without-python} \ + %{!?with_selinux:--without-selinux} \ --without-db # file_LDFLAGS, debugedit_LDADD - no need to link "file" and "debugedit" statically @@ -703,8 +713,8 @@ cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros < $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <