X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm.spec;h=13aa5ec67caf6fa7ba00bfcafffbfa03c5472a93;hp=763ffab36dd52b6085597c15dcb6f972d08e3636;hb=c6093d98e9b98279d3723bd08fd0c41b2ea5e4de;hpb=e9fe9fc5f27891d4cfa0fbf2b3121c13b68c320a diff --git a/rpm.spec b/rpm.spec index 763ffab..13aa5ec 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,23 +1,24 @@ # # TODO: -# - use system libmagic not internal libfmagic -# - when really needed: _noauto{req,prov} for non-helper-generated deps +# - consider using system libmagic not internal libfmagic +# (but internal has different method of passing output) # # 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" -%include /usr/lib/rpm/macros.python -%define snap 20040107 +%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.143 +%define rpm_macros_rev 1.158 Summary: RPM Package Manager Summary(de): RPM Packet-Manager Summary(es): Gestor de paquetes RPM @@ -26,14 +27,15 @@ 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}.8 +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.bz2 -# Source0-md5: c1bc4a2ae441fbd4da8dd90149bab2f2 +# Source0-md5: a91b8e17f6e69208b188d2876e80aef9 Source1: %{name}.groups Source2: %{name}.platform Source3: %{name}-install-tree @@ -55,7 +57,6 @@ 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 @@ -88,7 +89,12 @@ Patch35: %{name}-missing-prototypes.patch Patch36: %{name}-pld-autodep.patch Patch37: %{name}-rpmsq.patch Patch38: %{name}-file-readelf.patch -Patch39: %{name}-pentium3.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 @@ -96,11 +102,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 -BuildRequires: libselinux-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} @@ -117,7 +126,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 @@ -134,6 +143,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # 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} @@ -203,9 +213,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 @@ -265,7 +275,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 @@ -536,14 +546,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 @@ -552,7 +562,8 @@ construir pacotes usando o RPM. %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 +# home-etc FIXME +#%patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 @@ -561,8 +572,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 @@ -576,19 +587,31 @@ cat %{SOURCE11} >> macros.in %patch24 -p1 %patch25 -p1 %patch26 -p1 -%patch27 -p1 +# DROP, amd64 is not the same thing as ia32e or x86_64 at least in terms of gcc optimizations +#%patch27 -p1 %patch28 -p1 %patch29 -p1 %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 +# SAME AS patch38 +#%patch41 -p1 +# OBSOLETE, merged upstream +#%patch42 -p1 +%patch43 -p0 +%patch44 -p1 cd scripts; mv -f perl.req perl.req.in @@ -609,6 +632,10 @@ 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 %{__libtoolize} @@ -627,8 +654,8 @@ cd .. # 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 @@ -638,9 +665,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 @@ -684,11 +712,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 < $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles < $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautocompressdoc <