#
# TODO:
+# pluto_> btw. /usr/lib/rpm/find-debuginfo.sh needs fix. it extract debuginfo also from kernel modules.
+# pluto_> there's a filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f
+# pluto_> and we need to add ! -path /lib/modules/...
# - python(abi) cap is not provided automatically because /usr/lib*/libpython2*.so.*
# matches ELF first
# - repackaging when lzma is not installed (todo: fix digest signature of header)
# tags (incl. digest) and writes whole package to destination file;
# repackaging uses unchanged "immutable header" image from original rpm, also
# preserving payload format and compressor from original rpm, _not_ current settings
+# /usr/bin/install: cannot stat `./it.gmo': No such file or directory
+# /usr/bin/install: cannot stat `./sr@Latn.gmo': No such file or directory
+# - maybe? http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=cfcd1f9bd98d5d0fc46a84931984efec3b9d47e2
+# - fix linking, rpm is beeing linked against installed rpmio
#
# Conditional build:
%bcond_with static # build static rpm+rpmi
%bcond_without apidocs # don't generate documentation with doxygen
+%bcond_with internal_db # internal db (db 4.5.20)
+%if "%{pld_release}" == "ac"
%bcond_without autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
+%bcond_with nptl # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
+%else
+%bcond_with autoreqdep # autogenerate package name deps in addition to sonames/perl(X)
+%bcond_without nptl # internal db: don't use process-shared POSIX mutexes (NPTL provides full interface)
+%endif
%bcond_without python # don't build python bindings
%bcond_without selinux # build without selinux support
%bcond_without system_libmagic # don't use system libmagic
%bcond_without suggest_tags # build without Suggest tag (bootstrapping)
-%bcond_without neon # build with HTTP/WebDAV support (neon library)
+%bcond_with neon # build with HTTP/WebDAV support (neon library). NOTE: neon libs are in /usr!
# 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"
+%ifarch sparc sparcv9 sparc64
+%undefine with_apidocs
+%endif
+
# versions of required libraries
-%define reqdb_ver 4.5.20-6
+%if "%{pld_release}" == "th"
+%define reqdb_ver 4.7.25
+%else
+%define reqdb_ver 4.5.20
+%endif
%define reqpopt_ver 1.10.8
%define beecrypt_ver 2:4.1.2-4
%define sover 4.5
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
Version: 4.5
-Release: 0.42
+Release: 46
License: LGPL
Group: Base
Source0: %{name}-%{version}.tar.gz
Source5: %{name}-hrmib-cache
Source6: %{name}-groups-po.awk
Source7: %{name}-compress-doc
-Source8: RPM-GPG-KEY
-Source9: %{name}-php-provides
-Source10: %{name}-php-requires
-Source11: %{name}.sysinfo
-Source12: perl.prov
-Source13: %{name}-user_group.sh
-Source14: %{name}.sysconfig
-Source15: %{name}-macros.java
-Source16: %{name}-java-requires
+Source8: ftp://ftp.pld-linux.org/dists/th/PLD-3.0-Th-GPG-key.asc
+# Source8-md5: 08b29584dd349aac9caa7610131a0a88
+Source9: ftp://ftp.pld-linux.org/dists/ac/PLD-2.0-Ac-GPG-key.asc
+# Source9-md5: 8e7574d1de2fa95c2c54cd2ee03364c1
+Source10: %{name}-php-provides
+Source11: %{name}-php-requires
+Source12: %{name}.sysinfo
+Source13: perl.prov
+Source14: %{name}-user_group.sh
+Source15: %{name}.sysconfig
+Source16: %{name}-macros.java
+Source17: %{name}-java-requires
# http://svn.pld-linux.org/banner.sh/
-Source17: banner.sh
+Source18: banner.sh
+Source19: %{name}-macros.gstreamer
+Patch1000: %{name}-new-debuginfo.patch
Patch1067: %{name}-disable-features.patch
Patch1070: %{name}-rpmrc-ac.patch
#Patch0: %{name}-pl.po.patch
Patch4: %{name}-perl-macros.patch
Patch6: %{name}-noexpand.patch
Patch7: %{name}-scripts-closefds.patch
+Patch8: %{name}-db.patch
Patch9: %{name}-gettext-in-header.patch
Patch10: %{name}-compress-doc.patch
+Patch11: %{name}-rpm5-patchset-8074.patch
Patch12: %{name}-system_libs.patch
+Patch13: %{name}-unglobal.patch
Patch14: %{name}-etc_dir.patch
Patch15: %{name}-system_libs-more.patch
+Patch16: %{name}-libmagic-locale.patch
Patch17: %{name}-ldconfig-always.patch
Patch18: %{name}-macros-ac.patch
-Patch19: %{name}-link.patch
-Patch20: %{name}-perl_req-use_base.patch
+Patch19: %{name}-macros-th.patch
+Patch20: %{name}-macros-ti.patch
+Patch21: %{name}-perl_req-skip_multiline.patch
Patch22: %{name}-provides-dont-obsolete.patch
Patch23: %{name}-pkgconfigdeps.patch
Patch24: %{name}-po.patch
+Patch25: %{name}-link.patch
Patch26: %{name}-notsc.patch
Patch27: %{name}-hack-norpmlibdep.patch
Patch28: %{name}-makefile-no_myLDADD_deps.patch
+Patch29: %{name}-perl_req-use_base.patch
Patch31: %{name}-missing-prototypes.patch
Patch32: %{name}-pld-autodep.patch
Patch33: %{name}-arch-x86_64.patch
Patch34: %{name}-epoch0.patch
+Patch35: %{name}-disable-features-ti.patch
Patch36: %{name}-debuginfo.patch
Patch37: %{name}-doxygen_hack.patch
Patch39: %{name}-popt-coreutils.patch
Patch57: %{name}-as_needed-fix.patch
Patch58: %{name}-repackage-wo-lzma.patch
Patch59: %{name}-libtool-deps.patch
+Patch61: %{name}-lzma-mem.patch
Patch62: %{name}-lzma-size_t.patch
Patch63: %{name}-tar_as_secondary_source.patch
Patch64: %{name}-man_pl.patch
Patch65: %{name}-lzma-tukaani.patch
Patch66: %{name}-v3-support.patch
+Patch67: %{name}-cleanbody.patch
Patch69: %{name}-popt-aliases.patch
-#Patch71: %{name}-rpm5-patchset-10061.patch
+# reverse arrows patch
+Patch70: %{name}-rpm5-patchset-10061.patch
+Patch71: %{name}-installbeforeerase.patch
+Patch72: %{name}-postun-nofail.patch
Patch73: %{name}-namespace-probe.patch
Patch74: %{name}-noversiondir.patch
Patch75: %{name}-rpmte-segv.patch
Patch76: %{name}-pydebuginfo.patch
Patch77: %{name}-dirdeps-macro.patch
+Patch78: %{name}-db3-configure.patch
+Patch79: %{name}-macros-cpp.patch
+Patch80: %{name}-link-selinux.patch
+Patch81: %{name}-db-configure.patch
+Patch82: %{name}-perl-makefile.patch
+Patch83: %{name}-nosmpflags.patch
+Patch84: %{name}-hirmib-ts.patch
+Patch85: %{name}-perl_req-heredocs_pod.patch
+Patch86: %{name}-rpmv3-support.patch
+Patch87: %{name}-mono.patch
+Patch88: %{name}-poptexecpath.patch
+Patch89: %{name}-lzma-compress-level.patch
+Patch90: %{name}-gstreamer.patch
+Patch91: %{name}-gendiff.patch
+Patch92: %{name}-set-failed-on-reopen.patch
+Patch93: %{name}-debugedit-workaround.patch
+Patch94: %{name}-shescape-memfault.patch
+Patch95: %{name}-gid-uucp.patch
+Patch96: %{name}-disable-hkp.patch
+Patch97: %{name}-sigpad.patch
+Patch98: %{name}-debugdir.patch
+Patch99: %{name}-pkgconfig.patch
+Patch100: %{name}-rpm5-debugedit.patch
+Patch101: %{name}-builddir-readlink.patch
+Patch102: pythondeps-speedup.patch
+Patch103: %{name}-lua-exit-chroot-correctly.patch
URL: http://rpm5.org/
BuildRequires: autoconf >= 2.57
BuildRequires: automake >= 1.4
BuildRequires: beecrypt-devel >= %{beecrypt_ver}
BuildRequires: bzip2-devel >= 1.0.2-17
-BuildRequires: db-devel >= %{reqdb_ver}
+%{!?with_internal_db:BuildRequires: db-devel >= %{reqdb_ver}}
BuildRequires: elfutils-devel >= 0.108
BuildRequires: gettext-devel >= 0.11.4-2
+BuildRequires: keyutils-devel
%{?with_system_libmagic:BuildRequires: libmagic-devel}
%{?with_selinux:BuildRequires: libselinux-devel >= 1.18}
# needed only for AM_PROG_CXX used for CXX substitution in rpm.macros
BuildRequires: libxml2-devel
BuildRequires: neon-devel >= 0.25.5
%endif
+BuildRequires: ossp-uuid-devel >= 1.6.2-6
BuildRequires: patch >= 2.2
BuildRequires: popt-devel >= %{reqpopt_ver}
%{?with_python:BuildRequires: python-devel >= 1:2.3}
BuildRequires: python-modules >= 1:2.3
BuildRequires: rpm-perlprov
%{?with_python:BuildRequires: rpm-pythonprov}
-BuildRequires: zlib-devel
+BuildRequires: rpmbuild(macros) >= 1.351
+BuildRequires: tar >= 1:1.15.1
+BuildRequires: zlib-devel >= 1.2.3.3
%if %{with apidocs}
BuildRequires: doxygen
BuildRequires: ghostscript
# Require static library only for static build
BuildRequires: beecrypt-static >= %{beecrypt_ver}
BuildRequires: bzip2-static >= 1.0.2-17
-BuildRequires: db-static >= %{reqdb_ver}
+%{!?with_internal_db:BuildRequires: db-static >= %{reqdb_ver}}
BuildRequires: elfutils-static
BuildRequires: glibc-static >= 2.2.94
%{?with_system_libmagic:BuildRequires: libmagic-static}
%{?with_selinux:BuildRequires: libselinux-static >= 1.18}
BuildRequires: popt-static >= %{reqpopt_ver}
-BuildRequires: zlib-static
+BuildRequires: zlib-static >= 1.2.3.3
%endif
Requires: %{name}-base = %{version}-%{release}
Requires: %{name}-lib = %{version}-%{release}
Requires: beecrypt >= %{beecrypt_ver}
Requires: popt >= %{reqpopt_ver}
+Provides: rpm-db-ver = %{reqdb_ver}
Obsoletes: rpm-getdeps
%{!?with_static:Obsoletes: rpm-utils-static}
+Obsoletes: tmpwatch-rpmrepackage
Conflicts: glibc < 2.2.92
Conflicts: poldek < 0.21-0.20070703.00.11
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define __newcpp %{?force_cpp}%{!?force_cpp:%{_target_cpu}-pld-linux-gcc -E}
%define _rpmlibdir /usr/lib/rpm
-%define _noautocompressdoc RPM-GPG-KEY
%define specflags -fno-strict-aliasing
Summary(pl.UTF-8): Biblioteki RPM-a
Group: Libraries
Requires: beecrypt >= %{beecrypt_ver}
-Requires: db >= %{reqdb_ver}
-Requires: zlib >= 1.2.3
-%{?with_selinux:Requires: libselinux >= 1.18}
+%{!?with_internal_db:Requires: db >= %{reqdb_ver}}
%{?with_system_libmagic:Requires: libmagic >= 1.15-2}
+%{?with_selinux:Requires: libselinux >= 1.18}
+Requires: ossp-uuid >= 1.6.2-4
Requires: popt >= %{reqpopt_ver}
-%{?with_suggest_tags:Suggests: lzma >= 1:4.42.0}
+%{?with_internal_db:%{?with_nptl:Requires: uname(release) >= 2.6.0}}
+Requires: zlib >= 1.2.3.3
+%{?with_suggest_tags:Suggests: xz}
Obsoletes: rpm-libs
# avoid installing with incompatible (non-tukaani) lzma
-Conflicts: lzma < 1:4.42.0
+# avoid incompatible (-M0 not supported) lzma
+Conflicts: lzma < 1:4.999.5-0.alpha.2
# avoid SEGV caused by mixed db versions
Conflicts: poldek < 0.18.1-16
Requires: %{name}-lib = %{version}-%{release}
Requires: beecrypt-devel >= %{beecrypt_ver}
Requires: bzip2-devel
-Requires: db-devel >= %{reqdb_ver}
+%{!?with_internal_db:Requires: db-devel >= %{reqdb_ver}}
Requires: elfutils-devel
+Requires: keyutils-devel
%{?with_system_libmagic:Requires: libmagic-devel}
%{?with_selinux:Requires: libselinux-devel}
Requires: popt-devel >= %{reqpopt_ver}
-Requires: zlib-devel
+Requires: zlib-devel >= 1.2.3.3
%description devel
The RPM packaging system includes C libraries that make it easy to
Requires: %{name}-devel = %{version}-%{release}
Requires: beecrypt-static >= %{beecrypt_ver}
Requires: bzip2-static
-Requires: db-static >= %{reqdb_ver}
+%{!?with_internal_db:Requires: db-static >= %{reqdb_ver}}
Requires: elfutils-static
+Requires: keyutils-static
%{?with_system_libmagic:Requires: libmagic-static}
Requires: popt-static >= %{reqpopt_ver}
-Requires: zlib-static
+Requires: zlib-static >= 1.2.3.3
%description static
RPM static libraries.
Group: Applications/File
Requires: %{name} = %{version}-%{release}
Requires: popt >= %{reqpopt_ver}
+%if "%{pld_release}" == "ac"
Conflicts: filesystem-debuginfo < 2.0-7
+%else
+Conflicts: filesystem-debuginfo < 3.0-16
+%endif
%description utils
Additional utilities for managing RPM packages and database.
Summary(uk.UTF-8): Скрипти та утиліти, необхідні для побудови пакетів
Group: Applications/File
Requires(pretrans): findutils
-Requires: %{name}-build-macros >= 1.433-2
+Requires: %{name}-build-macros >= 1.514
Requires: %{name}-utils = %{version}-%{release}
Requires: /bin/id
Requires: awk
Requires: file >= 4.17
Requires: fileutils
Requires: findutils
+%if "%{pld_release}" == "ac"
%ifarch athlon
Requires: gcc >= 3.0.3
%else
Requires: gcc
%endif
+%else
+# rpmrc patch adds flags specific to gcc >= 3.4
+Requires: gcc >= 5:3.4
+%endif
Requires: glibc-devel
Requires: grep
Requires: gzip
-Requires: lzma
+Requires: xz
Requires: make
Requires: patch
Requires: sed
%prep
%setup -q
+%patch1000 -p1
#%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
%patch9 -p1
%patch10 -p1
+%patch11 -p1 -R
%patch12 -p1
+%patch13 -p1
%patch14 -p1
-%patch15 -p1
+%patch16 -p1
%patch17 -p1
sed -e 's/^/@pld@/' %{SOURCE2} >>platform.in
echo '%%define __perl_provides %%{__perl} /usr/lib/rpm/perl.prov' > macros.perl
echo '%%define __php_requires /usr/lib/rpm/php.req' >> macros.php
echo '%%define __mono_provides /usr/lib/rpm/mono-find-provides' > macros.mono
echo '%%define __mono_requires /usr/lib/rpm/mono-find-requires' >> macros.mono
-install %{SOURCE9} scripts/php.prov.in
-install %{SOURCE10} scripts/php.req.in
-install %{SOURCE12} scripts/perl.prov
-%patch19 -p1
-%patch20 -p1
+install %{SOURCE10} scripts/php.prov
+install %{SOURCE11} scripts/php.req
+install %{SOURCE13} scripts/perl.prov
+%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
+%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
+%patch29 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch39 -p1
%patch42 -p1
%patch43 -p1
-## TODO %{!?with_neon:%patch44 -p1}
+%patch82 -p1
+%{!?with_neon:%patch44 -p1}
%patch45 -p1
%patch48 -p1
%patch50 -p1
+%if "%{pld_release}" == "ac"
+%patch18 -p1
+%endif
+%if "%{pld_release}" == "th"
+%patch19 -p1
+%endif
+%if "%{pld_release}" == "ti"
+%patch20 -p1
+%patch35 -p1
+%endif
%patch51 -p1
#%patch52 -p1
-%patch53 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
-%patch18 -p1
+%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
+%patch67 -p1
%patch69 -p1
-#%patch71 -p0
+%patch71 -p1
+%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p0
-%patch76 -p1
+# having .py sources in -debuginfo needs more testing
+#%patch76 -p1
%patch77 -p0
+%patch79 -p1
+%patch80 -p1
+%patch83 -p1
+%patch84 -p1
+%patch85 -p1
+%patch86 -p1
+%patch70 -p0
+%patch87 -p1
+%patch88 -p1
+%patch89 -p1
+%patch90 -p1
+%patch91 -p1
+%patch92 -p1
+%patch93 -p1
+%patch94 -p1
+%patch95 -p1
+%patch96 -p1
+%patch97 -p1
+%patch98 -p1
+%patch99 -p1
+%patch53 -p1
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
+%patch103 -p1
-#mv -f po/{no,nb}.po
mv -f po/{sr,sr@Latn}.po
-rm -rf sqlite zlib db db3 popt rpmdb/db.h
-cp %{SOURCE8} RPM-GPG-KEY
+rm -rf sqlite zlib popt
+%if %{with internal_db}
+%if %{without nptl}
+sed -i -e 's,AM_PTHREADS_SHARED("POSIX/.*,:,' db/dist/aclocal/mutex.ac
+%endif
+%patch78 -p1
+%patch81 -p1
+%else
+%patch15 -p1
+rm -rf db3 db rpmdb/db.h
+%endif
+
+%if "%{pld_release}" == "ac"
%patch1067 -p1
%patch1070 -p1
+%endif
# generate Group translations to *.po
awk -f %{SOURCE6} %{SOURCE1}
%{__autoheader}
%{__autoconf}
%{__automake}
+%if %{with internal_db}
+cd db3
+echo -e 'AC_CONFIG_AUX_DIR(.)\nAC_PROG_LIBTOOL'> configure.ac
+%{__libtoolize}
+rm -f configure.ac
+cd ../db
+cp -f /usr/share/aclocal/libtool.m4 dist/aclocal/libtool.ac
+cp -f /usr/share/automake/config.sub dist
+if [ -f /usr/share/libtool/config/ltmain.sh ]; then
+ cp -f /usr/share/libtool/config/ltmain.sh dist
+else
+ cp -f /usr/share/libtool/ltmain.sh dist
+fi
+cd ..
+%endif
-# 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 -i -e 's|@host@|%{_target_cpu}-%{_target_vendor}-linux-gnu|' -e 's|@host_cpu@|%{_target_cpu}|' macros.in
+sed -i \
+ -e 's|@host@|%{_target_cpu}-%{_target_vendor}-%{_target_os}|' \
+ -e 's|@host_cpu@|%{_target_cpu}|' \
+ -e 's|@host_os@|%{_target_os}|' \
+ macros.in
# pass CC and CXX too in case of building with some older configure macro
# disable perl-RPM2 build, we have it in separate spec
+CPPFLAGS=-I/usr/include/oosp-uuid
%configure \
CC="%{__newcc}" \
CXX="%{__newcxx}" \
%{?with_python:--with-python=%{py_ver}} \
%{!?with_python:--without-python} \
%{!?with_selinux:--without-selinux} \
+ %{?with_internal_db:--%{?with_nptl:en}%{!?with_nptl:dis}able-posixmutexes} \
--without-db
%{__make} \
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{/%{_lib},/etc/sysconfig,%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
+install -d $RPM_BUILD_ROOT{/%{_lib},/etc/{sysconfig,tmpwatch},%{_sysconfdir}/rpm,/var/lib/banner,/var/cache/hrmib}
+
+%if "%{pld_release}" != "ti"
+install -d $RPM_BUILD_ROOT/etc/pki/rpm-gpg
+install %{SOURCE8} $RPM_BUILD_ROOT/etc/pki/rpm-gpg
+install %{SOURCE9} $RPM_BUILD_ROOT/etc/pki/rpm-gpg
+%endif
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
pylibdir=%{py_libdir} \
pkgbindir="%{_bindir}"
+cat <<'EOF' > $RPM_BUILD_ROOT/etc/tmpwatch/rpm.conf
+# Cleanup 90-days old repackage files.
+/var/spool/repackage 2160
+EOF
+
cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/platform
# first platform file entry can't contain regexps
%{_target_cpu}-%{_target_vendor}-linux
%ifarch x86_64
# x86_64 things
-amd64-[^-]*-linux(-gnu)?
-x86_64-[^-]*-linux(-gnu)?
+amd64-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch amd64
-amd64-[^-]*-linux(-gnu)?
-x86_64-[^-]*-linux(-gnu)?
+amd64-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch ia32e
-ia32e-[^-]*-linux(-gnu)?
-x86_64-[^-]*-linux(-gnu)?
+ia32e-[^-]*-[Ll]inux(-gnu)?
+x86_64-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch athlon %{x8664}
# x86 things
-athlon-[^-]*-linux(-gnu)?
+athlon-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch pentium4 athlon %{x8664}
-pentium4-[^-]*-linux(-gnu)?
+pentium4-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch pentium3 pentium4 athlon %{x8664}
-pentium3-[^-]*-linux(-gnu)?
+pentium3-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch i686 pentium3 pentium4 athlon %{x8664}
-i686-[^-]*-linux(-gnu)?
+i686-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch i586 i686 pentium3 pentium4 athlon %{x8664}
-i586-[^-]*-linux(-gnu)?
+i586-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch i486 i586 i686 pentium3 pentium4 athlon %{x8664}
-i486-[^-]*-linux(-gnu)?
+i486-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch %{ix86} %{x8664}
-i386-[^-]*-linux(-gnu)?
+i386-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch alpha
-alpha-[^-]*-linux(-gnu)?
+alpha-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch ia64
-ia64-[^-]*-linux(-gnu)?
+ia64-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch ppc64
-powerpc64-[^-]*-linux(-gnu)?
-ppc64-[^-]*-linux(-gnu)?
+powerpc64-[^-]*-[Ll]inux(-gnu)?
+ppc64-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch ppc ppc64
-powerpc-[^-]*-linux(-gnu)?
-ppc-[^-]*-linux(-gnu)?
+powerpc-[^-]*-[Ll]inux(-gnu)?
+ppc-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch s390x
-s390x-[^-]*-linux(-gnu)?
+s390x-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch s390 s390x
-s390-[^-]*-linux(-gnu)?
+s390-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch sparc64
-sparc64-[^-]*-linux(-gnu)?
-sparcv8-[^-]*-linux(-gnu)?
-sparcv9-[^-]*-linux(-gnu)?
+sparc64-[^-]*-[Ll]inux(-gnu)?
%endif
-%ifarch sparcv9
-sparcv8-[^-]*-linux(-gnu)?
-sparcv9-[^-]*-linux(-gnu)?
+%ifarch sparcv9 sparc64
+sparcv9-[^-]*-[Ll]inux(-gnu)?
%endif
%ifarch sparc sparcv9 sparc64
-sparc-[^-]*-linux(-gnu)?
+sparc-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv5tel
+armv5tel-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv4t armv5tel
+armv4t-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv3t armv4t armv5tel
+armv3t-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv5teb
+armv5teb-[^-]*-[Ll]inux(-gnu)?
+%endif
+%ifarch armv4b armv5teb
+armv4b-[^-]*-[Ll]inux(-gnu)?
%endif
# noarch
rm $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh
# not installed since 4.4.8 (-tools-perl subpackage)
-install scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir}
-
-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 macros.mono $RPM_BUILD_ROOT%{_rpmlibdir}/macros.mono
-install %{SOURCE15} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.java
-
-install %{SOURCE1} doc/manual/groups
-install %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
-install %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
-install %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
-install %{SOURCE13} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
-install %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires
-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
+install -p scripts/rpmdiff scripts/rpmdiff.cgi $RPM_BUILD_ROOT%{_rpmlibdir}
+
+cp -a macros.perl $RPM_BUILD_ROOT%{_rpmlibdir}/macros.perl
+cp -a macros.python $RPM_BUILD_ROOT%{_rpmlibdir}/macros.python
+cp -a macros.php $RPM_BUILD_ROOT%{_rpmlibdir}/macros.php
+cp -a macros.mono $RPM_BUILD_ROOT%{_rpmlibdir}/macros.mono
+cp -a %{SOURCE16} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.java
+cp -a %{SOURCE19} $RPM_BUILD_ROOT%{_rpmlibdir}/macros.gstreamer
+
+install -p %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/install-build-tree
+install -p %{SOURCE4} $RPM_BUILD_ROOT%{_rpmlibdir}/find-spec-bcond
+install -p %{SOURCE7} $RPM_BUILD_ROOT%{_rpmlibdir}/compress-doc
+install -p %{SOURCE14} $RPM_BUILD_ROOT%{_rpmlibdir}/user_group.sh
+install -p %{SOURCE17} $RPM_BUILD_ROOT%{_rpmlibdir}/java-find-requires
+install -p scripts/php.{prov,req} $RPM_BUILD_ROOT%{_rpmlibdir}
+install -p %{SOURCE5} $RPM_BUILD_ROOT%{_rpmlibdir}/hrmib-cache
+install -p %{SOURCE18} $RPM_BUILD_ROOT%{_bindir}/banner.sh
+cp -a %{SOURCE15} $RPM_BUILD_ROOT/etc/sysconfig/rpm
install -d $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo
touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Conflictname
touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Dirnames
-install %{SOURCE11} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Filelinktos
+cp -a %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Filelinktos
touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Obsoletename
touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Providename
touch $RPM_BUILD_ROOT%{_sysconfdir}/rpm/sysinfo/Requirename
cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros <<EOF
# customized rpm macros - global for host
#
-#%%_install_langs pl_PL:en_US
+%if "%{pld_release}" == "ti"
+%%distribution PLD Titanium
+%else
%%distribution PLD
+%endif
#
# remove or replace with file_contexts path if you want to use custom
# SELinux file contexts policy instead of one stored in packages payload
%%_verify_file_context_path %%{nil}
# If non-zero, all erasures will be automagically repackaged.
-#%%_repackage_all_erasures 1
+#%%_repackage_all_erasures 0
+
+# If non-zero, create debuginfo packages
+#%%_enable_debug_packages 0
# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
# marked as %doc should be installed.
#%%_excludedocs 1
EOF
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.lang <<EOF
+# Customized rpm macros - global for host
+# A colon separated list of desired locales to be installed;
+# "all" means install all locale specific files.
+#
+#%%_install_langs pl_PL:en_US
+EOF
+
cat > $RPM_BUILD_ROOT%{_sysconfdir}/rpm/noautoprovfiles <<EOF
# global list of files (regexps) which don't generate Provides
EOF
rm -rf manual
cp -a doc/manual manual
+cp -a %{SOURCE1} manual/groups
rm -f manual/Makefile*
%clean
rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
fi
echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
-# TODO: poldek should abort if it can't reopen rpmdb after rpm exec:
-#Installing set #3
-#rpmdb: Program version 4.2 doesn't match environment version
-#error: db4 error(22) from dbenv->open: Invalid argument
-#error: cannot open Packages index using db3 - Invalid argument (22)
-#error: //var/lib/rpm: open rpm database failed
-#Processing dependencies...
-#There are more than one package which provide "/bin/sh":
-# if poldek is running, kill it so it will not attempt to fill whole rpmdb
-p=$(/sbin/pidof poldek)
-if [ "$p" ]; then
- echo >&2 "Killing poldek ($p), don't panic :)"
- kill $p
-fi
%triggerpostun lib -- db4.5 < %{reqdb_ver}
echo >&2 "db4.5 upgrade: Removing /var/lib/rpm/__db* from older rpmdb version"
rm -f /etc/vservers/*/apps/pkgmgmt/base/rpm/state/__*
fi
echo >&2 "You should rebuild your rpmdb: rpm --rebuilddb to avoid random rpmdb errors"
-if [ "$p" ]; then
- echo >&2 "Killing poldek ($p), don't panic :)"
- kill $p
-fi
+%if "%{pld_release}" == "th"
+echo >&2 "You probably want to remove db4.5 package now"
+%endif
%triggerpostun -- %{name} < 4.4.9-44
%{_rpmlibdir}/hrmib-cache
%files -f %{name}.lang
%defattr(644,root,root,755)
%doc CHANGES CREDITS README manual/*
-%doc RPM-GPG-KEY
+
+%if "%{pld_release}" != "ti"
+%dir /etc/pki/rpm-gpg
+/etc/pki/rpm-gpg/*.asc
+%endif
+
%attr(755,root,root) /bin/rpm
+%config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/rpm.conf
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpm/macros.lang
%dir %{_sysconfdir}/rpm/sysinfo
# these are ok to be replaced
%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/sysinfo/*
%config %verify(not md5 mtime size) %{_sysconfdir}/rpm/platform
+
%{_mandir}/man8/rpm.8*
%lang(fr) %{_mandir}/fr/man8/rpm.8*
%lang(ja) %{_mandir}/ja/man8/rpm.8*
%{_libdir}/librpmdb.la
%{_libdir}/librpmio.la
%{_includedir}/rpm
+%{_pkgconfigdir}/rpm.pc
%files static
%defattr(644,root,root,755)
%ifarch %{ppc}
%{_rpmlibdir}/ppc*
%endif
-%ifarch sparc sparc64
+%ifarch sparc sparcv9 sparc64
%{_rpmlibdir}/sparc*
%endif
%ifarch %{x8664}
%{_rpmlibdir}/ia32e*
%{_rpmlibdir}/x86_64*
%endif
+%ifarch armv5tel armv4t armv3t armv5teb armv4b
+%{_rpmlibdir}/arm*
+%endif
# must be here for "Requires: rpm-*prov" to work
+%{_rpmlibdir}/macros.gstreamer
%{_rpmlibdir}/macros.java
%{_rpmlibdir}/macros.mono
%{_rpmlibdir}/macros.perl