]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- updated amd64 patch
[packages/rpm.git] / rpm.spec
index 6e52e0f1730ebff152f103d54b784bbe2b203ce8..ea26e77b6664cb6db34940d174fcbe314cc4b137 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,26 +1,25 @@
 #
 # TODO:
-# - learn find-perl-provides to use the __perl macro instead
-#   of /usr/bin/perl
-#   NOTE: there is no find-perl* now, only perl.{prov,req}
-# - use system libmagic not internal libfmagic
+# - consider using system libmagic not internal libfmagic
+#   (but internal has different method of passing output)
+# - after ac drop amd64 patch and make x86_64 generic arch + subarchs amd64 and ia32e
 #
 # Conditional build:
-%bcond_without static  # - build shared /bin/rpm (doesn't work at the moment)
-%bcond_without docs    # - don't generate documentation with doxygen
-%bcond_without python  # don't build python bindings
-
+%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   20030610
+%include       /usr/lib/rpm/macros.python
+%define        snap    20040614
 # 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.133
+%define        rpm_macros_rev  1.158
 Summary:       RPM Package Manager
 Summary(de):   RPM Packet-Manager
 Summary(es):   Gestor de paquetes RPM
@@ -29,76 +28,74 @@ Summary(pt_BR):     Gerenciador de pacotes RPM
 Summary(ru):   íÅÎÅÄÖÅÒ ÐÁËÅÔÏ× ÏÔ RPM
 Summary(uk):   íÅÎÅÄÖÅÒ ÐÁËÅԦנצĠRPM
 Name:          rpm
-%define        ver     4.3
+%define        ver     4.4
+%define        sover   4.3
 Version:       %{ver}
-Release:       0.%{snap}.32
+Release:       0.%{snap}.0.1
 License:       GPL
 Group:         Base
 #Source0:      ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x/%{name}-%{version}.%{snap}.tar.gz
-Source0:       ftp://distfiles.pld-linux.org/src/%{name}-%{version}.%{snap}.tar.gz
-# Source0-md5: f923fe5ca8f0803868ae7bcc0fabe9bb
+Source0:       ftp://distfiles.pld-linux.org/src/%{name}-%{version}.%{snap}.tar.bz2
+# Source0-md5: a91b8e17f6e69208b188d2876e80aef9
 Source1:       %{name}.groups
 Source2:       %{name}.platform
 Source3:       %{name}-install-tree
-Source4:       %{name}-find-rpm-provides
-Source5:       %{name}-find-spec-bcond
-Source6:       %{name}-find-lang
-Source7:       %{name}-find-provides
-Source8:       %{name}-find-requires
-Source9:       %{name}-groups-po.awk
-Source10:      %{name}-compress-doc
-Source11:      %{name}-check-files
-Source12:      %{name}-php-provides
-Source13:      %{name}-php-requires
-Source14:      %{name}.macros
-Source15:      %{name}-find-provides-wrapper
-Source16:      %{name}-find-requires-wrapper
+Source4:       %{name}-find-spec-bcond
+Source5:       %{name}-find-lang
+Source6:       %{name}-groups-po.awk
+Source7:       %{name}-compress-doc
+Source8:       %{name}-check-files
+Source9:       %{name}-php-provides
+Source10:      %{name}-php-requires
+Source11:      %{name}.macros
+Source12:      perl.prov
 Source30:      builder
 Source31:      adapter.awk
 Source32:      pldnotify.awk
-Source33:      perl.prov
 Patch0:                %{name}-pl.po.patch
 Patch1:                %{name}-rpmrc.patch
 Patch2:                %{name}-arch.patch
 Patch3:                %{name}-rpmpopt.patch
 Patch4:                %{name}-perl-macros.patch
 Patch5:                %{name}-perl-req-perlfile.patch
-Patch6:                %{name}-glob.patch
 Patch7:                %{name}-noexpand.patch
 Patch8:                %{name}-scripts-closefds.patch
 Patch9:                %{name}-python-macros.patch
 Patch10:       %{name}-gettext-in-header.patch
 Patch11:       %{name}-compress-doc.patch
-Patch12:       %{name}-gettext0.11.patch
-Patch13:       %{name}-build.patch
-Patch14:       %{name}-system_libs.patch
-Patch15:       %{name}-bb-and-short-circuit.patch
-Patch16:       %{name}-etc_dir.patch
-Patch17:       %{name}-system_libs-more.patch
-Patch18:       %{name}-php-deps.patch
-Patch19:       %{name}-python-fix.patch
-Patch20:       %{name}-ldconfig-always.patch
-Patch21:       %{name}-perl_req.patch
-Patch22:       %{name}-system_libs_more.patch
-Patch23:       %{name}-python_2_3.patch
-Patch24:       %{name}-no-bin-env.patch
-Patch25:       %{name}-specflags.patch
-Patch26:       %{name}-magic-usesystem.patch
-Patch27:       %{name}-dontneedutils.patch
-Patch28:       %{name}-python-beecrypt.patch
-Patch29:       %{name}-man-typos.patch
-Patch30:       %{name}-man-pl.patch
-Patch31:       %{name}-fdClose-typo.patch
-Patch32:       %{name}-userpmdepswrappers.patch
-Patch33:       %{name}-provides-dont-obsolete.patch
-Patch34:       %{name}-examplesaredoc.patch
-Patch35:       %{name}-po.patch
-Patch36:       %{name}-amd64.patch
-Patch37:       %{name}-notsc.patch
-Patch38:       %{name}-hack-norpmlibdep.patch
-Patch39:       %{name}-db42.patch
-Patch40:       %{name}-makefile-no_myLDADD_deps.patch
-Patch41:       %{name}-libdir64.patch
+Patch12:       %{name}-build.patch
+Patch13:       %{name}-system_libs.patch
+Patch14:       %{name}-bb-and-short-circuit.patch
+Patch15:       %{name}-etc_dir.patch
+Patch16:       %{name}-system_libs-more.patch
+Patch17:       %{name}-php-deps.patch
+Patch18:       %{name}-python-fix.patch
+Patch19:       %{name}-ldconfig-always.patch
+Patch20:       %{name}-perl_req.patch
+Patch21:       %{name}-no-bin-env.patch
+Patch22:       %{name}-magic-usesystem.patch
+Patch23:       %{name}-dontneedutils.patch
+Patch24:       %{name}-provides-dont-obsolete.patch
+Patch25:       %{name}-examplesaredoc.patch
+Patch26:       %{name}-po.patch
+Patch27:       %{name}-amd64.patch
+Patch28:       %{name}-notsc.patch
+Patch29:       %{name}-hack-norpmlibdep.patch
+Patch30:       %{name}-makefile-no_myLDADD_deps.patch
+Patch31:       %{name}-libdir64.patch
+Patch32:       %{name}-libdir-links.patch
+Patch33:       %{name}-context.patch
+Patch34:       %{name}-nls-fixes.patch
+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
@@ -106,10 +103,14 @@ BuildRequires:    automake
 BuildRequires: beecrypt-devel >= %{beecrypt_ver}
 BuildRequires: bzip2-devel >= 1.0.1
 BuildRequires: db-devel >= %{reqdb_ver}
-%{?_with_docs:BuildRequires:   doxygen}
-BuildRequires: gettext-devel >= 0.11.4-2
+%{?with_doc:BuildRequires:     doxygen}
 BuildRequires: elfutils-devel
+BuildRequires: findutils
+BuildRequires: gettext-devel >= 0.11.4-2
 #BuildRequires:        libmagic-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}
@@ -118,7 +119,7 @@ BuildRequires:      python-modules >= 2.2
 BuildRequires: rpm-perlprov
 BuildRequires: rpm-pythonprov
 BuildRequires: zlib-devel
-%if %{?_with_static:1}0
+%if %{with static}
 # Require static library only for static build
 BuildRequires: beecrypt-static >= %{beecrypt_ver}
 BuildRequires: bzip2-static >= 1.0.2-5
@@ -126,30 +127,32 @@ BuildRequires:    db-static >= %{reqdb_ver}
 BuildRequires: glibc-static >= 2.2.94
 BuildRequires: elfutils-static
 #BuildRequires:        libmagic-static
+%{?with_selinux:BuildRequires: libselinux-static}
 BuildRequires: popt-static >= %{reqpopt_ver}
 BuildRequires: zlib-static
 %endif
 Requires:      popt >= %{reqpopt_ver}
 Requires:      %{name}-lib = %{version}-%{release}
+%{!?with_static:Obsoletes:     rpm-utils-static}
 Conflicts:     glibc < 2.2.92
 # avoid SEGV caused by mixed db versions
 Conflicts:     poldek < 0.18.1-16
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-# not needed now (rpm processes rpmlib(*) deps internally) and didn't work
-# anyway (broken: uses obsolete find-provides script, pgrep(??? typo???))
-##define       __find_provides %{SOURCE4}
-%define                _binary_payload w9.gzdio
-%define                _noPayloadPrefix 1
+%define                _binary_payload         w9.gzdio
+%define                _noPayloadPrefix        1
 
 # don't require very fresh rpm.macros to build
 %define                __gettextize gettextize --copy --force --intl ; cp -f po/Makevars{.template,}
+%define                ix86 i386 i486 i586 i686 athlon pentium3 pentium4
 
 # stabilize new build environment
 %define                __cc %{?force_cc}%{!?force_cc:%{_target_cpu}-pld-linux-gcc}
 %define                __cxx %{?force_cxx}%{!?force_cxx:%{_target_cpu}-pld-linux-g++}
 %define                __cpp %{?force_cpp}%{!?force_cpp:%{_target_cpu}-pld-linux-gcc -E}
 
+%define                _rpmlibdir /usr/lib/rpm
+
 %description
 RPM is a powerful package manager, which can be used to build,
 install, query, verify, update, and uninstall individual software
@@ -211,8 +214,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
+%{?with_selinux:Requires:      libselinux-devel}
 Requires:      popt-devel >= %{reqpopt_ver}
 Requires:      zlib-devel
 
@@ -272,7 +276,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
@@ -461,7 +465,7 @@ Requires:   %{name}-utils = %{version}-%{release}
 Requires:      /bin/id
 Requires:      awk
 Requires:      binutils
-Requires:      chrpath
+Requires:      chrpath >= 0.10-4
 Requires:      diffutils
 Requires:      file >= 4.01
 Requires:      fileutils
@@ -471,6 +475,10 @@ Requires:  gcc >= 3.0.3
 %else
 Requires:      gcc
 %endif
+%ifarch amd64
+Conflicts:     automake < 1:1.7.9-2
+Conflicts:     libtool < 2:1.5-13
+%endif
 Requires:      glibc-devel
 Requires:      grep
 Requires:      gzip
@@ -539,14 +547,14 @@ construir pacotes usando o RPM.
 ÐÏÂÕÄÏ×É RPM'¦×.
 
 %prep
-%setup -q
-%patch0 -p1
+%setup -q -n %{name}
+# UPDATE
+#%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
-%patch6 -p1
 %patch7 -p1
 %patch8 -p1
 %patch9 -p1
@@ -555,27 +563,29 @@ construir pacotes usando o RPM.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
-%patch15 -p1
+# home-etc FIXME
+#%patch15 -p1
 %patch16 -p1
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
-%patch22 -p1
-%patch23 -p1
-%patch24 -p1
-
 sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
 cp -f platform.in macros.pld.in
-echo '%%define _perl_deps      1' > 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_deps       1' > macros.php
-install %{SOURCE6} scripts/find-lang.sh
-install %{SOURCE12} scripts/php.prov.in
-install %{SOURCE13} scripts/php.req.in
-install %{SOURCE33} scripts/perl.prov
-cat %{SOURCE14} >> macros.in
+echo '%%define __php_provides  /usr/lib/rpm/php.prov' > macros.php
+echo '%%define __php_requires  /usr/lib/rpm/php.req' >> macros.php
+install %{SOURCE5} scripts/find-lang.sh
+install %{SOURCE9} scripts/php.prov.in
+install %{SOURCE10} scripts/php.req.in
+install %{SOURCE12} scripts/perl.prov
+cat %{SOURCE11} >> macros.in
+%patch22 -p1
+%patch23 -p1
+%patch24 -p1
 %patch25 -p1
 %patch26 -p1
 %patch27 -p1
@@ -584,26 +594,37 @@ cat %{SOURCE14} >> macros.in
 %patch30 -p1
 %patch31 -p1
 %patch32 -p1
-%patch33 -p1
-%patch34 -p1
+# DROP
+#%patch33 -p1
+# UPDATE
+#%patch34 -p1
 %patch35 -p1
 %patch36 -p1
 %patch37 -p1
-%patch38 -p1
-%patch39 -p1
+# STILL NOT FIXED IN RPM???
+#%patch38 -p1
+# OBSOLETE, merged upstream
+#%patch39 -p1
 %patch40 -p1
-%patch41 -p1
+# SAME AS patch38
+#%patch41 -p1
+# OBSOLETE, merged upstream
+#%patch42 -p1
+%patch43 -p0
+%patch44 -p1
 
 cd scripts;
 mv -f perl.req perl.req.in
 mv -f perl.prov perl.prov.in
 cd ..
 
-chmod +x %{SOURCE4}
+mv -f po/{no,nb}.po
+mv -f po/{sr,sr@Latn}.po
+
 rm -rf zlib libelf db db3 popt rpmdb/db.h
 
 # generate Group translations to *.po
-awk -f %{SOURCE9} %{SOURCE1}
+awk -f %{SOURCE6} %{SOURCE1}
 
 # update macros paths
 for f in doc{,/ja,/pl}/rpm.8 doc{,/ja,/pl}/rpmbuild.8 ; do
@@ -611,9 +632,12 @@ for f in doc{,/ja,/pl}/rpm.8 doc{,/ja,/pl}/rpmbuild.8 ; do
        mv -f ${f}.tmp $f
 done
 
+# ... and make some cleanings
+rm -fr $(find ./ -type d -name CVS )
+rm -f  $(find ./ -type f -name ".cvsignore" )
+
 %build
 cd file
-rm -f missing
 %{__libtoolize}
 %{__aclocal}
 %{__autoheader}
@@ -621,7 +645,6 @@ rm -f missing
 %{__automake}
 cd ..
 
-rm -f missing
 %{__libtoolize}
 %{__gettextize}
 %{__aclocal}
@@ -631,23 +654,31 @@ rm -f missing
 
 # 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
 %configure \
-       CC="%{__cc}" CXX="%{__cxx}" CPP="%{__cpp}" \
+       CC="%{__cc}" \
+       CXX="%{__cxx}" \
+       CPP="%{__cpp}" \
        --enable-shared \
        --enable-static \
-       %{!?_without_docs:--with-apidocs} \
-       %{?_with_python:--with-python=auto} \
-       %{?!_with_python:--without-python} \
+       %{?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
 %{__make} \
-       %{?_without_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \
-       myLDFLAGS="%{rpmldflags}"
+       pylibdir=%{py_libdir} \
+       myLDFLAGS="%{rpmldflags}" \
+       file_LDFLAGS= \
+       debugedit_LDADD="\$(WITH_LIBELF_LIB) -lpopt"
+
+#      %{!?with_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -655,27 +686,24 @@ install -d $RPM_BUILD_ROOT/%{_lib}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
+       pylibdir=%{py_libdir} \
        pkgbindir="%{_bindir}"
 
-install macros.perl    $RPM_BUILD_ROOT%{_libdir}/rpm/macros.perl
-install macros.python  $RPM_BUILD_ROOT%{_libdir}/rpm/macros.python
-install macros.php     $RPM_BUILD_ROOT%{_libdir}/rpm/macros.php
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/vpkg-provides*
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{prov,req}.pl
+rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-{provides,requires}.perl
+
+install macros.perl    $RPM_BUILD_ROOT%{_rpmlibdir}/macros.perl
+install macros.python  $RPM_BUILD_ROOT%{_rpmlibdir}/macros.python
+install macros.php     $RPM_BUILD_ROOT%{_rpmlibdir}/macros.php
 
 install %{SOURCE1} doc/manual/groups
-install %{SOURCE3} $RPM_BUILD_ROOT%{_libdir}/rpm/install-build-tree
-install %{SOURCE4} $RPM_BUILD_ROOT%{_libdir}/rpm/find-rpm-provides
-install %{SOURCE5} $RPM_BUILD_ROOT%{_libdir}/rpm/find-spec-bcond
-# 2 following files - to be removed or changed to find-elf-*
-# (to generate only ELF dependencies using objdump)???
-# WARNING: don't even try to use, currently broken by some 64-bit experiments
-install %{SOURCE7} $RPM_BUILD_ROOT%{_libdir}/rpm/find-provides
-install %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/rpm/find-requires
-install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/rpm/compress-doc
-install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/rpm/check-files
-install %{SOURCE15} $RPM_BUILD_ROOT%{_libdir}/rpm/find-provides-wrapper
-install %{SOURCE16} $RPM_BUILD_ROOT%{_libdir}/rpm/find-requires-wrapper
-install scripts/find-php*      $RPM_BUILD_ROOT%{_libdir}/rpm
-install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_libdir}/rpm
+install %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
+install %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
+install %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
+install %{SOURCE8} $RPM_BUILD_ROOT%{_rpmlibdir}/check-files
+install scripts/find-php*      $RPM_BUILD_ROOT%{_rpmlibdir}
+install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir}
 
 install %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/builder
 install %{SOURCE31} $RPM_BUILD_ROOT%{_bindir}/adapter.awk
@@ -684,26 +712,38 @@ 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
-# global list of files (name regexps) which don't generate Provides
+# global list of files (regexps) which don't generate Provides
 EOF
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprov <<EOF
-# global list of capabilities (regexps) not to be used in Provides
+# global list of script capabilities (regexps) not to be used in Provides
 EOF
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles <<EOF
-# global list of files (name regexps) which don't generate Requires
+# global list of files (regexps) which don't generate Requires
 /usr/src/examples/.*
 /usr/share/doc/.*
 EOF
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreq <<EOF
-# global list of capabilities (regexps) not to be used in Requires
+# global list of script capabilities (regexps) not to be used in Requires
 EOF
 cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqdep <<EOF
 # global list of capabilities (SONAME, perl(module), php(module) regexps)
@@ -721,10 +761,11 @@ cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc <<EOF
 EOF
 
 # for rpm -e|-U --repackage
-install -d $RPM_BUILD_ROOT/var/spool/repackage
+install -d $RPM_BUILD_ROOT/var/{spool/repackage,lock/rpm}
+touch $RPM_BUILD_ROOT/var/lock/rpm/transaction
 
 # move libs to /lib
-for a in librpm-%{ver}.so librpmdb-%{ver}.so librpmio-%{ver}.so ; do
+for a in librpm-%{sover}.so librpmdb-%{sover}.so librpmio-%{sover}.so ; do
        mv -f $RPM_BUILD_ROOT%{_libdir}/$a $RPM_BUILD_ROOT/%{_lib}
        ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
 done
@@ -745,7 +786,7 @@ rm -rf $RPM_BUILD_ROOT
 %postun lib -p /sbin/ldconfig
 
 %pre build
-find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
+find %{_rpmlibdir} -name '*-linux' -type l | xargs rm -f
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
@@ -770,16 +811,20 @@ find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
 
 %dir /var/lib/rpm
 %dir %attr(700,root,root) /var/spool/repackage
-%dir %{_libdir}/rpm
-#%attr(755,root,root) %{_libdir}/rpm/rpmd
-#%attr(755,root,root) %{_libdir}/rpm/rpmk
-#%attr(755,root,root) %{_libdir}/rpm/rpm[qv]
+%dir /var/lock/rpm
+/var/lock/rpm/transaction
+
+%dir %{_rpmlibdir}
+#%attr(755,root,root) %{_rpmlibdir}/rpmd
+#%{!?with_static:%attr(755,root,root) %{_rpmlibdir}/rpm[eiu]}
+#%attr(755,root,root) %{_rpmlibdir}/rpmk
+#%attr(755,root,root) %{_rpmlibdir}/rpm[qv]
 
-%doc %attr(755,root,root) %{_libdir}/rpm/convertrpmrc.sh
+%doc %attr(755,root,root) %{_rpmlibdir}/convertrpmrc.sh
 
-%{_libdir}/rpm/rpmrc
-%{_libdir}/rpm/rpmpopt*
-%{_libdir}/rpm/macros
+%{_rpmlibdir}/rpmrc
+%{_rpmlibdir}/rpmpopt*
+%{_rpmlibdir}/macros
 
 %files lib
 %defattr(644,root,root,755)
@@ -789,55 +834,60 @@ find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
 %files build
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/rpm/noauto*
-%attr(755,root,root) %{_libdir}/rpm/compress-doc
-%attr(755,root,root) %{_libdir}/rpm/cross-build
-%attr(755,root,root) %{_libdir}/rpm/find-provides
-%attr(755,root,root) %{_libdir}/rpm/find-provides-wrapper
-%attr(755,root,root) %{_libdir}/rpm/find-requires
-%attr(755,root,root) %{_libdir}/rpm/find-requires-wrapper
-%attr(755,root,root) %{_libdir}/rpm/find-rpm-provides
-%attr(755,root,root) %{_libdir}/rpm/find-spec-bcond
-%attr(755,root,root) %{_libdir}/rpm/find-lang.sh
-%attr(755,root,root) %{_libdir}/rpm/mkinstalldirs
-%attr(755,root,root) %{_libdir}/rpm/config.*
-%attr(755,root,root) %{_libdir}/rpm/getpo.sh
-%attr(755,root,root) %{_libdir}/rpm/install-build-tree
-%attr(755,root,root) %{_libdir}/rpm/brp-*
-%attr(755,root,root) %{_libdir}/rpm/check-files
-%attr(755,root,root) %{_libdir}/rpm/check-prereqs
-#%attr(755,root,root) %{_libdir}/rpm/cpanflute
-#%attr(755,root,root) %{_libdir}/rpm/cpanflute2
-#%attr(755,root,root) %{_libdir}/rpm/Specfile.pm
-%attr(755,root,root) %{_libdir}/rpm/http.req
-%attr(755,root,root) %{_libdir}/rpm/magic.prov
-%attr(755,root,root) %{_libdir}/rpm/magic.req
-%attr(755,root,root) %{_libdir}/rpm/u_pkg.sh
-%attr(755,root,root) %{_libdir}/rpm/vpkg-provides.sh
-%attr(755,root,root) %{_libdir}/rpm/vpkg-provides2.sh
-%attr(755,root,root) %{_libdir}/rpm/rpmb
-%attr(755,root,root) %{_libdir}/rpm/rpmt
-%{_libdir}/rpm/noarch-*
-%ifarch i386 i486 i586 i686 athlon
-%{_libdir}/rpm/i?86*
-%{_libdir}/rpm/athlon*
+%attr(755,root,root) %{_rpmlibdir}/compress-doc
+%attr(755,root,root) %{_rpmlibdir}/cross-build
+#%attr(755,root,root) %{_rpmlibdir}/find-provides
+#%attr(755,root,root) %{_rpmlibdir}/find-provides-wrapper
+#%attr(755,root,root) %{_rpmlibdir}/find-requires
+#%attr(755,root,root) %{_rpmlibdir}/find-requires-wrapper
+#%attr(755,root,root) %{_rpmlibdir}/find-rpm-provides
+%attr(755,root,root) %{_rpmlibdir}/find-spec-bcond
+%attr(755,root,root) %{_rpmlibdir}/find-lang.sh
+%attr(755,root,root) %{_rpmlibdir}/mkinstalldirs
+%attr(755,root,root) %{_rpmlibdir}/config.*
+%attr(755,root,root) %{_rpmlibdir}/getpo.sh
+%attr(755,root,root) %{_rpmlibdir}/install-build-tree
+%attr(755,root,root) %{_rpmlibdir}/brp-*
+%attr(755,root,root) %{_rpmlibdir}/check-files
+%attr(755,root,root) %{_rpmlibdir}/check-prereqs
+#%attr(755,root,root) %{_rpmlibdir}/cpanflute
+#%attr(755,root,root) %{_rpmlibdir}/cpanflute2
+#%attr(755,root,root) %{_rpmlibdir}/Specfile.pm
+%attr(755,root,root) %{_rpmlibdir}/http.req
+%attr(755,root,root) %{_rpmlibdir}/magic.prov
+%attr(755,root,root) %{_rpmlibdir}/magic.req
+%attr(755,root,root) %{_rpmlibdir}/u_pkg.sh
+#%attr(755,root,root) %{_rpmlibdir}/vpkg-provides.sh
+#%attr(755,root,root) %{_rpmlibdir}/vpkg-provides2.sh
+%attr(755,root,root) %{_rpmlibdir}/rpmb
+%attr(755,root,root) %{_rpmlibdir}/rpmt
+%{_rpmlibdir}/noarch-*
+%ifarch %{ix86}
+%{_rpmlibdir}/i?86*
+%{_rpmlibdir}/pentium*
+%{_rpmlibdir}/athlon*
+%endif
+%ifarch amd64
+%{_rpmlibdir}/amd64*
+%{_rpmlibdir}/x86_64*
 %endif
 %ifarch sparc sparc64
-%{_libdir}/rpm/sparc*
+%{_rpmlibdir}/sparc*
 %endif
 %ifarch alpha
-%{_libdir}/rpm/alpha*
+%{_rpmlibdir}/alpha*
 %endif
 %ifarch ppc
-%{_libdir}/rpm/ppc*
+%{_rpmlibdir}/ppc*
 %endif
 # must be here for "Requires: rpm-*prov" to work
-%{_libdir}/rpm/macros.perl
-%{_libdir}/rpm/macros.php
+%{_rpmlibdir}/macros.perl
+%{_rpmlibdir}/macros.php
 # not used yet ...
-%{_libdir}/rpm/sql.prov
-%{_libdir}/rpm/sql.req
-%{_libdir}/rpm/tcl.req
-%{_libdir}/rpm/trpm
+%{_rpmlibdir}/sql.prov
+%{_rpmlibdir}/sql.req
+%{_rpmlibdir}/tcl.req
+%{_rpmlibdir}/trpm
 
 %attr(755,root,root) %{_bindir}/javadeps
 %attr(755,root,root) %{_bindir}/gendiff
@@ -870,18 +920,18 @@ find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
 %attr(755,root,root) %{_bindir}/rpmdeps
 %attr(755,root,root) %{_bindir}/rpmgraph
 %attr(755,root,root) %{_bindir}/rpmfile
-%attr(755,root,root) %{_libdir}/rpm/find-debuginfo.sh
-%attr(755,root,root) %{_libdir}/rpm/rpm2cpio.sh
-%attr(755,root,root) %{_libdir}/rpm/tgpg
-%attr(755,root,root) %{_libdir}/rpm/rpmdb_loadcvt
+%attr(755,root,root) %{_rpmlibdir}/find-debuginfo.sh
+%attr(755,root,root) %{_rpmlibdir}/rpm2cpio.sh
+%attr(755,root,root) %{_rpmlibdir}/tgpg
+%attr(755,root,root) %{_rpmlibdir}/rpmdb_loadcvt
 
 %files utils-perl
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/rpm/rpmdiff*
+%attr(755,root,root) %{_rpmlibdir}/rpmdiff*
 # not here
-#%%{_libdir}/rpm/rpm.daily
-#%%{_libdir}/rpm/rpm.log
-#%%{_libdir}/rpm/rpm.xinetd
+#%%{_rpmlibdir}/rpm.daily
+#%%{_rpmlibdir}/rpm.log
+#%%{_rpmlibdir}/rpm.xinetd
 
 %{_mandir}/man8/rpm2cpio.8*
 %{_mandir}/man8/rpmdeps.8*
@@ -897,29 +947,31 @@ find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
 %lang(pl) %{_mandir}/pl/man8/rpmgraph.8*
 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
 
+%if %{with static}
 %files utils-static
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/rpm[ieu]
-%attr(755,root,root) %{_libdir}/rpm/rpm[ieu]
+%attr(755,root,root) %{_rpmlibdir}/rpm[ieu]
+%endif
 
 %files perlprov
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/rpm/perl.*
-#%attr(755,root,root) %{_libdir}/rpm/perldeps.pl
-#%attr(755,root,root) %{_libdir}/rpm/find-perl-*
-%attr(755,root,root) %{_libdir}/rpm/find-*.perl
-%attr(755,root,root) %{_libdir}/rpm/find-prov.pl
-%attr(755,root,root) %{_libdir}/rpm/find-req.pl
-%attr(755,root,root) %{_libdir}/rpm/get_magic.pl
+%attr(755,root,root) %{_rpmlibdir}/perl.*
+#%attr(755,root,root) %{_rpmlibdir}/perldeps.pl
+#%attr(755,root,root) %{_rpmlibdir}/find-perl-*
+#%attr(755,root,root) %{_rpmlibdir}/find-*.perl
+#%attr(755,root,root) %{_rpmlibdir}/find-prov.pl
+#%attr(755,root,root) %{_rpmlibdir}/find-req.pl
+%attr(755,root,root) %{_rpmlibdir}/get_magic.pl
 
 %files pythonprov
 %defattr(644,root,root,755)
-%{_libdir}/rpm/macros.python
+%{_rpmlibdir}/macros.python
 
 %files php-pearprov
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/rpm/php*
-%attr(755,root,root) %{_libdir}/rpm/find-php*
+%attr(755,root,root) %{_rpmlibdir}/php*
+%attr(755,root,root) %{_rpmlibdir}/find-php*
 
 %if %{with python}
 %files -n python-rpm
This page took 0.114864 seconds and 4 git commands to generate.