#
# TODO:
-# - manuals are not compressed
+# - check if we want shell autodeps: Requires: executable(ln) executable(mv)
# - %{_arch} = i686 not as used to be i386:
# 5.0.2: rpm -E '%_target_base_arch %_arch'
# i386 i686
# /usr/lib/rpm/osgideps.pl
# /usr/lib/rpm/perldeps.pl
# /usr/lib/rpm/vcheck
-# /usr/share/man/man8/rpmconstant.8.gz
+# /usr/share/man/man8/rpmconstant.8
#
# Conditional build:
%bcond_with static # build static rpm+rpmi
%bcond_without db # BerkeleyDB
%bcond_with sqlite # build with SQLite support
%bcond_with sqlite_dbapi # default database backend is sqlite
+%bcond_without system_lua # use system lua
# 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"
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 5.0.2
+Version: 5.0.3
Release: 0.2
License: LGPL
Group: Base
Source0: http://rpm5.org/files/rpm/rpm-5.0/%{name}-%{version}.tar.gz
-# Source0-md5: 596aaf5cd9dea7195f625530bc89e684
+# Source0-md5: b3df4e54e84cf3344ce6b76fa2a8d5bf
Source1: %{name}.groups
Source2: %{name}.platform
Source3: %{name}-install-tree
Source4: %{name}-find-spec-bcond
+Source5: %{name}-hrmib-cache
Source6: %{name}-groups-po.awk
Source7: %{name}-compress-doc
Source8: %{name}-check-files
#Patch0: %{name}-pl.po.patch
Patch1: %{name}-man_pl.patch
+Patch2: %{name}-popt-downgrade.patch
Patch3: %{name}-rpmpopt.patch
Patch4: %{name}-perl-macros.patch
Patch5: %{name}-perl-req-perlfile.patch
Patch8: %{name}-php-macros.patch
Patch9: %{name}-gettext-in-header.patch
Patch10: %{name}-compress-doc.patch
+Patch11: %{name}-lua.patch
Patch14: %{name}-etc_dir.patch
Patch16: %{name}-php-deps.patch
-Patch18: %{name}-perl_req.patch
-
Patch23: %{name}-pkgconfigdeps.patch
Patch26: %{name}-notsc.patch
Patch61: %{name}-sparc64.patch
URL: http://rpm5.org/
-BuildRequires: autoconf >= 2.57
+BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1.4
BuildRequires: beecrypt-devel >= %{beecrypt_ver}
BuildRequires: bzip2-devel >= 1.0.2-17
%endif
BuildRequires: patch >= 2.2
BuildRequires: popt-devel >= %{reqpopt_ver}
+%{?with_system_lua:BuildRequires: lua51-devel >= 5.1.2}
%{?with_python:BuildRequires: python-devel >= 1:2.3}
BuildRequires: python-modules >= 1:2.3
BuildRequires: rpm-perlprov
# APPLIED ALREADY? translationproject.org is used now
#%%patch0 -p1
%patch1 -p1
+%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
+%{?with_system_lua:%patch11 -p1}
# CHECK ME - macrofiles: ~/etc could be used
#%%patch14 -p1
%patch16 -p1
-%patch18 -p1
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
# rpm checks for CPU type at runtime, but it looks better
#sed -i -e 's|@host@|%{_target_cpu}-%{_target_vendor}-linux-gnu|' -e 's|@host_cpu@|%{_target_cpu}|' macros.in
+%{?with_system_lua:CPPFLAGS=-I/usr/include/lua51}
# pass CC and CXX too in case of building with some older configure macro
-# disable perl-RPM2 build, we have it in separate spec
%configure \
CC="%{__newcc}" \
CXX="%{__newcxx}" \
--with-db=%{?with_db:external}%{!?with_db:no} \
--with-sqlite=%{?with_sqlite:external}%{!?with_sqlite:no} \
--with-dbapi=%{!?with_sqlite_dbapi:db}%{?with_sqlite_dbapi:sqlite} \
- --with-lua=internal \
+ --with-lua=%{!?with_system_lua:internal}%{?with_system_lua:external} \
--with-pcre=no \
--with-keyutils=none \
--without-path-versioned \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner}
+install -d $RPM_BUILD_ROOT{/bin,/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
%{__make} install \
pkgconfigdir=%{_pkgconfigdir} \
install %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires
install scripts/find-php* $RPM_BUILD_ROOT%{_rpmlibdir}
install scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir}
+install %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
install %{SOURCE14} $RPM_BUILD_ROOT/etc/sysconfig/rpm
install %{SOURCE17} $RPM_BUILD_ROOT%{_bindir}/banner.sh
ln -s /%{_lib}/$a $RPM_BUILD_ROOT%{_libdir}/$a
done
+# Append rpm.platform contents to /usr/lib/rpm/${arch}-linux/macros
+for m in $RPM_BUILD_ROOT%{_rpmlibdir}/*/macros ; do
+ cat %{SOURCE2} | %{__sed} 's#@LIB@#%{_lib}#' >> $m
+done
# remove arch dependant macros which have no use on noarch
-#%{__sed} -i -e '
-#/{__spec_install_post_strip}/d
-#/{__spec_install_post_chrpath}/d
-#/{__spec_install_post_compress_modules}/d
-#' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros
+%{__sed} -i -e '
+/{__spec_install_post_strip}/d
+/{__spec_install_post_chrpath}/d
+/{__spec_install_post_compress_modules}/d
+' $RPM_BUILD_ROOT%{_rpmlibdir}/noarch-linux/macros
# Bourne shell script vs ELF executable linked with rpm,rpmdb,rpmio
mv $RPM_BUILD_ROOT{%{_rpmlibdir},%{_bindir}}/rpm2cpio
%pretrans
# this needs to be a dir
if [ -f %{_sysconfdir}/rpm/sysinfo ]; then
+ umask 022
mv -f %{_sysconfdir}/rpm/sysinfo{,.rpmsave}
mkdir %{_sysconfdir}/rpm/sysinfo
fi
+%triggerpostun -- %{name} < 4.4.9-44
+%{_rpmlibdir}/hrmib-cache
+
%post lib -p /sbin/ldconfig
%postun lib -p /sbin/ldconfig
%dir /var/lock/rpm
/var/lock/rpm/transaction
+# exported package NVRA (stamped with install tid)
+# net-snmp hrSWInstalledName queries, bash-completions
+%dir /var/cache/hrmib
+
#%attr(755,root,root) %{_rpmlibdir}/rpmd
#%{!?with_static:%attr(755,root,root) %{_rpmlibdir}/rpm[eiu]}
#%attr(755,root,root) %{_rpmlibdir}/rpmk
%{_rpmlibdir}/macros
%{_rpmlibdir}/macros.pld
+%attr(755,root,root) %{_rpmlibdir}/hrmib-cache
+
%files base
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/rpm