X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=poldek.spec;h=3a4ba0e5648a874935431d06f119770356934deb;hb=8cb891e86ee5f256d0e3403966090eefe02b9e27;hp=3db957716b5b4874b1569f2e38ac2054e6cd9ca8;hpb=a9c9446a5818567477b30ac9b1a94266b8763e2b;p=packages%2Fpoldek.git diff --git a/poldek.spec b/poldek.spec index 3db9577..ef86d5a 100644 --- a/poldek.spec +++ b/poldek.spec @@ -1,69 +1,97 @@ -# TODO: -# - fails to build without poldek-devel - fix it ! -# +# TODO +# - fix config having escaped html entities: +# # package A requires capability foo >= 1.0 while package B provides "foo" + # Conditional build: %bcond_with static # don't use shared libraries %bcond_without imode # don't build interactive mode %bcond_without python # don't build python bindings -# +%bcond_with snap # install configs for official Th snapshot +%bcond_with rpm4 # use rpm4 instead of rpm5 +%bcond_with tests # tests + +# current snapshot name +%define SNAP 2019 + # required versions (forced to avoid SEGV with mixed db used by rpm and poldek) -%if "%{pld_release}" == "ti" -%define ver_db 4.5.20 -%define ver_db_rel 8 +%if %{with rpm4} +%define db_pkg db +%define ver_db 5.3 +%define ver_rpm 1:4.14 +%define ver_db_devel %(rpm -q --qf '%|E?{%{E}:}|%{V}-%{R}' --what-provides db-devel) %else -%define ver_db 4.7.25 -%define ver_db_rel 1 +%define ver_db %(rpm -q --provides rpm-lib | awk 'BEGIN { v="RPM_TOO_OLD" } /^rpm-db-ver = [.0-9]+$/ { v=$3 } END { print v }') +%define db_pkg db%{ver_db} +%define ver_rpm 5.4.10 %endif -%define ver_rpm 4.5-5 -# -%define snap rc1 -%define rel 1 + +%define rel 3 Summary: RPM packages management helper tool +Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM Name: poldek -Version: 0.30 -Release: 0.%{snap}.%{rel} +Version: 0.42.2 +Release: %{rel}%{?with_snap:.%{SNAP}} License: GPL v2 Group: Applications/System #Source0: http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2 -Source0: http://carme.pld-linux.org/~megabajt/snaps/poldek/%{name}-%{version}%{snap}.tar.bz2 -# Source0-md5: ff3bde5f9451d2691d67112182b7a2df +Source0: https://github.com/poldek-pm/poldek/releases/download/v%{version}/%{name}-%{version}.tar.xz +# Source0-md5: 2759fe45bc50efb6084d5338d725411a Source1: %{name}.conf Source2: %{name}-multilib.conf -Source3: %{name}-ti.conf -Source4: %{name}-multilib-ti.conf +Source3: %{name}-config.sh Source5: %{name}-aliases.conf Source6: %{name}.desktop Source7: %{name}.png +# Source7-md5: ee487abede50874e9eceb6495d5ee150 Source8: %{name}-debuginfo.conf Source9: %{name}-aidath.conf Source10: %{name}-multilib-aidath.conf -Patch0: %{name}-vserver-packages.patch -Patch1: %{name}-config.patch -Patch2: %{name}-size-type.patch +Source11: %{name}-archive.conf +Source100: %{name}-snap.conf +Source101: %{name}-multilib-snap.conf +Source102: %{name}-debuginfo-snap.conf +Patch0: %{name}-config.patch +Patch1: pm-hooks.patch +Patch2: %{name}-ext-down-enable.patch +Patch3: %{name}-pc.patch +Patch4: %{name}-info.patch +Patch5: %{name}-multiarch-x32.patch +Patch6: rpm-4.15.patch URL: http://poldek.pld-linux.org/ -BuildRequires: autoconf -BuildRequires: automake +BuildRequires: %{db_pkg}-devel >= %{ver_db} +BuildRequires: autoconf >= 2.63 +BuildRequires: automake >= 1:1.11 BuildRequires: bzip2-devel BuildRequires: check-devel -BuildRequires: db-devel >= %{ver_db}-%{ver_db_rel} -BuildRequires: gettext-devel +BuildRequires: docbook-dtd412-xml +BuildRequires: docbook2X +BuildRequires: gettext-tools >= 0.11.5 +BuildRequires: libgomp-devel BuildRequires: libtool -BuildRequires: libxml2-devel +BuildRequires: libxml2-devel >= 2 +BuildRequires: ncurses-devel BuildRequires: openssl-devel >= 0.9.7d BuildRequires: pcre-devel +BuildRequires: perl-XML-Simple +BuildRequires: perl-base +BuildRequires: perl-modules 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: tar >= 1:1.22 +BuildRequires: texinfo +BuildRequires: xmlto +BuildRequires: xz BuildRequires: zlib-devel +BuildRequires: zstd-devel %if %{with static} +BuildRequires: %{db_pkg}-static >= %{ver_db} BuildRequires: bzip2-static -BuildRequires: db-static >= %{ver_db}-%{ver_db_rel} BuildRequires: glibc-static -BuildRequires: libselinux-static BuildRequires: libxml2-static BuildRequires: ncurses-static BuildRequires: openssl-static @@ -72,18 +100,27 @@ BuildRequires: popt-static BuildRequires: readline-static BuildRequires: rpm-static BuildRequires: zlib-static +BuildRequires: zstd-static +%endif +Requires(postun): awk +Requires(postun): sed >= 4.0 +%if %{with rpm4} +Requires: %{db_pkg} >= %{ver_db_devel} +%else +Requires: %{db_pkg} >= %{ver_db} +Requires: rpm-db-ver = %{ver_db} %endif -Requires(triggerpostun): awk -Requires(triggerpostun): sed >= 4.0 Requires: %{name}-libs = %{version}-%{release} -Requires: db >= %{ver_db}-%{ver_db_rel} +Requires: /bin/run-parts Requires: rpm >= %{ver_rpm} -Requires: rpm-db-ver = %{ver_db} -Requires: rpm-lib = %(rpm -q --qf '%{V}' rpm-lib) -# vf* scripts use sed +Requires: rpm-lib >= %{ver_rpm} Requires: sed +Conflicts: etckeeper < 1.18-2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) +# it could be %{_libexecdir}/%{name}, but beware of compatibility (path hardcoded in configurations) +%define pkglibexecdir %{_prefix}/lib/%{name} + %description poldek is an RPM package management tool which allows you to easily perform package verification, installation (including system @@ -99,6 +136,20 @@ shell mode of Perl's CPAN. %{!?with_imode:This version hasn't got interactive mode.} #'vim +%description -l hu.UTF-8 +poldek egy RPM csomagkezelő eszköz, amely megkönnyíti a +csomagellenőrzést, telepítést (beleértve a rendszertelepítést a +nulláról), frissítést és eltávolítást. + +A program használható parancssorból (mint a Debian apt-get programja) +vagy interaktív módban. Az interaktív mód egy readline környezetet +jelent, parancskiegészítéssel és előzményekkel, hasonlóan a Perl CPAN +shell módjához. + +%{?with_static:Ez a verzió statikusan linkelt.} + +%{!?with_imode:Ennek a verziónak nincs interaktív módja.} + %description -l pl.UTF-8 poldek jest narzędziem linii poleceń służącym do weryfikacji, instalacji (włączając instalację systemu od zera), aktualizacji i @@ -115,17 +166,22 @@ modułu CPAN. %package libs Summary: poldek libraries +Summary(hu.UTF-8): A poldek könyvtárai Summary(pl.UTF-8): Biblioteki poldka Group: Libraries %description libs poldek libraries. +%description libs -l hu.UTF-8 +A poldek könyvtárai. + %description libs -l pl.UTF-8 Biblioteki poldka. %package devel Summary: Header files for poldek libraries +Summary(hu.UTF-8): A poldek könyvtár fejlesztői fájljai Summary(pl.UTF-8): Pliki nagłówkowe bibliotek poldka Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} @@ -134,11 +190,15 @@ Requires: rpm-devel >= %{ver_rpm} %description devel Header files for poldek libraries. +%description devel -l hu.UTF-8 +A poldek könyvtár fejlesztői fájljai. + %description devel -l pl.UTF-8 Pliki nagłówkowe bibliotek poldka. %package static Summary: poldek static libraries +Summary(hu.UTF-8): poldek statikus könyvtárak Summary(pl.UTF-8): Biblioteki statyczne poldka Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} @@ -146,19 +206,26 @@ Requires: %{name}-devel = %{version}-%{release} %description static poldek static libraries. +%description static -l hu.UTF-8 +poldek statikus könyvtárak. + %description static -l pl.UTF-8 Biblioteki statyczne poldka. %package -n python-poldek Summary: Python modules for poldek +Summary(hu.UTF-8): Python modulok poldek-hez Summary(pl.UTF-8): Moduły języka Python dla poldka Group: Libraries/Python Requires: %{name}-libs = %{version}-%{release} -%pyrequires_eq python-libs +Requires: python-libs %description -n python-poldek Python modules for poldek. +%description -n python-poldek -l hu.UTF-8 +Python modulok poldek-hez. + %description -n python-poldek -l pl.UTF-8 Moduły języka Python dla poldka. @@ -167,129 +234,195 @@ Moduły języka Python dla poldka. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 + +%{__rm} doc/poldek.info +%{__rm} m4/libtool.m4 m4/lt*.m4 # cleanup backups after patching find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f +chmod u+x ./configure ./doc/conf-xml2.sh %build +%{__gettextize} %{__libtoolize} -%{__autoheader} %{__aclocal} -I m4 +%{__autoheader} %{__autoconf} %{__automake} -cp -f config.sub trurlib +cd tndb +%{__libtoolize} +%{__aclocal} +%{__autoheader} +%{__autoconf} +%{__automake} +cd ../trurlib +%{__libtoolize} +%{__aclocal} +%{__autoheader} +%{__autoconf} +%{__automake} +cd .. -CPPFLAGS="-std=gnu99" %configure \ %{?with_static:--enable-static --disable-shared} \ %{!?with_imode:--disable-imode} \ + --with-pkglibdir=%{pkglibexecdir} \ --enable-nls \ %{?with_python:--with-python} %{__make} -# --enable-trace + +%{__make} -C doc poldek.info + +%if %{with python} +%{__make} -C python +%endif + +%if %{with tests} +%{__make} check +%endif %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d +install -d $RPM_BUILD_ROOT/var/cache/%{name} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT +install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poldek-config + %if %{with python} %{__make} -C python install \ DESTDIR=$RPM_BUILD_ROOT \ - libdir=%{py_sitedir} + py_sitedir=%{py_sitedir} %endif -%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp} +%{?with_static:%{__rm} $RPM_BUILD_ROOT%{_bindir}/rpmvercmp} -%ifarch i486 i686 ppc sparc alpha athlon -%define _ftp_arch %{_target_cpu} +%ifarch i486 i686 ppc sparc alpha athlon aarch64 + %define ftp_arch %{_target_cpu} %endif %ifarch %{x8664} -%define _ftp_arch x86_64 -%define _ftp_alt_arch i686 + %define ftp_arch x86_64 + %define ftp_alt_arch i686 + %define ftp_alt2_arch x32 %endif -%ifarch i586 -%if "%{pld_release}" == "ti" -%define _ftp_arch i586 -%else -%define _ftp_arch i486 +%ifarch x32 + %define ftp_arch x32 + %define ftp_alt_arch x86_64 + %define ftp_alt2_arch i686 %endif +%ifarch i586 + %define ftp_arch i486 %endif %ifarch pentium2 pentium3 pentium4 -%define _ftp_arch i686 + %define ftp_arch i686 %endif %ifarch sparcv9 sparc64 -%define _ftp_arch sparc -%if "%{pld_release}" == "th" -%define _ftp_arch %{_target_cpu} -%ifarch sparc64 -%define _ftp_alt_arch sparcv9 + %define ftp_arch sparc + %define ftp_arch %{_target_cpu} + %ifarch sparc64 + %define ftp_alt_arch sparcv9 + %endif %endif + +%define pld_conf %{SOURCE1} +%define pld_debuginfo_conf %{SOURCE8} +%define pld_archive_conf %{SOURCE11} + +%ifarch %{x8664} x32 + %define pld_multilib_conf %{SOURCE2} + %define pld_multilib2_conf %{SOURCE2} %endif + +# aidath +%ifarch sparcv9 sparc64 + %define pld_conf %{SOURCE9} + %undefine pld_archive_conf +%endif +%ifarch sparc64 + %define pld_multilib_conf %{SOURCE10} %endif -%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp} +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf -%if "%{pld_release}" == "ti" -sed -e ' - s|%%ARCH%%|%{_ftp_arch}|g -' < %{SOURCE3} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf +%if 0%{?pld_multilib_conf:1} + %{__sed} 's|%%ARCH%%|%{ftp_alt_arch}|g' < %{pld_multilib_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf +%endif -%ifarch %{x8664} -sed ' - s|%%ARCH%%|%{_ftp_alt_arch}|g -' < %{SOURCE4} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf +%if 0%{?pld_multilib2_conf:1} + %{__sed} 's|%%ARCH%%|%{ftp_alt2_arch}|g' < %{pld_multilib_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt2_arch}.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 +%if 0%{?pld_debuginfo_conf:1} +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_debuginfo_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-debuginfo.conf %endif +%if 0%{?pld_archive_conf:1} +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' < %{pld_archive_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.conf +%endif + +# Always install snapshot configs +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' \ + -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE100} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf +%{__sed} -e 's|%%ARCH%%|%{ftp_arch}|g' \ + -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE102} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-debuginfo.conf +%ifarch %{x8664} x32 + %{__sed} -e 's|%%ARCH%%|%{ftp_alt_arch}|g' \ + -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE101} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf + %{__sed} -e 's|%%ARCH%%|%{ftp_alt2_arch}|g' \ + -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE101} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt2_arch}.conf +%endif + +%if %{with snap} +%{__sed} -i -e 's|@@SNAP@@||g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf +%{__sed} -i '/@@SNAP@@.*/d' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf %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 +%{__sed} -i -e 's|@@SNAP@@||g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf +%{__sed} -i '/@@SNAP@@.*/d' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf +%endif -%ifarch %{x8664} -sed ' - s|%%ARCH%%|%{_ftp_alt_arch}|g -' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf +# create "all" meta repo +%if 0%{?ftp_alt_arch:1}%{?ftp_alt2_arch:1} +cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-all.conf +# group source for referring th+th-multiarch sources together, i.e poldek -n th-all +[source] +type = group +name = th-all +sources = th %{?ftp_alt_arch:th-%{ftp_alt_arch}} %{?ftp_alt2_arch:th-%{ftp_alt2_arch}} +EOF %endif + +# th-2014 snap does not exist for x32 yet +%if "%{ftp_arch}" == "x32" +rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf %endif +%if "%{ftp_alt2_arch}" == "x32" +rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-x32.conf %endif -install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf +cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf %if %{with imode} # add desktop file and icon install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} -install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop -install %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png +cp -p %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop +cp -p %{SOURCE7} $RPM_BUILD_ROOT%{_pixmapsdir}/%{name}.png %endif # sources we don't package -rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,pld,fedora,centos}-source.conf +%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora,centos}-source.conf # include them in %doc -rm -rf configs +%{__rm} -rf configs cp -a conf configs -rm -f configs/Makefile* +%{__rm} -f configs/Makefile* %if %{with python} %py_postclean -rm -f $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la +%{__rm} $RPM_BUILD_ROOT%{_libdir}/_poldekmod.{la,so} %endif %find_lang %{name} @@ -322,51 +455,7 @@ fi %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig -%triggerpostun -- poldek < 0.19.0-1.20050613.22.0 -if [ -f /etc/poldek.conf.rpmsave ]; then - awk '/^source/ { - name = $3; - path = $4; - auto = "yes"; - autoup = "yes"; - type = "pdir"; - pri = ""; - - if (sub(",noauto", "", name)) { - auto = "no"; - } - - # process pri=\d+ - if (match(name, /,pri=[0-9]+/)) { - pri = substr(name, RSTART + 5, RLENGTH - 5); - name = substr(name, 1, RSTART - 1) substr(name, RSTART + RLENGTH); - } - - # skip ac sources. already in new config. - if (name !~ /^ac(-(ready|test|supported|updates-(general|security)))?$/) { - print ""; - print "[source]"; - print "name = " name; - print "type = " type; - print "path = " path; - print "auto = " auto; - print "autoup = " autoup; - if (pri) { - print "pri = " pri; - } - } - - }' < /etc/poldek.conf.rpmsave >> /etc/poldek/source.conf - echo "Converted old custom sources from /etc/poldek.conf.rpmsave to new poldek format in /etc/poldek/source.conf" - - # copy hold= - hold=$(grep ^hold /etc/poldek.conf.rpmsave) - if [ "$hold" ]; then - sed -i -e "/^#hold =/s/^.*/$hold/" /etc/poldek/poldek.conf - fi -fi - -%triggerpostun -- poldek < 0.30-0.20080225.00.1 +%triggerpostun -- poldek < 0.30.1-8 if ! grep -q '^%%includedir repos.d' %{_sysconfdir}/%{name}/poldek.conf; then %{__sed} -i -e '/^%%include source.conf/{ a @@ -379,34 +468,64 @@ fi %{__sed} -i -e '/%%include %%{_distro}-multilib-source.conf/d' %{_sysconfdir}/%{name}/poldek.conf if [ -f %{_sysconfdir}/%{name}/pld-source.conf.rpmsave ]; then - cp -f %{_sysconfdir}/%{name}/repos.d/pld.conf{,.rpmnew} - cp -f %{_sysconfdir}/%{name}/pld-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld.conf + %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld.conf{,.rpmnew} + %{__mv} -v %{_sysconfdir}/%{name}/pld-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld.conf fi %ifarch %{x8664} if [ -f %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave ]; then - cp -f %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf{,.rpmnew} - cp -f %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf + %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf{,.rpmnew} + %{__mv} -v %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf fi %endif +if [ -f %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf.rpmsave ]; then + %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf{,.rpmnew} + %{__mv} -v %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-%{ftp_alt_arch}.conf +fi +if [ -f %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-multilib.conf.rpmsave ]; then + %{__mv} -f %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf{,.rpmnew} + %{__mv} -v %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-multilib.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-%{ftp_alt_arch}.conf +fi + +if [ $1 -le 1 ]; then + # revert change on --downgrade + %{__sed} -i -re 's,^pm command = %{pkglibexecdir}/pm-command.sh,#&,' %{_sysconfdir}/%{name}/%{name}.conf +else + # setup pm command + %{__sed} -i -re 's,#?(pm command =).*,\1 %{pkglibexecdir}/pm-command.sh,' %{_sysconfdir}/%{name}/%{name}.conf +fi + %files -f %{name}.lang %defattr(644,root,root,755) -%doc ChangeLog README* NEWS TODO configs +%doc ChangeLog README* NEWS configs %dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/pre-install.d +%{_sysconfdir}/%{name}/pre-install.d/README +%dir %{_sysconfdir}/%{name}/post-install.d +%{_sysconfdir}/%{name}/post-install.d/README %dir %{_sysconfdir}/%{name}/repos.d %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/*.conf %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/repos.d/*.conf -%attr(755,root,root) %{_bindir}/* -%dir %{_libdir}/%{name} -%attr(755,root,root) %{_libdir}/%{name}/* -%{_mandir}/man1/%{name}* +%attr(755,root,root) %{_bindir}/ipoldek +%attr(755,root,root) %{_bindir}/poldek +%attr(755,root,root) %{_bindir}/poldek-config +%attr(755,root,root) %{_bindir}/rpmvercmp +%dir %{pkglibexecdir} +%attr(755,root,root) %{pkglibexecdir}/pm-command.sh +%attr(755,root,root) %{pkglibexecdir}/poldekuser-setup.sh +%attr(755,root,root) %{pkglibexecdir}/vfcompr +%attr(755,root,root) %{pkglibexecdir}/vfjuggle +%attr(755,root,root) %{pkglibexecdir}/vfsmb +%attr(755,root,root) %{pkglibexecdir}/zlib-in-rpm.sh +%{_mandir}/man1/%{name}*.1* %lang(pl) %{_mandir}/pl/man1/%{name}* %{_infodir}/poldek.info* %if %{with imode} %{_desktopdir}/%{name}.desktop %{_pixmapsdir}/%{name}.png %endif +%dir /var/cache/%{name} %if %{without static} %files libs @@ -416,8 +535,8 @@ fi %attr(755,root,root) %{_libdir}/libtndb.so.*.*.* %attr(755,root,root) %{_libdir}/libtrurl.so.*.*.* %attr(755,root,root) %{_libdir}/libvfile.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.0 -%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.2 +%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.1 +%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.3 %attr(755,root,root) %ghost %{_libdir}/libtndb.so.0 %attr(755,root,root) %ghost %{_libdir}/libtrurl.so.0 %attr(755,root,root) %ghost %{_libdir}/libvfile.so.0 @@ -425,13 +544,29 @@ fi %files devel %defattr(644,root,root,755) -%{!?with_static:%attr(755,root,root) %{_libdir}/lib*.so} -%{_libdir}/lib*.la -%{_includedir}/* +%if %{without static} +%attr(755,root,root) %{_libdir}/libpoclidek.so +%attr(755,root,root) %{_libdir}/libpoldek.so +%attr(755,root,root) %{_libdir}/libtndb.so +%attr(755,root,root) %{_libdir}/libtrurl.so +%attr(755,root,root) %{_libdir}/libvfile.so +%endif +%{_libdir}/libpoclidek.la +%{_libdir}/libpoldek.la +%{_libdir}/libtndb.la +%{_libdir}/libtrurl.la +%{_libdir}/libvfile.la +%{_includedir}/poldek +%{_includedir}/tndb +%{_includedir}/trurl +%{_includedir}/vfile +%{_pkgconfigdir}/tndb.pc +%{_pkgconfigdir}/trurlib.pc %files static %defattr(644,root,root,755) -%{_libdir}/lib*.a +%{_libdir}/libtndb.a +%{_libdir}/libtrurl.a %if %{with python} %files -n python-poldek