X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm.spec;h=0e5ef6ac7ad90bea0af827287bf99777e41ad38d;hb=ce54a647ec667797391d58a1db71f9c73e91902f;hp=74779e2588bfea68e47218164a6859c3b9449da3;hpb=6eb3b53756ac19161380467d650b3fd0a1680603;p=packages%2Frpm.git diff --git a/rpm.spec b/rpm.spec index 74779e2..0e5ef6a 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,22 +1,23 @@ # # 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} +# - fix perl.req and perl.prov to support _noauto macros # - use system libmagic not internal libfmagic # # Conditional build: -# _without_static - build shared /bin/rpm (doesn't work at the moment) +%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 # 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 +%define snap 20031227 # versions of required libraries -%define reqdb_ver 4.1.25-1 +%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 Summary: RPM Package Manager Summary(de): RPM Packet-Manager Summary(es): Gestor de paquetes RPM @@ -27,29 +28,28 @@ Summary(uk): Name: rpm %define ver 4.3 Version: %{ver} -%define rel 0.%{snap}.16 -Release: %{rel} +Release: 0.%{snap}.2.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-md5: dcfe5575c62531838be5a0bebdaf0d1e Source1: %{name}.groups Source2: %{name}.platform Source3: %{name}-install-tree -Source4: %{name}-find-rpm-provides +#Source4: %{name}-find-rpm-provides Source5: %{name}-find-spec-bcond Source6: %{name}-find-lang -Source7: %{name}-find-provides -Source8: %{name}-find-requires +#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 +#Source15: %{name}-find-provides-wrapper +#Source16: %{name}-find-requires-wrapper Source30: builder Source31: adapter.awk Source32: pldnotify.awk @@ -66,7 +66,6 @@ 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 @@ -74,21 +73,21 @@ 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 +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 +Patch40: %{name}-makefile-no_myLDADD_deps.patch +Patch41: %{name}-libdir64.patch +Patch42: %{name}-libdir-links.patch +Patch43: %{name}-find_required_pkgs_on_build.patch URL: http://www.rpm.org/ Icon: rpm.gif BuildRequires: autoconf >= 2.52 @@ -96,19 +95,20 @@ BuildRequires: automake BuildRequires: beecrypt-devel >= %{beecrypt_ver} BuildRequires: bzip2-devel >= 1.0.1 BuildRequires: db-devel >= %{reqdb_ver} -BuildRequires: doxygen +%{?with_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 +BuildRequires: popt-devel >= %{reqpopt_ver} +%{?with_python: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 +BuildRequires: libselinux-devel +%if %{with static} # Require static library only for static build BuildRequires: beecrypt-static >= %{beecrypt_ver} BuildRequires: bzip2-static >= 1.0.2-5 @@ -116,14 +116,16 @@ 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} +BuildRequires: zlib-static %endif -BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) Requires: popt >= %{reqpopt_ver} +Requires: %{name}-lib = %{version}-%{release} 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) -%define __find_provides %{SOURCE4} %define _binary_payload w9.gzdio %define _noPayloadPrefix 1 @@ -135,6 +137,8 @@ Conflicts: glibc < 2.2.92 %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 @@ -193,11 +197,12 @@ Summary(pt_BR): Arquivos de inclus Summary(ru): èÅÄÅÒÙ É ÂÉÂÌÉÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ Summary(uk): èÅÄÅÒÉ ÔÁ ¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm Group: Development/Libraries -Requires: %{name}-lib = %{version} +Requires: %{name}-lib = %{version}-%{release} Requires: beecrypt-devel >= %{beecrypt_ver} Requires: bzip2-devel Requires: db-devel Requires: elfutils-devel +Requires: libselinux-devel Requires: popt-devel >= %{reqpopt_ver} Requires: zlib-devel @@ -254,7 +259,7 @@ Summary(pt_BR): Bibliotecas est Summary(ru): óÔÁÔÉÞÅÓËÁÑ ÂÉÂÌÉÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍÍ, ÒÁÂÏÔÁÀÝÉÈ Ó rpm-ÐÁËÅÔÁÍÉ Summary(uk): óÔÁÔÉÞÎÁ ¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm Group: Development/Libraries -Requires: %{name}-devel = %{version} +Requires: %{name}-devel = %{version}-%{release} Requires: beecrypt-static >= %{beecrypt_ver} Requires: bzip2-static Requires: db-static @@ -289,7 +294,7 @@ Summary: Additional utilities for managing rpm packages and database Summary(de): Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken Summary(pl): Dodatkowe narzêdzia do zarz±dzania baz± RPM-a i pakietami Group: Applications/File -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} Requires: popt >= %{reqpopt_ver} %description utils @@ -301,11 +306,28 @@ Zusatzwerkzeuge f %description utils -l pl Dodatkowe narzêdzia do zarz±dzania baz± RPM-a i pakietami. +%package utils-perl +Summary: Additional utilities for managing rpm packages and database +Summary(de): Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken +Summary(pl): Dodatkowe narzêdzia do zarz±dzania baz± RPM-a i pakietami +Group: Applications/File +Requires: %{name}-utils = %{version}-%{release} +Requires: popt >= %{reqpopt_ver} + +%description utils-perl +Additional utilities for managing rpm packages and database. + +%description utils-perl -l de +Zusatzwerkzeuge für Verwaltung RPM-Pakete und Datenbanken. + +%description utils-perl -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} +Requires: %{name} = %{version}-%{release} %description utils-static Static rpm utilities for repairing system in case something with @@ -325,7 +347,7 @@ Summary: Additional utilities for checking perl provides/requires in rpm package 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: %{name} = %{version}-%{release} Requires: perl-devel Requires: perl-modules @@ -344,7 +366,7 @@ pakietach rpm. Summary: Python macros, which simplifies creation of rpm packages with Python software Summary(pl): Makra u³atwiaj±ce tworzenie pakietów rpm z programami napisanymi w Pythonie Group: Applications/File -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} Requires: python-modules %description pythonprov @@ -359,7 +381,7 @@ Pythonie. Summary: Additional utilities for managing rpm packages and database Summary(pl): Dodatkowe narzêdzia do sprawdzania zale¿no¶ci skryptów php w rpm Group: Applications/File -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description php-pearprov Additional utilities for checking php pear provides/requires in rpm @@ -374,7 +396,7 @@ 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: Development/Languages/Python -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %pyrequires_eq python Obsoletes: rpm-python @@ -407,6 +429,8 @@ Summary(pl): Biblioteki RPM-a Group: Libraries Requires: db >= %{reqdb_ver} Requires: popt >= %{reqpopt_ver} +# avoid SEGV caused by mixed db versions +Conflicts: poldek < 0.18.1-16 %description lib RPMs library. @@ -423,11 +447,11 @@ Summary(ru): Summary(uk): óËÒÉÐÔÉ ÔÁ ÕÔÉ̦ÔÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÐÏÂÕÄÏ×É ÐÁËÅÔ¦× Group: Applications/File Requires(pre): findutils -Requires: %{name} = %{version} -Requires: %{name}-utils = %{version} +Requires: %{name}-utils = %{version}-%{release} Requires: /bin/id Requires: awk Requires: binutils +Requires: chrpath Requires: diffutils Requires: file >= 4.01 Requires: fileutils @@ -437,6 +461,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 @@ -447,6 +475,7 @@ Requires: sed Requires: sh-utils Requires: tar Requires: textutils +Provides: rpmbuild(macros) = %{rpm_macros_rev} %description build Scripts for building binary RPM packages. @@ -477,10 +506,10 @@ Summary(pt_BR): Scripts e programas execut Summary(ru): óËÒÉÐÔÙ É ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÓÂÏÒËÉ ÐÁËÅÔÏ× Summary(uk): óËÒÉÐÔÉ ÔÁ ÕÔÉ̦ÔÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÐÏÂÕÄÏ×É ÐÁËÅÔ¦× Group: Applications/File -Requires: %{name}-build = %{version} +Requires: %{name}-build = %{version}-%{release} # these are optional #Requires: cvs -#Requires: wget +Requires: wget %description build-tools Scripts for managing .spec files and building RPM packages. @@ -505,7 +534,8 @@ construir pacotes usando o RPM. %prep %setup -q -%patch0 -p1 +# pl.po translation +#%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 @@ -517,7 +547,6 @@ construir pacotes usando o RPM. %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 %patch13 -p1 %patch14 -p1 %patch15 -p1 @@ -525,40 +554,37 @@ construir pacotes usando o RPM. %patch17 -p1 %patch18 -p1 %patch19 -p1 -# patch20 -- look down +%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 '# obsoleted file' > macros.perl +echo '%%define _perl_deps 1' > macros.perl echo '# obsoleted file' > macros.python -echo '# obsoleted file' > macros.php +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 -%patch20 -p1 -%patch25 -p1 %patch26 -p1 %patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 %patch33 -p1 %patch34 -p1 +%patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 +%patch40 -p1 +%patch41 -p1 +%patch42 -p1 +%patch43 -p1 cd scripts; mv -f perl.req perl.req.in mv -f perl.prov perl.prov.in cd .. -chmod +x %{SOURCE4} rm -rf zlib libelf db db3 popt rpmdb/db.h # generate Group translations to *.po @@ -599,40 +625,38 @@ mv -f macros.tmp macros.in CC="%{__cc}" CXX="%{__cxx}" CPP="%{__cpp}" \ --enable-shared \ --enable-static \ - --with-apidocs \ - --with-python=auto \ + %{?with_docs:--with-apidocs} \ + %{?with_python:--with-python=auto} \ + %{!?with_python:--without-python} \ --without-db %{__make} \ - %{?_without_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \ + %{!?with_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \ myLDFLAGS="%{rpmldflags}" %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/lib +install -d $RPM_BUILD_ROOT/%{_lib} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ 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)??? -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 %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond +install %{SOURCE10} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc +install %{SOURCE11} $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 @@ -673,16 +697,22 @@ libgtkmozembed.so libgtksuperwin.so libxpcom.so EOF +cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc <