%define ver_rpm 4.5-5
#
%define snap 20080820.23
-%define rel 19
+%define rel 38
Summary: RPM packages management helper tool
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
Name: poldek
Source5: %{name}-aliases.conf
Source6: %{name}.desktop
Source7: %{name}.png
+Source8: %{name}-debuginfo.conf
+Source9: %{name}-aidath.conf
+Source10: %{name}-multilib-aidath.conf
Patch0: %{name}-vserver-packages.patch
Patch1: %{name}-config.patch
Patch2: %{name}-abort-on-upgrade.patch
Patch17: %{name}-size-type.patch
Patch18: %{name}-no-inlines.patch
Patch19: %{name}-export-missing-symbol.patch
+Patch20: %{name}-skip-suggests-on-upgrade.patch
+Patch21: %{name}-po.patch
+Patch22: %{name}-refcnt.patch
+Patch23: %{name}-assertion-failed.patch
+Patch24: %{name}-unescape-urlencoded-strings.patch
+Patch25: %{name}-ls-source-rpm.patch
+Patch26: %{name}-add-arch-match.patch
+Patch27: %{name}-multilib-upgrade.patch
+Patch28: %{name}-score-reqs-marked-to-install.patch
+Patch29: %{name}-dont-be-greedy.patch
+Patch30: %{name}-dont-lose-deps.patch
+Patch31: %{name}-ls-queryfmt.patch
+Patch32: %{name}-prepare_url_fix.patch
+Patch33: %{name}-noloop_on_terminal_loos.patch
+Patch34: %{name}-show_only_relative_used_space.patch
+Patch35: %{name}-zlib.patch
URL: http://poldek.pld-linux.org/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: bzip2-devel
-BuildRequires: check
BuildRequires: db-devel >= %{ver_db}-%{ver_db_rel}
-BuildRequires: gettext-autopoint
+BuildRequires: gettext-devel
BuildRequires: libtool
BuildRequires: libxml2-devel
BuildRequires: openssl-devel >= 0.9.7d
BuildRequires: pcre-devel
-BuildRequires: perl-tools-pod
BuildRequires: pkgconfig
BuildRequires: popt-devel
%{?with_python:BuildRequires: python-devel}
BuildRequires: readline-devel >= 5.0
BuildRequires: rpm-devel >= %{ver_rpm}
%{?with_python:BuildRequires: rpm-pythonprov}
-BuildRequires: xmlto
BuildRequires: zlib-devel
%if %{with static}
BuildRequires: bzip2-static
Summary(pl.UTF-8): Pliki nagłówkowe bibliotek poldka
Group: Development/Libraries
Requires: %{name}-libs = %{version}-%{release}
+Requires: rpm-devel >= %{ver_rpm}
%description devel
Header files for poldek libraries.
%patch17 -p1
%patch18 -p1
%patch19 -p0
+%patch20 -p1
+%patch21 -p1
+%patch22 -p0
+%patch23 -p1
+%patch24 -p1
+# LP#392984: add source rpm to ls
+%patch25 -p1
+# LP#408036
+%patch26 -p1
+# LP#408034
+%patch27 -p1
+# score reqs already marked to install
+%patch28 -p1
+# dont be greedy if upgraded pkg has needed capabilities
+%patch29 -p1
+# http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2009-November/150519.html
+%patch30 -p1
+# LP#392984: add query format to ls
+%patch31 -p1
+# LP#506568
+%patch32 -p0
+# LP#499504
+%patch33 -p1
+# do not info. about amount of transaction space req. but relative to already installed
+%patch34 -p1
+# fixes failures with zlib >= 1.2.3.7
+%patch35 -p0
# cleanup backups after patching
find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
%build
%{__libtoolize}
+%{__autoheader}
%{__aclocal} -I m4
%{__autoconf}
%{__automake}
--enable-nls \
%{?with_python:--with-python}
%{__make}
+# --enable-trace
%install
rm -rf $RPM_BUILD_ROOT
%endif
%ifarch sparcv9 sparc64
%define _ftp_arch sparc
+%if "%{pld_release}" == "th"
+%define _ftp_arch %{_target_cpu}
+%ifarch sparc64
+%define _ftp_alt_arch sparcv9
+%endif
+%endif
%endif
%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
s|%%ARCH%%|%{_ftp_alt_arch}|g
' < %{SOURCE4} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
%endif
+%else
+# pld_release = th
+%ifarch sparcv9 sparc64
+sed -e '
+ s|%%ARCH%%|%{_ftp_arch}|g
+' < %{SOURCE9} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
+
+%ifarch sparc64
+sed '
+ s|%%ARCH%%|%{_ftp_alt_arch}|g
+' < %{SOURCE10} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
+%endif
+
%else
sed -e '
s|%%ARCH%%|%{_ftp_arch}|g
' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
+sed -e '
+ s|%%ARCH%%|%{_ftp_arch}|g
+' < %{SOURCE8} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.conf
%ifarch %{x8664}
sed '
' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
%endif
%endif
+%endif
install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf
%clean
rm -rf $RPM_BUILD_ROOT
-%post -p /sbin/postshell
--/usr/sbin/fix-info-dir -c %{_infodir}
+%post
+[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+if [ "$1" = "1" ]; then
+ # remove ignore = vserver-packages inside vserver on first install
+ {
+ while read f ctx; do
+ [ "$f" = "VxID:" -o "$f" = "s_context:" ] && break
+ done </proc/self/status
+ } 2>/dev/null
+ if [ -z "$ctx" -o "$ctx" = "0" ]; then
+ VSERVER=no
+ else
+ VSERVER=yes
+ fi
+ if [ "$VSERVER" = "yes" ]; then
+ %{__sed} -i -e '/^ignore/s/vserver-packages//' %{_sysconfdir}/%{name}/poldek.conf
+ fi
+fi
%postun -p /sbin/postshell
-/usr/sbin/fix-info-dir -c %{_infodir}