]> git.pld-linux.org Git - packages/poldek.git/blob - poldek.spec
- Patches should always be included in SRPM
[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:        9
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 Patch3:         %{name}-ignorearch.patch
25 Patch4:         %{name}-progress.patch
26 Patch5:         %{name}-simplestatic.patch
27 Patch6:         %{name}-progress2.patch
28 URL:            http://team.pld.org.pl/~mis/poldek/
29 BuildRequires:  automake
30 BuildRequires:  autoconf
31 BuildRequires:  bzip2-devel
32 %{?with_curl:BuildRequires:     curl-devel >= 7.8}
33 BuildRequires:  db-devel >= %{ver_db}
34 BuildRequires:  gettext-autopoint
35 BuildRequires:  openssl-devel >= 0.9.7d
36 BuildRequires:  pcre-devel
37 BuildRequires:  popt-devel
38 BuildRequires:  readline-devel
39 BuildRequires:  rpm-devel >= %{ver_rpm}
40 BuildRequires:  zlib-devel
41 BuildRequires:  perl-tools-pod
42 %if %{with static}
43 BuildRequires:  bzip2-static
44 %{?with_curl:BuildRequires:     curl-static}
45 BuildRequires:  db-static >= %{ver_db}
46 BuildRequires:  glibc-static
47 buildRequires:  libselinux-static
48 BuildRequires:  ncurses-static
49 BuildRequires:  openssl-static
50 BuildRequires:  pcre-static
51 BuildRequires:  popt-static
52 BuildRequires:  readline-static
53 BuildRequires:  rpm-static
54 BuildRequires:  zlib-static
55 %endif
56 Requires:       db >= %{ver_db}
57 Requires:       ed
58 Requires:       rpm >= %{ver_rpm}
59 Requires:       sed
60 Requires:       openssl >= 0.9.7c
61 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62
63 %description
64 poldek is an RPM package management tool which allows you to easily
65 perform package verification, installation (including system
66 installation from scratch), upgrading, and removal.
67
68 Program can be used in batch (like apt-get from Debian's APT) or
69 interactive mode. The interactive mode puts you into a readline
70 interface with command line autocompletion and history, similar to the
71 shell mode of Perl's CPAN.
72
73 %{?with_static:This version is statically linked.}
74
75 %{!?with_imode:This version hasn't got interactive mode.}
76
77 %description -l pl
78 poldek jest narzêdziem linii poleceñ s³u¿±cym do weryfikacji,
79 instalacji (w³±czaj±c instalacjê systemu od zera), aktualizacji i
80 usuwania pakietów.
81
82 Program mo¿e byæ u¿ywany w trybie wsadowym (jak debianowy apt-get) lub
83 interaktywnym. Tryb interaktywny posiada interfejs readline z
84 dope³nianiem komend i histori±, podobny do trybu shell perlowego
85 modu³u CPAN.
86
87 %{?with_static:Ta wersja jest konsolidowana statycznie.}
88
89 %{!?with_imode:Ta wersja nie posiada trybu interaktywnego.}
90
91 %prep
92 %setup -q
93 %patch0 -p1
94 %patch1 -p1
95 %patch2 -p0
96 %{?with_ignarch:%patch3 -p1}
97 %patch4 -p1
98 %patch5 -p0
99 %patch6 -p1
100
101 %build
102 %{?with_ignarch:rm -f po/pl.gmo}
103 %{__autopoint}
104 %{__aclocal} -I m4
105 %{__autoconf}
106 %{__automake}
107 cp -f config.sub trurlib
108 %configure \
109         %{?with_static:--enable-static} \
110         %{!?with_imode:--disable-imode} \
111         %{?with_curl:--with-curl}
112 %{__make}
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 install -d $RPM_BUILD_ROOT%{_sysconfdir}
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 %{?with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
122 sed "s|/i686/|/%{_target_cpu}/|g" < %{SOURCE1} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
123
124 %find_lang %{name}
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %triggerpostun -- poldek <= 0.18.3-5
130 if grep -q '^promoteepoch.*yes' /etc/poldek.conf ; then
131         echo -e ',s:^promoteepoch:# promoteepoch:g\n,w' | ed -s /etc/poldek.conf
132 fi
133
134 %files -f %{name}.lang
135 %defattr(644,root,root,755)
136 %doc README* NEWS TODO *sample* conf/poldekrc*
137 %attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}.conf
138 %attr(755,root,root) %{_bindir}/*
139 %{_mandir}/man1/%{name}*
140 %lang(pl) %{_mandir}/pl/man1/%{name}*
This page took 0.075952 seconds and 3 git commands to generate.