]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- redesign: allow to be used as a library
[packages/rpm.git] / rpm.spec
index b25732f00d920524f8276611b483cab2bdae6900..21f83ea81d2ffbb0e7ce7da9dca1e6cc5883c4dc 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
-# to build for athlon you need release at least 49
-
+#
+# 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
+#
+# Conditional build:
+# _without_static      - build shared /bin/rpm (doesn't work at the moment)
+# _without_docs                - don't generate documentation with doxygen
+# 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
+# versions of required libraries
+%define        reqdb_ver       4.1.25-1
+%define        reqpopt_ver     1.9
+%define        beecrypt_ver    3.0.0-0.20030610.1
+%define rpm_macros_rev 1.118
 Summary:       RPM Package Manager
 Summary(de):   RPM Packet-Manager
 Summary(es):   Gestor de paquetes RPM
 Summary(pl):   Aplikacja do zarz±dzania pakietami RPM
 Summary(pt_BR):        Gerenciador de pacotes RPM
-Summary(ru):   íÅÎÅÄÖÅÒ ÐÁËÅÔÏ× ÏÔ Red Hat
-Summary(uk):   íÅÎÅÄÖÅÒ ÐÁËÅԦנצĠRed Hat
+Summary(ru):   íÅÎÅÄÖÅÒ ÐÁËÅÔÏ× ÏÔ RPM
+Summary(uk):   íÅÎÅÄÖÅÒ ÐÁËÅԦנצĠRPM
 Name:          rpm
-Version:       4.0.2
-Release:       94
+%define        ver     4.3
+Version:       %{ver}
+%define        rel     0.%{snap}.18
+Release:       %{rel}
 License:       GPL
 Group:         Base
-Source0:       ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/%{name}-%{version}.tar.gz
+#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
 Source1:       %{name}.groups
-Source2:       %{name}.macros
+Source2:       %{name}.platform
 Source3:       %{name}-install-tree
 Source4:       %{name}-find-rpm-provides
-Source5:       %{name}-macros.perl
-Source6:       %{name}-find-perl-provides
-Source7:       %{name}-find-perl-requires
-Source8:       %{name}-find-spec-bcond
-Source9:       %{name}-find-lang
-Source10:      %{name}-find-provides
-Source11:      %{name}-find-requires
-Source12:      %{name}-non-english-man-pages.tar.bz2
-Source13:      %{name}-macros.python
-Source14:      %{name}-groups-po.awk
-Source15:      %{name}-compress-doc
-Source16:      %{name}-check-files
-Source17:      %{name}-php-provides
-Source18:      %{name}-php-requires
-Source19:      %{name}-find-php-provides
-Source20:      %{name}-find-php-requires
-Source21:      %{name}-macros.php
+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
 Source30:      builder
 Source31:      adapter.awk
 Source32:      pldnotify.awk
-Patch0:                %{name}-rpmrc.patch
-Patch1:                %{name}-macros.patch
+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}-db3.patch
-Patch6:                %{name}-segv.patch
-Patch7:                %{name}-am_fix.patch
-Patch8:                %{name}-perl-req-perlfile.patch
-Patch9:                %{name}-installplatform.patch
-Patch10:       %{name}-cache.patch
-Patch11:       %{name}-suggestions.patch
-Patch12:       %{name}-rh-lame.patch
-Patch13:       %{name}-glob.patch
-Patch14:       %{name}-header_h.patch
-Patch15:       %{name}-fast-alAddPackage.patch
-Patch16:       %{name}-byKey.patch
-Patch17:       %{name}-perlprov.patch
-Patch18:       %{name}-noperldir.patch
-Patch19:       %{name}-popt-cvs20010530.patch
-Patch20:       %{name}-noexpand.patch
-Patch21:       %{name}-scripts-closefds.patch
-Patch22:       %{name}-python-amfix.patch
-Patch23:       %{name}-non-english-man-pages.patch
-Patch24:       %{name}-progress-nontty.patch
-Patch25:       %{name}-am_ac.patch
-Patch26:       %{name}-python-macros.patch
-Patch27:       %{name}-hardlink-fixes.patch
-Patch28:       %{name}-perlprov-regonly.patch
-Patch29:       %{name}-cxx.patch
-Patch30:       %{name}-athlon.patch
-Patch31:       %{name}-athlon-identify.patch
-Patch32:       %{name}-gettext-in-header.patch
-Patch33:       %{name}-perlprov-perl5.6.patch
-Patch34:       %{name}-ac25x.patch
-Patch35:       %{name}-signverify-fix.patch
-Patch36:       %{name}-compress-doc.patch
-Patch37:       %{name}-short_circuit.patch
-Patch38:       %{name}-test_stage.patch
-Patch39:       %{name}-exclude.patch
-Patch40:       %{name}-check_files.patch
-Patch41:       %{name}-choke-on-evil-doc.patch
-Patch42:       %{name}-rpmlog-fix.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}-spec-prep-pre.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
 URL:           http://www.rpm.org/
 Icon:          rpm.gif
-BuildRequires: autoconf >= 2.50
+BuildRequires: autoconf >= 2.52
 BuildRequires: automake
+BuildRequires: beecrypt-devel >= %{beecrypt_ver}
 BuildRequires: bzip2-devel >= 1.0.1
-BuildRequires: db1-devel >= 1.85
-BuildRequires: db3-devel >= 3.1.17-9
-BuildRequires: gettext-devel >= 0.10.38-3
+BuildRequires: db-devel >= %{reqdb_ver}
+%{!?_without_docs:BuildRequires:       doxygen}
+BuildRequires: gettext-devel >= 0.11.4-2
+BuildRequires: elfutils-devel
+#BuildRequires:        libmagic-devel
 BuildRequires: libtool
 BuildRequires: patch >= 2.2
-BuildRequires: python-devel >= 2.2.1
-BuildRequires: python-modules >= 2.2.1
-BuildRequires: zlib-devel >= 1.1.4
-%if %{!?_without_static:1}%{?_without_static:0}
+BuildRequires: python-devel >= 2.2
+BuildRequires: python-modules >= 2.2
+BuildRequires: rpm-perlprov
+BuildRequires: rpm-pythonprov
+BuildRequires: zlib-devel
+BuildRequires: popt-devel >= %{reqpopt_ver}
+%if %{!?_without_static:1}0
 # Require static library only for static build
-BuildRequires: bzip2-static >= 1.0.1
-BuildRequires: db1-static >= 1.85
-BuildRequires: db3-static >= 3.1.17-9
-BuildRequires: glibc-static >= 2.2.0
-BuildRequires: zlib-static >= 1.1.4
+BuildRequires: beecrypt-static >= %{beecrypt_ver}
+BuildRequires: bzip2-static >= 1.0.2-5
+BuildRequires: db-static >= %{reqdb_ver}
+BuildRequires: glibc-static >= 2.2.94
+BuildRequires: elfutils-static
+#BuildRequires:        libmagic-static
+BuildRequires: zlib-static
+BuildRequires: popt-static >= %{reqpopt_ver}
 %endif
-Requires:      zlib >= 1.1.4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-Obsoletes:     rpm-libs
-Conflicts:     glibc < 2.2
+Requires:      popt >= %{reqpopt_ver}
+Conflicts:     glibc < 2.2.92
 
 %define                __find_provides %{SOURCE4}
 %define                _binary_payload w9.gzdio
+%define                _noPayloadPrefix 1
 
-%define                py_ver          %(echo `python -c "import sys; print sys.version[:3]"`)
-%define                py_prefix       %(echo `python -c "import sys; print sys.prefix"`)
-%define                py_libdir       %{py_prefix}/lib/python%{py_ver}
-%define                py_sitedir      %{py_libdir}/site-packages
-%define                py_dyndir       %{py_libdir}/lib-dynload
-%define                pyrequires_eq() Requires:       %1 >= %py_ver %1 < %(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`)
+# don't require very fresh rpm.macros to build
+%define                __gettextize gettextize --copy --force --intl ; cp -f po/Makevars{.template,}
+
+# 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}
 
 %description
 RPM is a powerful package manager, which can be used to build,
@@ -137,10 +158,10 @@ almacenaje de archivos, y informaci
 nombre, versión y descripción.
 
 %description -l pl
-RPM jest doskona³ym mened¿erem pakietów. Dziêki niemu bêdziesz móg³
-przebudowaæ, zainstalowaæ czy zweryfikowaæ dowolny pakiet. Informacje
-dotycz±ce ka¿dego pakietu, takie jak jego opis, lista plików
-wchodz±cych w sk³ad pakietu, zale¿no¶ci od innych pakietów, s±
+RPM jest doskona³ym programem zarz±dzaj±cym pakietami. Umo¿liwia on
+przebudowanie, instalacjê czy weryfikacjê dowolnego pakietu.
+Informacje dotycz±ce ka¿dego pakietu, takie jak jego opis, lista
+plików wchodz±cych w sk³ad pakietu, zale¿no¶ci od innych pakietów, s±
 przechowywane w bazie danych i mo¿na je uzyskaæ za pomoc± opcji
 odpytywania programu rpm.
 
@@ -166,22 +187,28 @@ RPM - 
 ¦ÎÆÏÒÍÁæÀ ÐÒÏ ÐÁËÅÔ.
 
 %package devel
-Summary:       Header files and libraries
-Summary(de):   Header-Dateien uns Libraries
+Summary:       Header files for rpm libraries
+Summary(de):   Header-Dateien für rpm Libraries
 Summary(es):   Archivos de inclusión y bibliotecas para programas de manipulación de paquetes rpm
-Summary(pl):   Pliki nag³ówkowe i biblioteki statyczne
+Summary(pl):   Pliki nag³ówkowe bibliotek rpm
 Summary(pt_BR):        Arquivos de inclusão e bibliotecas para programas de manipulação de pacotes RPM
-Summary(ru):   èÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ.
+Summary(ru):   èÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ
 Summary(uk):   èÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm
 Group:         Development/Libraries
-Requires:      %{name} = %{version}
-Requires:      popt-devel
+Requires:      %{name}-lib = %{version}
+Requires:      beecrypt-devel >= %{beecrypt_ver}
+Requires:      bzip2-devel
+Requires:      db-devel
+Requires:      elfutils-devel
+Requires:      popt-devel >= %{reqpopt_ver}
+Requires:      zlib-devel
 
 %description devel
-The RPM packaging system includes a C library that makes it easy to
-manipulate RPM packages and databases. It is intended to ease the
+The RPM packaging system includes C libraries that make it easy to
+manipulate RPM packages and databases. They are intended to ease the
 creation of graphical package managers and other tools that need
-intimate knowledge of RPM packages.
+intimate knowledge of RPM packages. This package contains header files
+for these libraries.
 
 %description devel -l de
 Der RPM-Packensystem enthält eine C-Library, die macht es einfach
@@ -196,10 +223,11 @@ facilitar la creaci
 herramientas que necesiten un conocimiento profundo de paquetes RPM.
 
 %description devel -l pl
-System RPM zawiera bibliotekê C, która u³atwia manipulowanie pakietami
-RPM oraz bazami danych. W zamiarze ma to upro¶ciæ tworzenie
-graficznych mened¿erów pakietów oraz innych narzêdzi, które wymagaj±
-szczegó³owej wiedzy na temat pakietów RPM.
+System RPM zawiera biblioteki C, które u³atwiaj± manipulowanie
+pakietami RPM oraz bazami danych. W zamiarze ma to upro¶ciæ tworzenie
+graficznych programów zarz±dzaj±cych pakietami oraz innych narzêdzi,
+które wymagaj± szczegó³owej wiedzy na temat pakietów RPM. Ten pakiet
+zawiera pliki nag³ówkowe wspomnianych bibliotek.
 
 %description devel -l pt_BR
 O sistema de empacotamento RPM inclui uma biblioteca C que torna fácil
@@ -225,10 +253,16 @@ Summary:  RPM static libraries
 Summary(de):   RPMs statische Libraries
 Summary(pl):   Biblioteki statyczne RPM-a
 Summary(pt_BR):        Bibliotecas estáticas para o desenvolvimento de aplicações RPM
-Summary(ru):   óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ.
+Summary(ru):   óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ
 Summary(uk):   óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}
+Requires:      beecrypt-static >= %{beecrypt_ver}
+Requires:      bzip2-static
+Requires:      db-static
+Requires:      elfutils-static
+Requires:      popt-static >= %{reqpopt_ver}
+Requires:      zlib-static
 
 %description static
 RPM static libraries.
@@ -258,6 +292,7 @@ Summary(de):        Zusatzwerkzeuge f
 Summary(pl):   Dodatkowe narzêdzia do zarz±dzania baz± RPM-a i pakietami
 Group:         Applications/File
 Requires:      %{name} = %{version}
+Requires:      popt >= %{reqpopt_ver}
 
 %description utils
 Additional utilities for managing rpm packages and database.
@@ -268,14 +303,33 @@ Zusatzwerkzeuge f
 %description utils -l pl
 Dodatkowe narzêdzia do zarz±dzania baz± RPM-a i pakietami.
 
+%package utils-static
+Summary:       Static rpm utilities
+Summary(pl):   Statyczne narzêdzia rpm
+Group:         Applications/System
+Requires:      %{name} = %{version}
+
+%description utils-static
+Static rpm utilities for repairing system in case something with
+shared libraries used by rpm become broken. Currently it contains rpmi
+binary, which can be used to install/upgrade/remove packages without
+using shared libraries (well, in fact with exception of NSS modules).
+
+%description utils-static -l pl
+Statyczne narzêdzia rpm do naprawy systemu w przypadku zepsucia czego¶
+zwi±zanego z bibliotekami wspó³dzielonymi u¿ywanymi przez rpm-a.
+Aktualnie pakiet zawiera binarkê rpmi, któr± mo¿na u¿yæ do instalacji,
+uaktualniania lub usuwania pakietów bez udzia³u bibliotek statycznych
+(z wyj±tkiem modu³ów NSS).
+
 %package perlprov
 Summary:       Additional utilities for checking perl provides/requires in rpm packages
 Summary(de):   Zusatzwerkzeuge fürs Nachsehen Perl-Abhängigkeiten in RPM-Paketen
 Summary(pl):   Dodatkowe narzêdzia do sprawdzenia zale¿no¶ci skryptów perla w pakietach rpm
 Group:         Applications/File
 Requires:      %{name} = %{version}
+Requires:      perl-devel
 Requires:      perl-modules
-Requires:      findutils
 
 %description perlprov
 Additional utilities for checking perl provides/requires in rpm
@@ -305,7 +359,7 @@ Pythonie.
 
 %package php-pearprov
 Summary:       Additional utilities for managing rpm packages and database
-Summary(pl):   Dodatkowe narzêdzia do sprawdzania zale¿no¶ci skryptów php w rpm.
+Summary(pl):   Dodatkowe narzêdzia do sprawdzania zale¿no¶ci skryptów php w rpm
 Group:         Applications/File
 Requires:      %{name} = %{version}
 
@@ -321,7 +375,7 @@ pakietach rpm.
 Summary:       Python interface to RPM library
 Summary(pl):   Pythonowy interfejs do biblioteki RPM-a
 Summary(pt_BR):        Módulo Python para aplicativos que manipulam pacotes RPM
-Group:         Libraries/Python
+Group:         Development/Languages/Python
 Requires:      %{name} = %{version}
 %pyrequires_eq python
 Obsoletes:     rpm-python
@@ -349,6 +403,19 @@ RPM (RPM Package Manager).
 Esse pacote deve ser instalado se você quiser desenvolver programas em
 Python para manipular pacotes e bancos de dados RPM.
 
+%package lib
+Summary:       RPMs library
+Summary(pl):   Biblioteki RPM-a
+Group:         Libraries
+Requires:      db >= %{reqdb_ver}
+Requires:      popt >= %{reqpopt_ver}
+
+%description lib
+RPMs library.
+
+%description lib -l pl
+Biblioteki RPM-a.
+
 %package build
 Summary:       Scripts for building binary RPM packages
 Summary(de):   Scripts fürs Bauen binärer RPM-Pakete
@@ -357,12 +424,15 @@ Summary(pt_BR):   Scripts e programas execut
 Summary(ru):   óËÒÉÐÔÙ É ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÓÂÏÒËÉ ÐÁËÅÔÏ×
 Summary(uk):   óËÒÉÐÔÉ ÔÁ ÕÔÉ̦ÔÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÐÏÂÕÄÏ×É ÐÁËÅÔ¦×
 Group:         Applications/File
+Provides:      rpmbuild(macros) = %{rpm_macros_rev}
+Requires(pre): findutils
 Requires:      %{name} = %{version}
+Requires:      %{name}-utils = %{version}
 Requires:      /bin/id
 Requires:      awk
 Requires:      binutils
 Requires:      diffutils
-Requires:      file >= 3.31
+Requires:      file >= 4.01
 Requires:      fileutils
 Requires:      findutils
 %ifarch athlon
@@ -375,7 +445,7 @@ Requires:   grep
 Requires:      gzip
 Requires:      make
 Requires:      patch
-Requires:      popt >= 1.6.2-2
+Requires:      popt >= 1.7
 Requires:      sed
 Requires:      sh-utils
 Requires:      tar
@@ -422,7 +492,7 @@ Scripts for managing .spec files and building RPM packages.
 Scripts fürs Bauen RPM-Pakete.
 
 %description build-tools -l pl
-Skrypty pomocnicze do zarz±dznia plikami .spec i do budowania RPM-ów.
+Skrypty pomocnicze do zarz±dzania plikami .spec i do budowania RPM-ów.
 
 %description build-tools -l pt_BR
 Este pacote contém scripts e programas executáveis que são usados para
@@ -437,7 +507,7 @@ construir pacotes usando o RPM.
 ÐÏÂÕÄÏ×É RPM'¦×.
 
 %prep
-%setup -q -a12
+%setup -q
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
@@ -449,72 +519,66 @@ construir pacotes usando o RPM.
 %patch8 -p1
 %patch9 -p1
 %patch10 -p1
-%patch11 -p0
-%patch12 -p0
+%patch11 -p1
+%patch12 -p1
 %patch13 -p1
 %patch14 -p1
-%patch15 -p0
-%patch16 -p0
+%patch15 -p1
+%patch16 -p1
 %patch17 -p1
 %patch18 -p1
 %patch19 -p1
-%patch20 -p1
+# patch20 -- look down
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
 %patch24 -p1
+
+sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
+cp -f platform.in macros.pld.in
+echo '# obsoleted file' > macros.perl
+echo '# obsoleted file' > macros.python
+echo '# obsoleted file' > 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
+%patch20 -p1
 %patch25 -p1
-%patch26 -p0
+%patch26 -p1
 %patch27 -p1
 %patch28 -p1
 %patch29 -p1
 %patch30 -p1
-
-%ifarch athlon
 %patch31 -p1
-%endif
-
 %patch32 -p1
 %patch33 -p1
 %patch34 -p1
-%patch35 -p1
-%patch36 -p1
-%patch37 -p1
-%patch38 -p1
-%patch39 -p1
-%patch40 -p1
-%patch41 -p1
-%patch42 -p1
 
-sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
-cp -f platform.in macros.pld.in
-install %{SOURCE5} macros.perl.in
-install %{SOURCE13} macros.python.in
-install %{SOURCE21} macros.php.in
-install %{SOURCE6} scripts/find-perl-provides
-install %{SOURCE7} scripts/find-perl-requires
-install %{SOURCE9} scripts/find-lang.sh
-install %{SOURCE17} scripts/php.prov.in
-install %{SOURCE18} scripts/php.req.in
-install %{SOURCE19} scripts/find-php-provides
-install %{SOURCE20} scripts/find-php-requires
-
-
-(cd scripts;
+cd scripts;
 mv -f perl.req perl.req.in
-mv -f perl.prov perl.prov.in)
+mv -f perl.prov perl.prov.in
+cd ..
 
 chmod +x %{SOURCE4}
+rm -rf zlib libelf db db3 popt rpmdb/db.h
 
-%build
 # generate Group translations to *.po
-awk -f %{SOURCE14} %{SOURCE1}
+awk -f %{SOURCE9} %{SOURCE1}
+
+# update macros paths
+for f in doc{,/ja,/pl}/rpm.8 doc{,/ja,/pl}/rpmbuild.8 ; do
+       sed -e 's@lib/rpm/redhat@lib/rpm/pld@g' $f > ${f}.tmp
+       mv -f ${f}.tmp $f
+done
 
-cd popt
+%build
+cd file
 rm -f missing
 %{__libtoolize}
-aclocal
-autoheader
+%{__aclocal}
+%{__autoheader}
 %{__autoconf}
 %{__automake}
 cd ..
@@ -522,38 +586,33 @@ cd ..
 rm -f missing
 %{__libtoolize}
 %{__gettextize}
-aclocal
-autoupdate
-autoheader || :
+%{__aclocal}
+%{__autoheader}
 %{__autoconf}
-# ugly workaround for automake
-sed -e 's#cpio.c $(DBLIBOBJS) depends.c#cpio.c depends.c#g' \
-       lib/Makefile.am > lib/Makefile.am.new
-mv -f lib/Makefile.am.new lib/Makefile.am
 %{__automake}
-sed -e 's#cpio.c depends.c#cpio.c $(DBLIBOBJS) depends.c#g' \
-       lib/Makefile.in > lib/Makefile.in.new
-mv -f lib/Makefile.in.new lib/Makefile.in
-
-sed -e 's#python1.5#python%{py_ver}#g' \
-       python/Makefile.in > python/Makefile.in.new
-mv -f python/Makefile.in.new python/Makefile.in
 
 # 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|' macros.in | \
-       sed 's|@host_cpu@|%{_target_cpu}|' > 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}" \
        --enable-shared \
-       --enable-v1-packages \
-       --with-python
+       --enable-static \
+       %{!?_without_docs:--with-apidocs} \
+       --with-python=auto \
+       --without-db
 
-%{__make} %{?_without_static:rpm_LDFLAGS="\\$(myLDFLAGS)"}
+%{__make} \
+       %{?_without_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \
+       myLDFLAGS="%{rpmldflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT/lib
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -566,13 +625,17 @@ install macros.php        $RPM_BUILD_ROOT%{_libdir}/rpm/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 %{SOURCE8} $RPM_BUILD_ROOT%{_libdir}/rpm/find-spec-bcond
-install %{SOURCE10} $RPM_BUILD_ROOT%{_libdir}/rpm/find-provides
-install %{SOURCE11} $RPM_BUILD_ROOT%{_libdir}/rpm/find-requires
-install %{SOURCE15} $RPM_BUILD_ROOT%{_libdir}/rpm/compress-doc
-install %{SOURCE16} $RPM_BUILD_ROOT%{_libdir}/rpm/check-files
-install scripts/find-php*      $RPM_BUILD_ROOT%{_libdir}/rpm/
-install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_libdir}/rpm/
+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)???
+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 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/builder
 install %{SOURCE31} $RPM_BUILD_ROOT%{_bindir}/adapter.awk
@@ -588,28 +651,65 @@ cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
 %%distribution PLD
 EOF
 
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <<EOF
+# global list of files (name 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
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqfiles <<EOF
+# global list of files (name 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
+EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoreqdep <<EOF
+# global list of capabilities (SONAME, perl(module), php(module) regexps)
+# which don't generate dependencies on package NAMES
+libGL.so.1
+libGLU.so.1
+libOSMesa.so.4
+libglide3.so.3
+libgtkmozembed.so
+libgtksuperwin.so
+libxpcom.so
+EOF
+
+# for rpm -e|-U --repackage
+install -d $RPM_BUILD_ROOT/var/spool/repackage
+
+# move libs to /lib
+for a in librpm-%{ver}.so librpmdb-%{ver}.so librpmio-%{ver}.so ; do
+       mv -f $RPM_BUILD_ROOT%{_libdir}/$a $RPM_BUILD_ROOT/lib
+       ln -s /lib/$a $RPM_BUILD_ROOT%{_libdir}/$a
+done
+
 %find_lang %{name}
 
+rm -rf manual
+cp -a doc/manual manual
+rm -f manual/Makefile*
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post  -p /sbin/ldconfig
-%postun -p /sbin/ldconfig
+%post  lib -p /sbin/ldconfig
+%postun lib -p /sbin/ldconfig
+
+%pre build
+find /usr/lib/rpm -name '*-linux' -type l | xargs rm -f
 
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc RPM-PGP-KEY CHANGES doc/manual/[a-z]*
+%doc RPM-PGP-KEY CHANGES manual
 
 %attr(755,root,root) /bin/rpm
-%attr(755,root,root) %{_bindir}/rpmdb
-%attr(755,root,root) %{_bindir}/rpmquery
-%attr(755,root,root) %{_bindir}/rpmsign
-%attr(755,root,root) %{_bindir}/rpmverify
-%attr(755,root,root) %{_libdir}/rpm/rpmdb
-%attr(755,root,root) %{_libdir}/rpm/rpmq
-%attr(755,root,root) %{_libdir}/rpm/rpmk
-%attr(755,root,root) %{_libdir}/rpm/rpmv
-%attr(755,root,root) %{_libdir}/librpm*.so.*.*
+#%attr(755,root,root) %{_bindir}/rpmdb
+#%attr(755,root,root) %{_bindir}/rpmquery
+#%attr(755,root,root) %{_bindir}/rpmsign
+#%attr(755,root,root) %{_bindir}/rpmverify
 
 %dir %{_sysconfdir}/rpm
 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/rpm/macros
@@ -623,37 +723,32 @@ rm -rf $RPM_BUILD_ROOT
 %lang(sk) %{_mandir}/sk/man8/rpm.8*
 
 %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]
 
 %doc %attr(755,root,root) %{_libdir}/rpm/convertrpmrc.sh
 
 %{_libdir}/rpm/rpmrc
 %{_libdir}/rpm/rpmpopt*
 %{_libdir}/rpm/macros
-%{_libdir}/rpm/noarch-linux
-%{_libdir}/rpm/noarch-pld-linux
-%ifarch i386 i486 i586 i686 athlon
-%{_libdir}/rpm/i?86*
-%{_libdir}/rpm/athlon*
-%endif
-%ifarch sparc sparc64
-%{_libdir}/rpm/sparc*
-%endif
-%ifarch alpha
-%{_libdir}/rpm/alpha*
-%endif
-%ifarch ppc
-%{_libdir}/rpm/ppc*
-%endif
+
+%files lib
+%defattr(644,root,root,755)
+%attr(755,root,root) /lib/librpm*-*.so
+%attr(755,root,root) %{_libdir}/librpm*-*.so
 
 %files build
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/rpmbuild
-%attr(755,root,root) %{_bindir}/rpme
-%attr(755,root,root) %{_bindir}/rpmi
-%attr(755,root,root) %{_bindir}/rpmu
-%attr(755,root,root) %{_libdir}/rpm/find-requires
+%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
@@ -662,33 +757,58 @@ rm -rf $RPM_BUILD_ROOT
 %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-prereqs
 %attr(755,root,root) %{_libdir}/rpm/check-files
-%attr(755,root,root) %{_libdir}/rpm/compress-doc
-%attr(755,root,root) %{_libdir}/rpm/cpanflute
+%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.*
-%attr(755,root,root) %{_libdir}/rpm/rpmdiff*
+#%attr(755,root,root) %{_libdir}/rpm/magic*
+%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/rpmi
 %attr(755,root,root) %{_libdir}/rpm/rpmt
-%attr(755,root,root) %{_libdir}/rpm/rpme
-%attr(755,root,root) %{_libdir}/rpm/rpmu
+%{_libdir}/rpm/noarch-*
+%ifarch i386 i486 i586 i686 athlon
+%{_libdir}/rpm/i?86*
+%{_libdir}/rpm/athlon*
+%endif
+%ifarch sparc sparc64
+%{_libdir}/rpm/sparc*
+%endif
+%ifarch alpha
+%{_libdir}/rpm/alpha*
+%endif
+%ifarch ppc
+%{_libdir}/rpm/ppc*
+%endif
+# not used yet ...
+%{_libdir}/rpm/sql.prov
+%{_libdir}/rpm/sql.req
+%{_libdir}/rpm/tcl.req
+%{_libdir}/rpm/trpm
 
-%files build-tools
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/builder
-%attr(755,root,root) %{_bindir}/adapter.awk
-%attr(755,root,root) %{_bindir}/pldnotify.awk
+%attr(755,root,root) %{_bindir}/javadeps
+%attr(755,root,root) %{_bindir}/gendiff
+%attr(755,root,root) %{_bindir}/rpmbuild
+
+%{_mandir}/man1/gendiff.1*
+%{_mandir}/man8/rpmbuild.8*
+%lang(ja) %{_mandir}/ja/man8/rpmbuild.8*
+%lang(pl) %{_mandir}/pl/man1/gendiff.1*
+%lang(pl) %{_mandir}/pl/man8/rpmbuild.8*
 
 %files devel
 %defattr(644,root,root,755)
 %{_includedir}/rpm
-%attr(755,root,root) %{_libdir}/librpm*.la
-%attr(755,root,root) %{_libdir}/librpm*.so
+%{_libdir}/librpm*.la
+%attr(755,root,root) %{_libdir}/librpm.so
+%attr(755,root,root) %{_libdir}/librpmio.so
+%attr(755,root,root) %{_libdir}/librpmdb.so
+%attr(755,root,root) %{_libdir}/librpmbuild.so
 
 %files static
 %defattr(644,root,root,755)
@@ -696,21 +816,47 @@ rm -rf $RPM_BUILD_ROOT
 
 %files utils
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/gendiff
-%attr(755,root,root) %{_bindir}/javadeps
+%attr(755,root,root) %{_bindir}/debugedit
 %attr(755,root,root) %{_bindir}/rpm2cpio
+%attr(755,root,root) %{_bindir}/rpmcache
+%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/rpmdiff*
+%attr(755,root,root) %{_libdir}/rpm/tgpg
+%attr(755,root,root) %{_libdir}/rpm/rpmdb_loadcvt
+
+# not here
+#%%{_libdir}/rpm/rpm.daily
+#%%{_libdir}/rpm/rpm.log
+#%%{_libdir}/rpm/rpm.xinetd
 
 %{_mandir}/man8/rpm2cpio.8*
-%{_mandir}/man1/*
+%{_mandir}/man8/rpmdeps.8*
+%{_mandir}/man8/rpmcache.8*
+%{_mandir}/man8/rpmgraph.8*
 %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
+%lang(ja) %{_mandir}/ja/man8/rpmcache.8*
+%lang(ja) %{_mandir}/ja/man8/rpmgraph.8*
 %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
 %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
+%lang(pl) %{_mandir}/pl/man8/rpmdeps.8*
+%lang(pl) %{_mandir}/pl/man8/rpmcache.8*
+%lang(pl) %{_mandir}/pl/man8/rpmgraph.8*
 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
 
+%files utils-static
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/rpm[ieu]
+%attr(755,root,root) %{_libdir}/rpm/rpm[ieu]
+
 %files perlprov
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/rpm/perl*
-%attr(755,root,root) %{_libdir}/rpm/find-perl-*
+%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
@@ -731,3 +877,11 @@ rm -rf $RPM_BUILD_ROOT
 %files -n python-rpm
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/*.so
+%attr(755,root,root) %{py_sitedir}/rpmdb/*.so
+%{py_sitedir}/rpmdb/*.py*
+
+%files build-tools
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/builder
+%attr(755,root,root) %{_bindir}/adapter.awk
+%attr(755,root,root) %{_bindir}/pldnotify.awk
This page took 0.070874 seconds and 4 git commands to generate.