]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- add as bcond_with ignarch (add ignorearch option - patch3)
[packages/poldek.git] / poldek.spec
1 #
2 # Conditional build:
3 %bcond_with     static  # don't use shared libraries
4 %bcond_without  imode   # don't build interactive mode
5 %bcond_with     curl    # link with curl
6 %bcond_with     ignarch # add option ignorearch
7 #
8 # required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
9 %define ver_db  4.2.50-1
10 %define ver_rpm 4.3-0.20030610.29
11 Summary:        RPM packages management helper tool
12 Summary(pl):    Pomocnicze narzêdzie do zarz±dzania pakietami RPM
13 Name:           poldek
14 Version:        0.18.3
15 Release:        7
16 License:        GPL v2
17 Group:          Applications/System
18 Source0:        http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}.tar.gz
19 # Source0-md5:  339c54b86bfd733851c0f7125057f446
20 Source1:        %{name}.conf
21 Patch0:         %{name}-etc_dir.patch
22 Patch1:         %{name}-retr_term.patch
23 Patch2:         %{name}-cap_match_req-fix.patch
24 %{?with_ignarch:Patch3: %{name}-ignorearch.patch}
25 URL:            http://team.pld.org.pl/~mis/poldek/
26 BuildRequires:  automake
27 BuildRequires:  autoconf
28 BuildRequires:  bzip2-devel
29 %{?with_curl:BuildRequires:     curl-devel >= 7.8}
30 BuildRequires:  db-devel >= %{ver_db}
31 BuildRequires:  gettext-autopoint
32 BuildRequires:  openssl-devel >= 0.9.7c
33 BuildRequires:  pcre-devel
34 BuildRequires:  popt-devel
35 BuildRequires:  readline-devel
36 BuildRequires:  rpm-devel >= %{ver_rpm}
37 BuildRequires:  zlib-devel
38 BuildRequires:  perl-tools-pod
39 %if %{with static}
40 BuildRequires:  bzip2-static
41 %{?with_curl:BuildRequires:     curl-static}
42 BuildRequires:  db-static >= %{ver_db}
43 BuildRequires:  ncurses-static
44 BuildRequires:  openssl-static
45 BuildRequires:  pcre-static
46 BuildRequires:  popt-static
47 BuildRequires:  readline-static
48 BuildRequires:  rpm-static
49 BuildRequires:  zlib-static
50 BuildRequires:  glibc-static
51 %endif
52 Requires:       db >= %{ver_db}
53 Requires:       ed
54 Requires:       rpm >= %{ver_rpm}
55 Requires:       sed
56 Requires:       openssl >= 0.9.7c
57 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
58
59 %description
60 poldek is an RPM package management tool which allows you to easily
61 perform package verification, installation (including system
62 installation from scratch), upgrading, and removal.
63
64 Program can be used in batch (like apt-get from Debian's APT) or
65 interactive mode. The interactive mode puts you into a readline
66 interface with command line autocompletion and history, similar to the
67 shell mode of Perl's CPAN.
68
69 %{?with_static:This version is statically linked.}
70
71 %{!?with_imode:This version hasn't got interactive mode.}
72
73 %description -l pl
74 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
75 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
76 usuwania pakietów.
77
78 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
79 interaktywnym. Tryb interaktywny posiada interfejs readline z
80 dope³nianiem komend i histori±, podobny do trybu shell perlowego
81 modu³u CPAN.
82
83 %{?with_static:Ta wersja jest konsolidowana statycznie.}
84
85 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
86
87 %prep
88 %setup -q
89 %patch0 -p1
90 %patch1 -p1
91 %patch2 -p0
92 %{?with_ignarch:%patch3 -p1}
93
94 %build
95 %{?with_ignarch:rm -f po/pl.gmo}
96 %{__autopoint}
97 %{__aclocal} -I m4
98 %{__autoconf}
99 %{__automake}
100 cp -f config.sub trurlib
101 %configure \
102         %{?with_static:--enable-static} \
103         %{!?with_imode:--disable-imode} \
104         %{?with_curl:--with-curl}
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_sysconfdir}
110
111 %{__make} install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
115 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
116
117 %find_lang %{name}
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %triggerpostun -- poldek <= 0.18.3-5
123 if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
124         echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
125 fi
126
127 %files -f %{name}.lang
128 %defattr(644,root,root,755)
129 %doc README* NEWS TODO *sample* conf/poldekrc*
130 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
131 %attr(755,root,root) %{_bindir}/*
132 %{_mandir}/man1/%{name}*
133 %lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.031469 seconds and 3 git commands to generate.