]> git.pld-linux.org Git - packages/poldek.git/blobdiff - poldek.spec
This commit was manufactured by cvs2git to create tag 'auto-ac-poldek-
[packages/poldek.git] / poldek.spec
index b4817d2b54d257768fa999cf178dded95a5e2bd7..ec8d14c4293e6c18eb37860fda9d68ccdd0b8f03 100644 (file)
@@ -3,46 +3,83 @@
 %bcond_with    static  # don't use shared libraries
 %bcond_without imode   # don't build interactive mode
 %bcond_without python  # don't build python bindings
-#
+
 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
 %define        ver_db  4.3.27-1
-%define        ver_rpm 4.4.9
-%define snap 20070618.11
+%define        ver_rpm 4.4.9-1
+
+%define                snap    20080820.23
+%define                rel             41
 Summary:       RPM packages management helper tool
 Summary(pl.UTF-8):     Pomocnicze narzędzie do zarządzania pakietami RPM
 Name:          poldek
-Version:       0.20.1
-Release:       0.%{snap}.1
+Version:       0.30
+Release:       0.%{snap}.%{rel}
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://poldek.pld-linux.org/download/snapshots/%{name}-%{version}-cvs%{snap}.tar.bz2
-# Source0-md5: 3e8b10276847ef660fa5793ab67b954b
+#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}-cvs%{snap}.tar.bz2
+# Source0-md5: 2738eb3996f1cdf1e5d74b913d6e7414
 Source1:       %{name}.conf
 Source2:       %{name}-multilib.conf
-Source3:       %{name}-aliases.conf
-Patch1:                %{name}-vserver-packages.patch
-Patch2:                %{name}-config.patch
-Patch3:                %{name}-multilib.patch
-Patch4:                %{name}-desc_in_utf8.patch
-Patch5:         %{name}-fix-multilib.patch
+Source5:       %{name}-aliases.conf
+Source6:       %{name}.desktop
+Source7:       %{name}.png
+Patch100:      %{name}-dirdeps.patch
+Patch0:                %{name}-vserver-packages.patch
+Patch1:                %{name}-config.patch
+Patch2:                %{name}-abort-on-upgrade.patch
+Patch3:                %{name}-inline.patch
+Patch4:                %{name}-ls-llu.patch
+Patch5:                %{name}-op-ldalldesc.patch
+Patch6:                %{name}-nocolor-upgrade.patch
+Patch7:                %{name}-upgrade-dist.patch
+Patch8:                %{name}-keep-reinstalled-provides.patch
+Patch9:                %{name}-dont-ask-for-suggests-on-errors.patch
+Patch10:       %{name}-crash-on-invalid-locale.patch
+Patch11:       %{name}-noutf8.patch
+Patch12:       %{name}-dont-suggests-required-packages.patch
+Patch13:       %{name}-tty-for-erasures.patch
+Patch14:       %{name}-both_langs.patch
+Patch15:       %{name}-317130.patch
+Patch16:       %{name}-321546.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}
 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: sed >= 4.0
 BuildRequires: zlib-devel
 %if %{with static}
 BuildRequires: bzip2-static
@@ -62,7 +99,10 @@ Requires(triggerpostun):     awk
 Requires(triggerpostun):       sed >= 4.0
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      db >= %{ver_db}
+Requires:      openssl >= 0.9.7d
 Requires:      rpm >= %{ver_rpm}
+Requires:      rpm-lib = %(rpm -q --qf '%{V}' rpm-lib)
+# vf* scripts use sed
 Requires:      sed
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -111,6 +151,7 @@ Summary:    Header files for poldek libraries
 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.
@@ -145,13 +186,57 @@ Moduły języka Python dla poldka.
 
 %prep
 %setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
+%patch100 -p1
+%patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%ifarch %{x8664}
 %patch3 -p1
-%endif
 %patch4 -p1
-%patch5 -p0
+%patch5 -p1
+%patch6 -p0
+%patch7 -p0
+%patch8 -p0
+%patch9 -p0
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
+%patch15 -p1
+%patch16 -p1
+%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
 %{__autopoint}
@@ -160,16 +245,18 @@ Moduły języka Python dla poldka.
 %{__automake}
 cp -f config.sub trurlib
 
+CPPFLAGS="-std=gnu99"
 %configure \
        %{?with_static:--enable-static --disable-shared} \
        %{!?with_imode:--disable-imode} \
        --enable-nls \
        %{?with_python:--with-python}
 %{__make}
+#      --enable-trace
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
@@ -182,43 +269,46 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}
 
 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
 
-%ifarch i486 i686 ppc sparc alpha athlon
+%ifarch i386 i586 i686 ppc sparc alpha athlon
 %define                _ftp_arch       %{_target_cpu}
-%else
+%endif
 %ifarch %{x8664}
-%define                _ftp_arch       x86_64
+%define                _ftp_arch       amd64
 %define                _ftp_alt_arch   i686
-%else
-%ifarch i586
-%define                _ftp_arch       i486
-%else
+%endif
+%ifarch i486
+%define                _ftp_arch       i386
+%endif
 %ifarch pentium2 pentium3 pentium4
 %define                _ftp_arch       i686
-%else
+%endif
 %ifarch sparcv9 sparc64
 %define                _ftp_arch       sparc
 %endif
-%endif
-%endif
-%endif
-%endif
 
 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
 
 sed -e '
        s|%%ARCH%%|%{_ftp_arch}|g
-' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-source.conf
+' < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
 
 %ifarch %{x8664}
 sed '
        s|%%ARCH%%|%{_ftp_alt_arch}|g
-' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-multilib-source.conf
+' < %{SOURCE2} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
 %endif
 
-install %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/aliases.conf
+install %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf
 
-# get rid of non-pld sources
-rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,fedora}-source.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
+%endif
+
+# sources we don't package
+rm -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{rh,pld,fedora,centos}-source.conf
 # include them in %doc
 rm -rf configs
 cp -a conf configs
@@ -236,26 +326,29 @@ rm -rf $RPM_BUILD_ROOT
 
 %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
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%postun        -p      /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
-%triggerpostun -- poldek <= 0.18.3-5
-if [ -f /etc/poldek.conf ]; then
-       sed -i -e '/^promoteepoch:.*yes/s/^/#/' /etc/poldek.conf
-fi
-
-# otherwise don't touch
-%ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
-%triggerpostun -- poldek <= 0.18.7-1
-if [ -f /etc/poldek.conf ]; then
-       sed -i -e 's://ftp.pld-linux.org://ftp.ac.pld-linux.org:g' /etc/poldek.conf
-fi
-%endif
-
 %triggerpostun -- poldek < 0.19.0-1.20050613.22.0
 if [ -f /etc/poldek.conf.rpmsave ]; then
        awk '/^source/ {
@@ -300,22 +393,65 @@ if [ -f /etc/poldek.conf.rpmsave ]; then
        fi
 fi
 
+%triggerpostun -- poldek < 0.30-0.20080225.00.1
+if ! grep -q '^%%includedir repos.d' %{_sysconfdir}/%{name}/poldek.conf; then
+       %{__sed} -i -e '/^%%include source.conf/{
+               a
+               a# /etc/poldek/repos.d/*.conf
+               a%%includedir repos.d
+       }' %{_sysconfdir}/%{name}/poldek.conf
+fi
+
+%{__sed} -i -e '/%%include %%{_distro}-source.conf/d' %{_sysconfdir}/%{name}/poldek.conf
+%{__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}
+       mv -f %{_sysconfdir}/%{name}/pld-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld.conf
+       %{__sed} -i -e 's,_pld_arch,_arch,g;s,_ac_idxtype,_type,g;s,_pld_prefix,_prefix,g' \
+                %{_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}
+       mv -f %{_sysconfdir}/%{name}/pld-multilib-source.conf.rpmsave %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
+       %{__sed} -i -e 's,_pld_arch,_arch,g;s,_ac_idxtype,_type,g;s,_pld_prefix,_prefix,g' \
+                %{_sysconfdir}/%{name}/repos.d/pld-multilib.conf
+fi
+%endif
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%doc README* NEWS TODO configs/
+%doc README* NEWS TODO configs
 %dir %{_sysconfdir}/%{name}
+%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}*
 %lang(pl) %{_mandir}/pl/man1/%{name}*
 %{_infodir}/poldek.info*
+%if %{with imode}
+%{_desktopdir}/%{name}.desktop
+%{_pixmapsdir}/%{name}.png
+%endif
 
-%if !%{with static}
+%if %{without static}
 %files libs
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/lib*.so.*.*.*
+%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.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpoclidek.so.0
+%attr(755,root,root) %ghost %{_libdir}/libpoldek.so.2
+%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
 %endif
 
 %files devel
This page took 0.118016 seconds and 4 git commands to generate.