]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- part of debuginfo changes now as patch
[packages/rpm.git] / rpm.spec
index 974eb428d244c93262679616e26a1d88dce5be62..a75a342b90b66ce7229f73f90a0a0b69276b21b6 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -5,8 +5,9 @@
 #
 # Conditional build:
 %bcond_with    static  # build static rpmi (not supported at the moment)
-%bcond_without docs    # don't generate documentation with doxygen
+%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"
@@ -17,7 +18,7 @@
 %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.145
 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}.8
+Release:       0.%{snap}.19
 License:       GPL
 Group:         Base
 #Source0:      ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x/%{name}-%{version}.%{snap}.tar.gz
@@ -88,6 +89,12 @@ Patch35:     %{name}-missing-prototypes.patch
 Patch36:       %{name}-pld-autodep.patch
 Patch37:       %{name}-rpmsq.patch
 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
@@ -95,11 +102,11 @@ BuildRequires:     automake
 BuildRequires: beecrypt-devel >= %{beecrypt_ver}
 BuildRequires: bzip2-devel >= 1.0.1
 BuildRequires: db-devel >= %{reqdb_ver}
-%{?with_docs:BuildRequires:    doxygen}
+%{?with_doc:BuildRequires:     doxygen}
 BuildRequires: gettext-devel >= 0.11.4-2
 BuildRequires: elfutils-devel
 #BuildRequires:        libmagic-devel
-BuildRequires: libselinux-devel
+%{?with_selinux:BuildRequires: libselinux-devel}
 BuildRequires: libtool
 BuildRequires: patch >= 2.2
 BuildRequires: popt-devel >= %{reqpopt_ver}
@@ -116,7 +123,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
@@ -202,9 +209,9 @@ Group:              Development/Libraries
 Requires:      %{name}-lib = %{version}-%{release}
 Requires:      beecrypt-devel >= %{beecrypt_ver}
 Requires:      bzip2-devel
-Requires:      db-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
 
@@ -264,7 +271,7 @@ Group:              Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 Requires:      beecrypt-static >= %{beecrypt_ver}
 Requires:      bzip2-static
-Requires:      db-static
+Requires:      db-static >= %{reqdb_ver}
 Requires:      elfutils-static
 Requires:      popt-static >= %{reqpopt_ver}
 Requires:      zlib-static
@@ -560,8 +567,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
@@ -587,6 +594,12 @@ cat %{SOURCE11} >> macros.in
 %patch36 -p1
 %patch37 -p1
 %patch38 -p1
+%patch39 -p1
+%patch40 -p1
+%patch41 -p1
+%patch42 -p1
+%patch43 -p0
+%patch44 -p1
 
 cd scripts;
 mv -f perl.req perl.req.in
@@ -636,9 +649,10 @@ mv -f macros.tmp macros.in
        CPP="%{__cpp}" \
        --enable-shared \
        --enable-static \
-       %{?with_docs:--with-apidocs} \
+       %{?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
@@ -682,11 +696,23 @@ install %{SOURCE32} $RPM_BUILD_ROOT%{_bindir}/pldnotify.awk
 install rpmio/ugid.h $RPM_BUILD_ROOT%{_includedir}/rpm
 
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm
+
+%ifarch %{ix86}
+ix86re=$(echo "(%{ix86})"|sed 's/ /|/g')
+perl -p -i -e 's/^(buildarchtranslate: '"$ix86re"': ).*/\1%{_target_cpu}/' \
+       $RPM_BUILD_ROOT%{_rpmlibdir}/rpmrc
+%endif
+
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
 # customized rpm macros - global for host
 #
 #%%_install_langs pl_PL:en_US
 %%distribution PLD
+#
+# remove or replace with file_contexts path if you want to use custom
+# SELinux file contexts policy instead of one stored in packages payload
+%%_install_file_context_path   %%{nil}
+%%_verify_file_context_path    %%{nil}
 EOF
 
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <<EOF
@@ -727,6 +753,9 @@ for a in librpm-%{ver}.so librpmdb-%{ver}.so librpmio-%{ver}.so ; do
        ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
 done
 
+# fix debug script
+perl -pi -e 's#/.*/debugedit#%{_bindir}/debugedit#g' $RPM_BUILD_ROOT%{_rpmlibdir}/find-debuginfo.sh
+
 for f in $RPM_BUILD_ROOT%{_datadir}/locale/{en_RN,eu_ES,gl,hu,ro,wa,zh,zh_CN.GB2312}/LC_MESSAGES/rpm.mo ; do
        [ "`file $f | sed -e 's/.*,//' -e 's/message.*//'`" -le 1 ] && rm -f $f
 done
@@ -817,8 +846,9 @@ find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 %attr(755,root,root) %{_rpmlibdir}/rpmb
 %attr(755,root,root) %{_rpmlibdir}/rpmt
 %{_rpmlibdir}/noarch-*
-%ifarch i386 i486 i586 i686 athlon
+%ifarch %{ix86}
 %{_rpmlibdir}/i?86*
+%{_rpmlibdir}/pentium*
 %{_rpmlibdir}/athlon*
 %endif
 %ifarch amd64
This page took 0.037441 seconds and 4 git commands to generate.