-
Notifications
You must be signed in to change notification settings - Fork 0
/
poldek.spec.in
332 lines (244 loc) · 8.66 KB
/
poldek.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
# $Revision$, $Date$
#
# spec is based on PLD's poldek.spec available at <http://cvs.pld.org.pl/SPECS/>
#
# To build with configuration for particular distro define %{distro}:
# $ rpmbuild -bb ... --define 'distro {pld,fedora,rh}' [--define snap SNAP]
#
#%define _with_poldekuser 1
%define _unpackaged_files_terminate_build %{nil}
##define snap @SNAP@
Summary: A full-featured frontend to RPM
Name: poldek
Version: @VERSION@
Release: %{?snap:0.%{snap}.}1%{?_with_static:.static}
License: GPLv2
Group: Applications/System
Source0: http://team.pld.org.pl/~mis/poldek/download/%{name}-%{version}%{?snap:-cvs%{snap}}.tar.bz2
URL: http://team.pld.org.pl/~mis/poldek/
Requires: rpm
%{?_with_poldekuser:Requires: sudo}
BuildRequires: bzip2-devel
BuildRequires: rpm-devel >= 4.0
BuildRequires: openssl-devel
BuildRequires: readline-devel
BuildRequires: zlib-devel
BuildRequires: pcre-devel
%{!?_without_xml_metadata:BuildRequires: libxml2-devel}
%{?_with_static:BuildRequires: bzip2-static}
%{?_with_static:BuildRequires: openssl-static}
%{?_with_static:BuildRequires: rpm-static}
%{?_with_static:BuildRequires: zlib-static}
BuildRoot: /tmp/%{name}-%{version}-root-%(id -u -n)
%description
poldek is an RPM package management tool which allows you to easily
perform package verification, installation (including system
installation from scratch), upgrading, and removal.
Program can be used in batch (like apt-get from Debian's
APT) or 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}
%package devel
Summary: poldek headers and documentation
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
poldek's libraries headers and documentation
%package static
Summary: poldek static libraries
Group: Development/Libraries
Requires: %{name}-devel = %{version}-%{release}
%description static
poldek static libraries
%prep
%setup -q -n %{name}-%{version}%{?snap:-cvs%{snap}}
%build
%configure %{?_with_static:--enable-static} %{?_without_xml_metadata:--without-xml-metadata}
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_sysconfdir}
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%{?_with_static:rm -f $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
DISTRO=%{?distro:%{distro}}%{!?distro:pld}
CONFIG="$RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf"
# set 'distro' macro
perl -pi -e "s|^_distro\s*=\s*\w+\s*|_distro = $DISTRO\n|" $CONFIG
%{?_with_poldekuser:perl -pi -e "s|^\#?\s*runas\s*=\s*\w+\s*|runas = poldek\n|" $CONFIG}
%{?_with_poldekuser:mkdir -p $RPM_BUILD_ROOT%{_var}/cache/%{name}}
# set PLD architecture
perl -pi -e 's|_pld_arch\s*=\s*i686|_pld_arch = %{_target_cpu}|' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pld-*.conf
gzip -9nf README* conf/*sample* NEWS
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%{?_with_poldekuser: PATH="/bin:/sbin:/usr/bin:/usr/sbin"; if [ -z "$(id -u poldek 2>/dev/null)" ]; then groupadd -r -f poldek || exit 1; useradd -r -d %{_var}/cache/poldek -g poldek -s /bin/sh -c "poldek user" poldek || exit 1; fi;}
%post
%{?_with_poldekuser: sh %{_libdir}/%{name}/poldekuser-setup.sh --yes}
/sbin/ldconfig
%postun
if [ "$1" = "0" ]; then
%{?_with_poldekuser: /usr/sbin/userdel poldek}
%{?_with_poldekuser: /usr/sbin/groupdel poldek}
fi
/sbin/ldconfig
%files
%defattr(644,root,root,755)
%dir %{_sysconfdir}/%{name}
%attr(644,root,root) %config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/%{name}/*.conf
%attr(755,root,root) %{_bindir}/*
%ifos freebsd
%attr(755,root,root) %{_libdir}/lib*.so.*
%else # linux
%attr(755,root,root) %{_libdir}/lib*.so.*.*
%endif
%dir %{_libdir}/%{name}
%attr(755,root,root) %{_libdir}/%{name}/*
%{_infodir}/%{name}*
%{_mandir}/man1/%{name}*
%dir %attr(755,poldek,poldek) %{_var}/cache/%{name}
%doc *.gz conf/*.gz doc/manual.css doc/manual.html
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/*.so
%{_libdir}/lib*.la
%{_includedir}/%{name}
%{_includedir}/tndb
%{_includedir}/trurl
%{_includedir}/vfile
%files static
%defattr(644,root,root,755)
%{_libdir}/lib*.a
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} poldek
All persons listed below can be reached at <cvs_login>@pld.org.pl
$Log$
Revision 1.33 2005/10/26 22:50:13 mis
- xml metadata bcond
Revision 1.32 2005/05/27 15:27:20 mis
- commented out %%define is still defined? rpm bug?
Revision 1.31 2005/05/23 20:00:49 mis
- updates
Revision 1.30 2005/05/22 13:46:58 mis
- FreeBSD issues
Revision 1.29 2004/10/18 19:58:51 mis
- removed 'cvs' from snapshot package release
Revision 1.28 2004/10/17 20:41:12 mis
- fixes
Revision 1.27 2004/10/17 20:10:44 mis
- reamed userpoldekadd.sh; fixed spec
Revision 1.26 2004/10/17 19:55:44 mis
- fixes
Revision 1.25 2004/10/17 19:02:24 mis
- --with poldekuser param to spec
Revision 1.24 2004/10/09 15:36:52 mis
- finished snap-rpm-package
Revision 1.23 2004/10/09 14:48:29 mis
- make snap-rpm-package
Revision 1.22 2004/09/26 19:37:42 mis
- a big cleanup: renamed non-unique symbols, prepared symbols list to export (*.sym), fixed headers, spec
Revision 1.21 2004/09/23 20:28:08 mis
- updated to 0.2x series (devel and static subpackage, etc)
Revision 1.20 2002/11/07 17:41:07 mis
- used tar.bz2 source
Revision 1.19 2002/06/03 15:45:25 mis
- fixes source URL
Revision 1.18 2002/04/21 16:15:14 mis
- fixed %%doc list
Revision 1.17 2002/04/21 15:38:03 mis
- fixed %%{distro} handling
Revision 1.16 2002/04/14 23:39:09 mis
- fixed %doc list
Revision 1.15 2002/04/10 17:02:31 mis
- easier playing with configs
Revision 1.14 2002/04/06 13:57:27 mis
- added HTTP client; curl module not compiled by default
Revision 1.13 2002/04/04 21:27:31 mis
- +URL
Revision 1.12 2002/03/28 23:37:36 mis
- commented out popt-static build requirement (no such RH package)
Revision 1.11 2002/03/26 00:22:04 mis
- dist config is not PLD one; cosmetics
Revision 1.10 2002/03/18 16:46:25 mis
- added missing changelog name(?)
Revision 1.9 2002/03/09 22:00:57 mis
- updates && slimed down poldekrc.sample-pld
Revision 1.8 2002/02/25 23:59:30 mis
- merged with SPECS's spec
Revision 1.36 2002/01/31 09:41:06 mis
- added 'static' bcond
Revision 1.35 2002/01/30 18:29:45 mis
- autoupdated to 0.16
Revision 1.34 2002/01/18 02:14:38 kloczek
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
Revision 1.33 2002/01/11 16:43:51 mis
- autoupdated to 0.15.9
Revision 1.32 2001/10/29 11:13:45 mis
- autoupdated to 0.15.8
Revision 1.31 2001/10/11 15:10:27 mis
- fixed source URL; release 2 (may be STB)
Revision 1.30 2001/10/10 14:41:10 mis
- updated to 0.15.7; STB
Revision 1.29 2001/09/20 10:10:14 mis
- STB
Revision 1.28 2001/09/13 10:06:23 filon
- rebuild with optimized zlib-static, release 2
Revision 1.27 2001/09/12 16:33:33 mis
- trurlib 0.43.3 is needed
Revision 1.26 2001/09/12 16:28:04 mis
- updated to 0.15.6
- added global config
Revision 1.25 2001/08/28 12:06:58 filon
- chagded BuildReq: pod2man to perl-devel
Revision 1.24 2001/08/22 17:30:39 filon
- changed BuilReq:/usr/bin/pod2man to pod2man
Revision 1.23 2001/07/20 16:42:27 mis
- updated to 0.15.5
Revision 1.22 2001/07/17 16:12:09 mis
- updated to 0.15.4
Revision 1.21 2001/07/16 20:32:30 kloczek
- reorder BuildRequires rules.
Revision 1.20 2001/07/16 18:38:31 kloczek
- added rpm-static to BuildRequires if %%{BOOT}.
Revision 1.19 2001/07/16 15:19:03 mis
- updated to 0.15.3
Revision 1.18 2001/07/13 15:18:20 mis
- updated to 0.15.2
Revision 1.17 2001/06/28 14:28:13 mis
- updated to 0.15.1
Revision 1.16 2001/06/27 19:20:27 klakier
- removed rpmvercmp from -BOOT
- added debug options to -BOOT (do not work, though))
Revision 1.15 2001/06/27 18:32:55 klakier
- removed -m386
Revision 1.14 2001/06/27 18:09:22 mis
- updated to 0.15
Revision 1.13 2001/06/18 11:31:31 mis
- updated to 0.14.1
Revision 1.12 2001/06/12 18:14:19 mis
- updated to 0.14
Revision 1.11 2001/05/22 23:29:59 klakier
- added -m386 to BOOT
Revision 1.10 2001/05/21 13:27:54 klakier
- more buildrequires
Revision 1.9 2001/05/18 22:28:24 serek
- popt-static added to buildrequires.
Revision 1.8 2001/05/18 18:58:16 mis
- autoupdated to 0.13
Revision 1.7 2001/05/18 12:31:56 roman
- added polish Summary and %description.
Revision 1.6 2001/05/11 14:06:55 klakier
- fixed BuildRequires
Revision 1.5 2001/04/27 20:09:10 kloczek
- finam cleanups.
Revision 1.4 2001/04/27 14:24:43 wiget
fix buildrequires
Revision 1.3 2001/04/27 14:08:11 klakier
- removed rpmvercmp from BOOT
Revision 1.2 2001/04/23 11:43:26 klakier
- ver 0.12
- added BOOT package
Revision 1.1 2000/09/25 00:00:09 mis
- initial version