]> git.pld-linux.org Git - packages/poldek.git/blobdiff - poldek.spec
- restore lost hold kernel and choose equivalents manually options; rel 8
[packages/poldek.git] / poldek.spec
index 9d6979356187bc27339e5655863be1b23f589b24..e793ee76b626fce67a82c0e643cbb0be339d3aa0 100644 (file)
@@ -6,28 +6,35 @@
 #
 # 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.3
-%define snap 20060821.17
+%define        ver_rpm 4.4.9-1
+#
+%define                snap    20080225.00
+%define                rel             8
 Summary:       RPM packages management helper tool
-Summary(pl):   Pomocnicze narzêdzie do zarz±dzania pakietami RPM
+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: 59459a30aebf833b65f731c6b0f76782
+# Source0-md5: 22b2cfb19cebd123e8d8148fb6ca27de
 Source1:       %{name}.conf
 Source2:       %{name}-multilib.conf
 Source3:       %{name}-aliases.conf
-# drop?
-#PatchX:       %{name}-etc_dir.patch
-# drop?
-#PatchX:       %{name}-retr_term.patch
-Patch5:                %{name}-vserver-packages.patch
-Patch6:                %{name}-config.patch
-Patch7:                %{name}-multilib.patch
-Patch8:                %{name}-build.patch
+Source4:       %{name}.desktop
+Source5:       %{name}.png
+Patch1:                %{name}-vserver-packages.patch
+Patch2:                %{name}-config.patch
+Patch3:                %{name}-nonoorder.patch
+Patch4:                %{name}-bug117hack.patch
+Patch5:                %{name}-missing-symbol.patch
+Patch6:                %{name}-abort-on-upgrade.patch
+Patch7:                %{name}-uninstall-greedy-fix.patch
+Patch8:                %{name}-pkguinf-kill-assert.patch
+Patch9:                %{name}-pkguinf-sourcerpm.patch
+Patch10:       %{name}-sigint_emit.patch
+Patch11:       %{name}-bug139.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -40,10 +47,12 @@ 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}
@@ -65,6 +74,8 @@ Requires(triggerpostun):      sed >= 4.0
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      db >= %{ver_db}
 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)
 
@@ -83,15 +94,15 @@ shell mode of Perl's CPAN.
 %{!?with_imode:This version hasn't got interactive mode.}
 #'vim
 
-%description -l pl
-poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
-instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
-usuwania pakietów.
+%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
+usuwania pakietów.
 
-Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
+Program może być używany w trybie wsadowym (jak debianowy apt-get) lub
 interaktywnym. Tryb interaktywny posiada interfejs readline z
-dope³nianiem komend i histori±, podobny do trybu shell perlowego
-modu³u CPAN.
+dopełnianiem komend i historią, podobny do trybu shell perlowego
+modułu CPAN.
 
 %{?with_static:Ta wersja jest konsolidowana statycznie.}
 
@@ -99,42 +110,42 @@ modu
 
 %package libs
 Summary:       poldek libraries
-Summary(pl):   Biblioteki poldka
+Summary(pl.UTF-8):     Biblioteki poldka
 Group:         Libraries
 
 %description libs
 poldek libraries.
 
-%description libs -l pl
+%description libs -l pl.UTF-8
 Biblioteki poldka.
 
 %package devel
 Summary:       Header files for poldek libraries
-Summary(pl):   Pliki nag³ówkowe bibliotek poldka
+Summary(pl.UTF-8):     Pliki nagłówkowe bibliotek poldka
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
 
 %description devel
 Header files for poldek libraries.
 
-%description devel -l pl
-Pliki nag³ówkowe bibliotek poldka.
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek poldka.
 
 %package static
 Summary:       poldek static libraries
-Summary(pl):   Biblioteki statyczne poldka
+Summary(pl.UTF-8):     Biblioteki statyczne poldka
 Group:         Development/Libraries
 Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 poldek static libraries.
 
-%description static -l pl
+%description static -l pl.UTF-8
 Biblioteki statyczne poldka.
 
 %package -n python-poldek
 Summary:       Python modules for poldek
-Summary(pl):   Modu³y jêzyka Python dla poldka
+Summary(pl.UTF-8):     Moduły języka Python dla poldka
 Group:         Libraries/Python
 Requires:      %{name}-libs = %{version}-%{release}
 %pyrequires_eq python-libs
@@ -142,17 +153,25 @@ Requires: %{name}-libs = %{version}-%{release}
 %description -n python-poldek
 Python modules for poldek.
 
-%description -n python-poldek -l pl
-Modu³y jêzyka Python dla poldka.
+%description -n python-poldek -l pl.UTF-8
+Moduły języka Python dla poldka.
 
 %prep
 %setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p0
 %patch5 -p1
 %patch6 -p1
-%ifarch %{x8664}
-%patch7 -p1
-%endif
+%patch7 -p0
 %patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p0
+
+# cleanup backups after patching
+find . '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
 
 %build
 %{__autopoint}
@@ -161,6 +180,7 @@ Modu
 %{__automake}
 cp -f config.sub trurlib
 
+CPPFLAGS="-std=gnu99"
 %configure \
        %{?with_static:--enable-static --disable-shared} \
        %{!?with_imode:--disable-imode} \
@@ -170,7 +190,7 @@ cp -f config.sub trurlib
 
 %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
@@ -185,41 +205,44 @@ install -d $RPM_BUILD_ROOT%{_sysconfdir}
 
 %ifarch i486 i686 ppc sparc alpha athlon
 %define                _ftp_arch       %{_target_cpu}
-%else
+%endif
 %ifarch %{x8664}
 %define                _ftp_arch       x86_64
 %define                _ftp_alt_arch   i686
-%else
+%endif
 %ifarch i586
 %define                _ftp_arch       i486
-%else
+%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
 
-# 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 %{SOURCE4} $RPM_BUILD_ROOT%{_desktopdir}/%{name}.desktop
+install %{SOURCE5} $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
@@ -235,28 +258,15 @@ rm -f $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%post  -p      /sbin/postshell
+-/usr/sbin/fix-info-dir -c %{_infodir}
 
-%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/ {
@@ -301,22 +311,61 @@ 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
+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
+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 %{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.104317 seconds and 4 git commands to generate.