]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm.spec
- start update to 4.2
[packages/rpm.git] / rpm.spec
index cf6bca9d22904c92c1619253daacb070735d344c..2e08d2caf936fd208841a2e27eaf7ba8fcb7818e 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -1,19 +1,35 @@
+#
+# TODO:
+# - learn find-perl-provides to use the __perl macro instead
+#   of /usr/bin/perl
+#
+# Conditional build:
+# _without_static      - build shared /bin/rpm (doesn't work at the moment)
+# 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        beecrypt_ver    2.2.0
-%define        beecrypt_rel    2
+# versions of required libraries
+%define        reqdb_ver       4.1.25-1
+%define        reqpopt_ver     1.7
 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.1
-Release:       8
+%define        ver     4.2
+Version:       %{ver}
+%define        rel     0.1
+Release:       %{rel}
+%define        beecrypt_rel    %{ver}_%{rel}
 License:       GPL
 Group:         Base
-Source0:       ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/%{name}-%{version}.tar.gz
+Source0:       ftp://ftp.rpm.org/pub/rpm/test-4.2/%{name}-%{version}.tar.gz
 Source1:       %{name}.groups
 Source2:       %{name}.macros
 Source3:       %{name}-install-tree
@@ -37,6 +53,7 @@ Source20:     %{name}-find-php-requires
 Source30:      builder
 Source31:      adapter.awk
 Source32:      pldnotify.awk
+Source33:      perl.prov
 Patch0:                %{name}-pl.po.patch
 Patch1:                %{name}-%{name}rc.patch
 Patch2:                %{name}-arch.patch
@@ -52,9 +69,8 @@ Patch11:      %{name}-noexpand.patch
 Patch12:       %{name}-scripts-closefds.patch
 Patch13:       %{name}-python-macros.patch
 Patch14:       %{name}-perlprov-regonly.patch
-Patch15:       %{name}-4.1-branch.patch
 Patch16:       %{name}-drop-legacy-CLI.patch
-Patch17:       %{name}-perlprov-perl5.6.patch
+Patch15:       %{name}-4.1-branch.patch
 Patch18:       %{name}-gettext-in-header.patch
 Patch19:       %{name}-compress-doc.patch
 Patch20:       %{name}-lt14d.patch
@@ -66,30 +82,36 @@ Patch25:    %{name}-bb-and-short-circuit.patch
 Patch26:       %{name}-4.1-branch-po-updates.patch
 Patch27:       %{name}-link.patch
 Patch28:       %{name}-beecrypt-opt.patch
+Patch29:       %{name}-python-pic.patch
+Patch30:       %{name}-home_etc.patch
+Patch31:       %{name}-system_libs-more.patch
+Patch32:       %{name}-nofile.patch
 URL:           http://www.rpm.org/
 Icon:          rpm.gif
 BuildRequires: autoconf >= 2.52
 BuildRequires: automake
 BuildRequires: bzip2-devel >= 1.0.1
-BuildRequires: db-devel >= 4.1.24-4
+BuildRequires: db-devel >= %{reqdb_ver}
 BuildRequires: doxygen
 BuildRequires: gettext-devel >= 0.11.4-2
-BuildRequires: libelf-devel
+BuildRequires: elfutils-devel
+BuildRequires: libmagic-devel
 BuildRequires: libtool
 BuildRequires: patch >= 2.2
 BuildRequires: python-devel >= 2.2
 BuildRequires: python-modules >= 2.2
 BuildRequires: rpm-pythonprov
 BuildRequires: zlib-devel
-BuildRequires: popt-devel >= 1.7
+BuildRequires: popt-devel >= %{reqpopt_ver}
 %if %{!?_without_static:1}%{?_without_static:0}
 # Require static library only for static build
 BuildRequires: bzip2-static >= 1.0.2-5
-BuildRequires: db-static >= 4.1
+BuildRequires: db-static >= %{reqdb_ver}
 BuildRequires: glibc-static >= 2.2.94
-BuildRequires: libelf-static
+BuildRequires: elfutils-static
+BuildRequires: libmagic-devel
 BuildRequires: zlib-static
-BuildRequires: popt-static >= 1.7
+BuildRequires: popt-static >= %{reqpopt_ver}
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Conflicts:     glibc < 2.2.92
@@ -100,6 +122,11 @@ Conflicts: glibc < 2.2.92
 # 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,
 install, query, verify, update, and uninstall individual software
@@ -159,7 +186,6 @@ Summary(ru):        
 Summary(uk):   èÅÄÅÒÉ ÔÁ Â¦Â̦ÏÔÅËÉ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm
 Group:         Development/Libraries
 Requires:      %{name} = %{version}
-Requires:      beecrypt-devel
 Requires:      bzip2-devel
 Requires:      db-devel
 Requires:      libelf-devel
@@ -218,6 +244,11 @@ Summary(ru):       
 Summary(uk):   óÔÁÔÉÞÎÁ Â¦Â̦ÏÔÅËÁ ÄÌÑ ÐÒÏÇÒÁÍ, ÝÏ ÐÒÁÃÀÀÔØ Ú ÐÁËÅÔÁÍÉ rpm
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}
+Requires:      bzip2-static
+Requires:      db-static
+Requires:      libelf-static
+Requires:      popt-static >= 1.7
+Requires:      zlib-static
 
 %description static
 RPM static libraries.
@@ -264,6 +295,7 @@ Summary(de):        Zusatzwerkzeuge f
 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
 
 %description perlprov
@@ -340,46 +372,49 @@ Python para manipular pacotes e bancos de dados RPM.
 
 %package lib
 Summary:       RPMs library
-Summary(pl):   Biblioteki RPMa
+Summary(pl):   Biblioteki RPM-a
 Group:         Libraries
+Requires:      db >= %{reqdb_ver}
+Requires:      popt >= %{reqpopt_ver}
 
 %description lib
 RPMs library.
 
 %description lib -l pl
-Biblioteki RPMa.
+Biblioteki RPM-a.
 
 %package build
-Summary:        Scripts for building binary RPM packages
-Summary(de):    Scripts fürs Bauen binärer RPM-Pakete
-Summary(pl):    Skrypty pomocnicze do budowania binarnych RPM-ów
-Summary(pt_BR): Scripts e programas executáveis usados para construir pacotes
+Summary:       Scripts for building binary RPM packages
+Summary(de):   Scripts fürs Bauen binärer RPM-Pakete
+Summary(pl):   Skrypty pomocnicze do budowania binarnych RPM-ów
+Summary(pt_BR):        Scripts e programas executáveis usados para construir pacotes
 Summary(ru):   óËÒÉÐÔÙ É ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÓÂÏÒËÉ ÐÁËÅÔÏ×
 Summary(uk):   óËÒÉÐÔÉ ÔÁ ÕÔÉ̦ÔÉ, ÎÅÏÂȦÄΦ ÄÌÑ ÐÏÂÕÄÏ×É ÐÁËÅÔ¦×
-Group:          Applications/File
-Requires:       %{name} = %{version}
-Requires:       /bin/id
-Requires:       awk
-Requires:       binutils
-Requires:       diffutils
-Requires:       file >= 3.31
-Requires:       fileutils
-Requires:       findutils
+Group:         Applications/File
+Requires(pre): findutils
+Requires:      %{name} = %{version}
+Requires:      /bin/id
+Requires:      awk
+Requires:      binutils
+Requires:      diffutils
+Requires:      file >= 3.31
+Requires:      fileutils
+Requires:      findutils
 %ifarch athlon
-Requires:       gcc >= 3.0.3
+Requires:      gcc >= 3.0.3
 %else
-Requires:       gcc
+Requires:      gcc
 %endif
-Requires:       glibc-devel
-Requires:       grep
-Requires:       gzip
-Requires:       make
-Requires:       patch
-Requires:       popt >= 1.7
-Requires:       sed
-Requires:       sh-utils
-Requires:       tar
-Requires:       textutils
+Requires:      glibc-devel
+Requires:      grep
+Requires:      gzip
+Requires:      make
+Requires:      patch
+Requires:      popt >= 1.7
+Requires:      sed
+Requires:      sh-utils
+Requires:      tar
+Requires:      textutils
 
 %description build
 Scripts for building binary RPM packages.
@@ -482,9 +517,12 @@ Statyczna wersja biblioteki kryptograficznej.
 
 %prep
 %setup -q
-%patch0 -p1
+# need update
+#%%patch0 -p1
 %patch1 -p1
 %patch2 -p1
+# find-spec-bcond need update
+# po/pl.po need update
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
@@ -501,20 +539,24 @@ Statyczna wersja biblioteki kryptograficznej.
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
-%patch15 -p1
 %patch16 -p1
-%patch17 -p1
 %patch18 -p1
 %patch19 -p1
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
-%patch23 -p1
+# need review
+#%%patch23 -p1
 %patch24 -p1
 %patch25 -p1
-%patch26 -p1
+# need review
+#%%patch26 -p1
 %patch27 -p1
 %patch28 -p1
+%patch29 -p1
+%patch30 -p1
+%patch31 -p1
+%patch32 -p1
 
 sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
 cp -f platform.in macros.pld.in
@@ -528,6 +570,7 @@ install %{SOURCE17} scripts/php.prov.in
 install %{SOURCE18} scripts/php.req.in
 install %{SOURCE19} scripts/find-php-provides
 install %{SOURCE20} scripts/find-php-requires
+install %{SOURCE33} scripts/perl.prov
 
 cd scripts;
 mv -f perl.req perl.req.in
@@ -554,6 +597,7 @@ rm -f missing
 %{__automake}
 cd ..
 
+
 rm -f missing
 %{__libtoolize}
 %{__gettextize}
@@ -568,7 +612,9 @@ 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-static \
        --with-apidocs \
@@ -615,6 +661,9 @@ cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
 %%distribution PLD
 EOF
 
+# for rpm -e|-U --repackage
+install -d $RPM_BUILD_ROOT/var/spool/repackage
+
 %find_lang %{name}
 
 rm -f doc/manual/Makefile*
@@ -627,6 +676,9 @@ rm -rf $RPM_BUILD_ROOT
 %post   -n beecrypt -p /sbin/ldconfig
 %postun -n beecrypt -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/*
@@ -645,6 +697,7 @@ 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
 
 %doc %attr(755,root,root) %{_libdir}/rpm/convertrpmrc.sh
@@ -652,20 +705,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/rpm/rpmrc
 %{_libdir}/rpm/rpmpopt*
 %{_libdir}/rpm/macros
-%{_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
 
 %files lib
 %defattr(644,root,root,755)
@@ -697,6 +736,20 @@ rm -rf $RPM_BUILD_ROOT
 %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*
+%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
@@ -728,25 +781,33 @@ rm -rf $RPM_BUILD_ROOT
 
 %files utils
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/debugedit
 %attr(755,root,root) %{_bindir}/rpm2cpio
-%attr(755,root,root) %{_libdir}/rpm/rpmdiff*
-%attr(755,root,root) %{_libdir}/rpm/tgpg
-%attr(755,root,root) %{_libdir}/rpm/find-debuginfo.sh
-%attr(755,root,root) %{_bindir}/rpmgraph
 %attr(755,root,root) %{_bindir}/rpmcache
+%attr(755,root,root) %{_bindir}/rpmdeps
+%attr(755,root,root) %{_bindir}/rpmgraph
 %attr(755,root,root) %{_bindir}/striptofile
 %attr(755,root,root) %{_bindir}/unstripfile
+%attr(755,root,root) %{_libdir}/rpm/find-debuginfo.sh
+%attr(755,root,root) %{_libdir}/rpm/rpm2cpio.sh
+%attr(755,root,root) %{_libdir}/rpm/rpmd
+%attr(755,root,root) %{_libdir}/rpm/rpmdiff*
+%attr(755,root,root) %{_libdir}/rpm/rpmi
+%attr(755,root,root) %{_libdir}/rpm/rpmk
+%attr(755,root,root) %{_libdir}/rpm/rpmq
+%attr(755,root,root) %{_libdir}/rpm/tgpg
+
 # not here
-#%{_prefix}/lib/rpm/rpm.daily
-#%{_prefix}/lib/rpm/rpm.log
-#%{_prefix}/lib/rpm/rpm.xinetd
-%{_prefix}/lib/rpm/rpm2cpio.sh
+#%%{_libdir}/rpm/rpm.daily
+#%%{_libdir}/rpm/rpm.log
+#%%{_libdir}/rpm/rpm.xinetd
 
 %{_mandir}/man8/rpm2cpio.8*
 %lang(ja) %{_mandir}/ja/man8/rpm2cpio.8*
 %lang(ko) %{_mandir}/ko/man8/rpm2cpio.8*
 %lang(pl) %{_mandir}/pl/man8/rpm2cpio.8*
 %lang(ru) %{_mandir}/ru/man8/rpm2cpio.8*
+%{_mandir}/man8/rpmdeps.8*
 %{_mandir}/man8/rpmcache.8*
 %{_mandir}/man8/rpmgraph.8*
 
@@ -789,10 +850,10 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n beecrypt-devel
 %defattr(644,root,root,755)
-%{_prefix}/lib/libbeecrypt.so
-%{_prefix}/lib/libbeecrypt.la
+%{_libdir}/libbeecrypt.so
+%{_libdir}/libbeecrypt.la
 %{_includedir}/beecrypt
 
 %files -n beecrypt-static
 %defattr(644,root,root,755)
-%{_prefix}/lib/libbeecrypt.a
+%{_libdir}/libbeecrypt.a
This page took 0.09735 seconds and 4 git commands to generate.