]> git.pld-linux.org Git - packages/poldek.git/blobdiff - poldek.spec
- (perhaps) better comment
[packages/poldek.git] / poldek.spec
index f808a631c1eefad84b71a3d3c5d257e193386f24..83c4345943eee4daf038b43a96867eb345616dd5 100644 (file)
@@ -1,41 +1,59 @@
-# conditional build
-#  --with static   -- don't use shared libraries
-#  --without imode -- don't build interactive mode
-#  --without curl  -- don't link curl
+#
+# Conditional build:
+%bcond_with    static  # don't use shared libraries
+%bcond_without imode   # don't build interactive mode
+%bcond_with    curl    # link with curl
+#
+# 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.3-0.20040107.34
 Summary:       RPM packages management helper tool
 Summary(pl):   Pomocnicze narzêdzie do zarz±dzania pakietami RPM
 Name:          poldek
-Version:       0.17.7
-Release:       2
-License:       GPL
+Version:       0.18.9
+Release:       1.1
+License:       GPL v2
 Group:         Applications/System
-Source0:       http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
+Source0:       http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.bz2
+# Source0-md5: c49eb9086a7ee77e50c527f9c95e41aa
 Source1:       %{name}.conf
-Patch0:                %{name}-typo.patch
-Patch1:                %{name}-epoch.patch
+Patch0:                %{name}-etc_dir.patch
+Patch1:                %{name}-retr_term.patch
+Patch2:                %{name}-simplestatic.patch
+Patch3:                %{name}-prereq.patch
 URL:           http://team.pld.org.pl/~mis/poldek/
-#%{!?_with_static:Requires:    trurlib >= 0.43.6}
-Requires:      rpm >= 4.0.2-62
+BuildRequires: automake
+BuildRequires: autoconf
 BuildRequires: bzip2-devel
-BuildRequires: db3-devel >= 3.1.14-2
-%{?_with_curl:BuildRequires:   curl-devel >= 7.8}
-BuildRequires: openssl-devel
+%{?with_curl:BuildRequires:    curl-devel >= 7.8}
+BuildRequires: db-devel >= %{ver_db}
+BuildRequires: gettext-autopoint
+BuildRequires: openssl-devel >= 0.9.7d
 BuildRequires: pcre-devel
+BuildRequires: perl-tools-pod
 BuildRequires: popt-devel
 BuildRequires: readline-devel
-BuildRequires: rpm-devel >= 4.0.2
-#BuildRequires:        trurlib-devel >= 0.43.6
+BuildRequires: rpm-devel >= %{ver_rpm}
 BuildRequires: zlib-devel
-BuildRequires: /usr/bin/pod2man
-%{?_with_static:BuildRequires: bzip2-static}
-%{?_with_curl:%{?_with_static:BuildRequires:   curl-static}}
-%{?_with_static:BuildRequires: openssl-static}
-%{?_with_static:BuildRequires: popt-static}
-%{?_with_static:BuildRequires: rpm-static}
-#%{?_with_static:BuildRequires:        trurlib-static}
-%{?_with_static:BuildRequires: zlib-static}
-%{?_with_static:BuildRequires: pcre-static}
-%{?_with_static:BuildRequires: db1-static}
+%if %{with static}
+BuildRequires: bzip2-static
+%{?with_curl:BuildRequires:    curl-static}
+BuildRequires: db-static >= %{ver_db}
+BuildRequires: glibc-static
+BuildRequires: libselinux-static
+BuildRequires: ncurses-static
+BuildRequires: openssl-static
+BuildRequires: pcre-static
+BuildRequires: popt-static
+BuildRequires: readline-static
+BuildRequires: rpm-static
+BuildRequires: zlib-static
+%endif
+Requires(triggerpostun):       sed >= 4.0
+Requires:      db >= %{ver_db}
+Requires:      rpm >= %{ver_rpm}
+Requires:      sed
+Requires:      openssl >= 0.9.7c
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -48,53 +66,100 @@ interactive mode. The interactive mode puts you into a readline
 interface with command line autocompletion and history, similar to the
 shell mode of Perl's CPAN.
 
-%{?_with_static:This version is statically linked}
+%{?with_static:This version is statically linked.}
 
-%{?_without_imode:This version hasn't got interactive mode.}
+%{!?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 
-usuwania pakietów.
+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 interaktywnym. Tryb interaktywny posiada interfejs readline 
-z dope³nianiem komend i histori±, podobny do trybu shell perlowego 
-modu³u CPAN. 
+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.
 
-%{?_with_static:Ta wersja jest konsolidowana statycznie.}
+%{?with_static:Ta wersja jest konsolidowana statycznie.}
 
-%{?_without_imode:Ta wersja nie posiada trybu interaktywnego.}
+%{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
 
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p0
+%patch3 -p1
 
 %build
+%{__autopoint}
+%{__aclocal} -I m4
+%{__autoconf}
+%{__autoheader}
+%{__automake}
+cp -f config.sub trurlib
 %configure \
-       %{?_with_static:--enable-static} \
-       %{?_without_imode:--disable-imode} \
-       %{?_with_curl:--with-curl}
+       %{?with_static:--enable-static} \
+       %{!?with_imode:--disable-imode} \
+       %{?with_curl:--with-curl}
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}
 
-# no strip cause program's beta stage and core may be useful
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-%{?_with_static:rm -f $RPM_BUILD_ROOT/%{_bindir}/rpmvercmp}
-sed "s/i686/%{_target_cpu}/g" < %{SOURCE1} > $RPM_BUILD_ROOT/etc/%{name}.conf
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
+
+#
+# CHANGE IT WHEN SWITCHING poldek.conf FROM AC TO TH !!!
+#
+%ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
+%define                _ftp_arch       %{_target_cpu}
+%else
+%ifarch i486
+%define                _ftp_arch       i386
+%else
+%ifarch pentium2 pentium3 pentium4
+%define                _ftp_arch       i686
+%else
+%ifarch sparcv9 sparc64
+%define                _ftp_arch       sparc
+%endif
+%endif
+%endif
+%endif
+
+sed "s|%%ARCH%%|%{_ftp_arch}|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
 
 %find_lang %{name}
 
+# no poldek-{devel,static}
+rm -rf $RPM_BUILD_ROOT%{_includedir}
+rm -rf $RPM_BUILD_ROOT%{_libdir}/lib*.a
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libtrurl.so.0.4.0
+rm -rf $RPM_BUILD_ROOT%{_libdir}/libtrurl.la
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%triggerpostun -- poldek <= 0.18.3-5
+sed -i -e '/^promoteepoch:.*yes/s/^/#/' %{_sysconfdir}/poldek.conf
+
+# otherwise don't touch
+%ifarch i386 i586 i686 ppc sparc alpha amd64 athlon
+%triggerpostun -- poldek <= 0.18.7-1
+sed -i -e 's://ftp.pld-linux.org://ftp.%{_target_cpu}.ac.pld-linux.org:g' /etc/poldek.conf
+%endif
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
-%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
+%doc README* NEWS TODO *sample* conf/poldekrc*
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
 %attr(755,root,root) %{_bindir}/*
 %{_mandir}/man1/%{name}*
-%doc README* *sample* conf/poldekrc* NEWS TODO
+%lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.199269 seconds and 4 git commands to generate.