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