%bcond_with static # build static rpmi (not supported at the moment)
%bcond_without apidocs # don't generate documentation with doxygen
%bcond_with autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
+%bcond_without home_etc # build without HOME_ETC support
%bcond_without python # don't build python bindings
%bcond_without selinux # build without selinux support
+%bcond_with neon # build with HTTP/WebDAV support (neon library)
# 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"
# versions of required libraries
%define reqdb_ver 4.3.27-1
%define reqpopt_ver 1.10.1
-%define beecrypt_ver 2:4.1.0
+%define beecrypt_ver 2:4.1.2-4
%define rpm_macros_rev 1.231
Summary: RPM Package Manager
Summary(de): RPM Packet-Manager
Name: rpm
%define sover 4.4
Version: 4.4.1
-Release: 1.99
+Release: 9.1
License: GPL
Group: Base
Source0: ftp://jbj.org/pub/rpm-4.4.x/%{name}-%{version}.tar.gz
Patch40: %{name}-print-requires.patch
Patch41: %{name}-reduce-stack-usage.patch
Patch42: %{name}-glob.patch
+Patch43: %{name}-patch-quote.patch
+Patch44: %{name}-no-neon.patch
+Patch45: %{name}-no-sqlite.patch
+Patch46: %{name}-file-update.patch
URL: http://www.rpm.org/
Icon: rpm.gif
BuildRequires: autoconf >= 2.52
BuildRequires: automake
BuildRequires: beecrypt-devel >= %{beecrypt_ver}
-BuildRequires: bzip2-devel >= 1.0.1
+BuildRequires: bzip2-devel >= 1.0.2-17
BuildRequires: db-devel >= %{reqdb_ver}
%{?with_apidocs:BuildRequires: doxygen}
-BuildRequires: elfutils-devel
+BuildRequires: elfutils-devel >= 0.108
BuildRequires: findutils
BuildRequires: gettext-devel >= 0.11.4-2
+%{?with_home_etc:BuildRequires: home-etc-devel >= 1:1.0.9-2}
#BuildRequires: libmagic-devel
%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
BuildRequires: libstdc++-devel
BuildRequires: libtool
+%if %{with neon}
BuildRequires: libxml2-devel
BuildRequires: neon-devel >= 0.24.7-3
+%endif
BuildRequires: patch >= 2.2
BuildRequires: popt-devel >= %{reqpopt_ver}
%{?with_python:BuildRequires: python-devel >= 2.2}
%if %{with static}
# Require static library only for static build
BuildRequires: beecrypt-static >= %{beecrypt_ver}
-BuildRequires: bzip2-static >= 1.0.2-5
+BuildRequires: bzip2-static >= 1.0.2-17
BuildRequires: db-static >= %{reqdb_ver}
BuildRequires: glibc-static >= 2.2.94
BuildRequires: elfutils-static
Summary: RPMs library
Summary(pl): Biblioteki RPM-a
Group: Libraries
+Requires: beecrypt >= %{beecrypt_ver}
Requires: db >= %{reqdb_ver}
-%{?with_selinux:BuildRequires: libselinux >= 1.18}
+%{?with_selinux:Requires: libselinux >= 1.18}
Requires: popt >= %{reqpopt_ver}
+Obsoletes: rpm-libs
# avoid SEGV caused by mixed db versions
Conflicts: poldek < 0.18.1-16
+%if %{with home_etc}
+# avoid linking to /usr/lib
+Conflicts: home-etc < 1.0.9-2
+%endif
%description lib
RPMs library.
Requires: bzip2-devel
Requires: db-devel >= %{reqdb_ver}
Requires: elfutils-devel
+%{?with_home_etc:Requires: home-etc-devel >= 1:1.0.9-2}
%{?with_selinux:Requires: libselinux-devel}
Requires: popt-devel >= %{reqpopt_ver}
Requires: zlib-devel
%patch11 -p1
%patch12 -p1
%patch13 -p1
-# home-etc FIXME
-#%patch14 -p1
+%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
+%patch43 -p1
+%{!?with_neon:%patch44 -p1}
+%patch45 -p1
+%patch46 -p1
%patch0 -p1
%patch3 -p1
mv -f po/{no,nb}.po
mv -f po/{sr,sr@Latn}.po
-rm -rf neon zlib libelf db db3 popt rpmdb/db.h
+rm -rf sqlite zlib db db3 popt rpmdb/db.h
# generate Group translations to *.po
awk -f %{SOURCE6} %{SOURCE1}
CC="%{__newcc}" \
CXX="%{__newcxx}" \
CPP="%{__newcpp}" \
+ %{?with_autoreqdep:--enable-adding-packages-names-in-autogenerated-dependancies} \
--enable-shared \
--enable-static \
- %{?with_apidoc:--with-apidocs} \
- %{?with_pkgnameinautoreq:--enable-adding-packages-names-in-autogenerated-dependancies} \
+ %{?with_apidocs:--with-apidocs} \
+ %{?with_home_etc:--with-home_etc} \
%{?with_python:--with-python=auto} \
%{!?with_python:--without-python} \
%{!?with_selinux:--without-selinux} \
debugedit_LDADD="\$(WITH_LIBELF_LIB) -lpopt"
# %{!?with_static:rpm_LDFLAGS="\$(myLDFLAGS)"} \
+
%{?with_apidocs:%{__make} doxygen}
%install