-
Notifications
You must be signed in to change notification settings - Fork 1
/
jigdo.spec
266 lines (219 loc) · 8.62 KB
/
jigdo.spec
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
%define version 0.7.3
%define release 0
%define buildfordefault Red Hat Linux
# My rather hacky distribution selector: not very sophisticated but it SEEMS to WORK!
# use 'rpmbuild --define '_vendor redhat' to build for Red Hat Linux
# use 'rpmbuild --define '_vendor mandrake' to build for Mandrake (untested, sorry!)
# use 'rpmbuild --define '_vendor whatever' to build for Whatever (but please implement it yourself!)
# If no command line _vendor macro is entered, the _vendor macro of the buildsystem is used
# (see: 'rpmbuild --showrc | grep _vendor'). If the buildsystem doesn't have a _vendor macro
# we'll use Red Hat Linux ... and just see how far we'll get!
%if %{!?_vendor:1}%{?_vendor:0}
%{expand: %{warn:No _vendor available: default settings (%{buildfordefault}) will be used!}}
%{expand: %%define _vendor redhat}
%endif
# Gotcha! In bash true = 0 but in rpm-specfile-macros true = 1!
%if %([[ %{_vendor} == "redhat" ]] && echo 1 || echo 0)
%{expand: %%define buildforredhat 1}
%{expand: %{echo:Red Hat Linux settings will be used!}}
%else
%{expand: %%define buildforredhat 0}
%endif
%if %([[ %{_vendor} == "mandrake" ]] && echo 1 || echo 0)
%{expand: %%define buildformandrake 1}
%{expand: %{warn:Mandrake settings in this specfile are untested}}
%else
%{expand: %%define buildformandrake 0}
%endif
%if %([[ %{_vendor} == "suse" ]] && echo 1 || echo 0)
%{expand: %%define buildforsuse 0}
%{expand: %%define buildforredhat 1}
%{expand: %{error:SuSE settings in this specfile are not implemented}}
%{expand: %{echo:Red Hat Linux settings will be used!}}
%else
%{expand: %%define buildforsuse 0}
%endif
%if %([[ %{_vendor} != "redhat" && %{_vendor} != "mandrake" && %{_vendor} != "suse" ]] && echo 1 || echo 0)
%{expand: %{warn:%{_vendor} unknown: Default settings (%{buildfordefault}) will be used}}
%{expand: %%define buildforredhat 1}
%endif
%define name jigdo
%define title Jigdo
%define summary Jigsaw Download
%define icon jigdo.png
%if %{buildforredhat}
%{expand: %%define jigdoprefix %{_prefix}}
%{expand: %%define _menudir %{_prefix}/share/applications}
%{expand: %%define menufile %{name}.desktop}
%{expand: %%define _bindir %{jigdoprefix}/bin}
%{expand: %%define _datadir %{jigdoprefix}/share}
%{expand: %%define _liconsdir %{_prefix}/share/icons/hicolor/48x48/apps}
%{expand: %%define _iconsdir %{_prefix}/share/icons/hicolor/32x32/apps}
%{expand: %%define _miconsdir %{_prefix}/share/icons/hicolor/16x16/apps}
%{expand: %%define _mandir %{jigdoprefix}/man}
%{expand: %%define group Applications/Internet}
%{expand: %%define configure ./configure --prefix=%{jigdoprefix}}
%{expand: %%define make make}
%{expand: %%define makeinstall_std make DESTDIR=%{buildroot} install}
BuildRequires: compat-db, w3c-libwww-devel, gawk, zlib-devel, gtk2-devel, ImageMagick
Requires: compat-db, w3c-libwww, wget
%endif
%if %{buildformandrake}
%{expand: %%define _menudir %{_libdir}/menu}
%{expand: %%define menufile %{name}}
%{expand: %%define _iconsdir %{_datadir}/icons}
%{expand: %%define _miconsdir %{_datadir}/icons/mini}
%{expand: %%define _liconsdir %{_datadir}/icons/large}
%{expand: %%define longtitle %{summary}}
%{expand: %%define group Networking/File transfer}
%{expand: %%define section %{group}}
# Update Menu
%{expand: %%define _update_menus_bin %{_bindir}/update-menus}
%{expand: %%define update_menus if [ -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi}
# Clean Menu
%{expand: %%define clean_menus if [ "$1" = "0" -a -x %{_update_menus_bin} ]; then %{_update_menus_bin} || true ; fi}
BuildRequires: libdb3.3-devel, w3c-libwww-devel, mawk, libopenssl0-devel
Requires: libdb3.3, w3c-libwww, libopenssl0, common-licenses
%endif
%if %{buildforsuse}
%{expand: %%define jigdoprefix fake}
%{expand: %%define _menudir fake}
%{expand: %%define menufile fake}
%{expand: %%define _iconsdir fake}
%{expand: %%define _miconsdir fake}
%{expand: %%define _liconsdir fake}
%{expand: %%define _mandir fake}
%{expand: %%define group fake}
%{expand: %%define configure fake}
%{expand: %%define make fake}
%{expand: %%define makeinstall_std fake}
BuildRequires: fake
Requires: fake
%endif
Summary: %{summary}
Name: %{name}
Version: %{version}
Release: %{release}
Group: %{group}
URL: http://atterer.net/jigdo/
Source: http://atterer.net/jigdo/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
License: GPL
%description
Jigsaw Download, or short jigdo, is an intelligent tool that can be used on the
pieces of any chopped-up big file to create a special "template" file which
makes reassembly of the file very easy for users who only have the pieces.
What makes jigdo special is that there are no restrictions on what
offsets/sizes the individual pieces have in the original big image. This makes
the program very well suited for distributing CD/DVD images (or large zip/tar
archives) because you can put the files of the CD on an FTP server - when jigdo
is presented the files along with the template you generated, it is able to
recreate the CD image.
%prep
%setup -q
%build
%configure
%make
%install
rm -rf %{buildroot}
%makeinstall_std
mkdir -p %{buildroot}{%{_liconsdir},%{_iconsdir},%{_miconsdir}}
convert gfx/jigdo-icon.png -geometry 48 %{buildroot}%{_liconsdir}/%{icon}
convert gfx/jigdo-icon.png -geometry 32 %{buildroot}%{_iconsdir}/%{icon}
convert gfx/jigdo-icon.png -geometry 16 %{buildroot}%{_miconsdir}/%{icon}
# Menu stuff
mkdir -p %{buildroot}%{_menudir}
%if %{buildforredhat}
cat > %{buildroot}%{_menudir}/%{menufile} <<EOF
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=%{_bindir}/%{name}
Icon=%{_iconsdir}/%{icon}
Terminal=0
Name=%{name}
Comment=%{summary}
Categories=Application;Network;X-Red-Hat-Extra;
EOF
%endif
%if %{buildformandrake}
cat > %buildroot%{_menudir}/%{menufile} << EOF
?package(%{name}): \
command="%{_bindir}/%{name}" \
title="%{title}" \
longtitle="%{longtitle}" \
section="%{section}" \
icon="%{icon}" \
needs="x11"
EOF
%post
# This will only execute, if %{_update_menus_bin} (see above)
# is executable
%{update_menus}
%postun
# This will only execute, if %{_update_menus_bin} (see above)
# is executable
%{clean_menus}
%endif
%{find_lang} %{name}
%clean
rm -rf %{buildroot}
%files -f %{name}.lang
%defattr(-,root,root)
%doc README doc/TechDetails.txt doc/*.html
%{_mandir}/man1/%{name}*
%{_bindir}
%{_datadir}/%{name}
%{_menudir}/%{menufile}
%{_liconsdir}/%{icon}
%{_iconsdir}/%{icon}
%{_miconsdir}/%{icon}
%changelog
* Sun Jun 1 2003 Paul Bolle <[email protected]> 0.7.0-5
- Some optimizations (too lazy to specifiy)
- Small typo in %%description
- Added dependency: ImageMagick (Red Hat Linux)
- added --prefix =/usr to configure (Red Hat Linux)
- preliminary work for SuSE (mostly fake!)
* Fri May 16 2003 Paul Bolle <[email protected]> 0.7.0-4
- Minimization of use of buildforredhat and buildformandrake
- Minor optimizations
* Tue May 13 2003 Paul Bolle <[email protected]> 0.7.0-3
- Use jigdo-icon.png instead of 3 png.bz2 of mandrake.src.rpm
- Deleted double listing of pixmaps in %%files
* Sun May 11 2003 Paul Bolle <[email protected]> 0.7.0-2
- Richard Atterer reminded me that I had suggested to use %%{_vendor}
- Deleted VERSION from %%doc and added all html's
- Added build-dependencies: zlib-devel, gtk2-devel (Red Hat Linux)
- Added dependencie: wget (Red Hat Linux)
* Sat May 10 2003 Paul Bolle <[email protected]> 0.7.0-1
- First Red Hat Linux 9 enabled rewrite
* Sat Dec 28 2002 Alexander Skwar <[email protected]> 0.6.8-3mdk
- Rebuild for new glibc
* Thu Sep 05 2002 Lenny Cartier <[email protected]> 0.6.8-2mdk
- rebuild
* Sat Jul 20 2002 Alexander Skwar <[email protected]> 0.6.8-1mdk
- 0.6.8
* Thu Jun 6 2002 Alexander Skwar <[email protected]> 0.6.7-1mdk
- 0.6.7
- Remove gcc 3.1 patch - merged upstream
- Fix download source
* Fri May 31 2002 Alexander Skwar <[email protected]> 0.6.6-1mdk
- 0.6.6
- Add patch to make it compile with gcc 3.1.1
* Fri Apr 26 2002 Alexander Skwar <[email protected]> 0.6.5-1mdk
- After constant reminders by the author, here's the (not that much
anymore) brand new version of the academy award winning jigdo -
Version 0.6.5! ;)
* Tue Mar 5 2002 Alexander Skwar <[email protected]> 0.6.4-1mdk
- 0.6.4
* Sun Feb 8 2002 Alexander Skwar <[email protected]> 0.6.2-3mdk
- Jigdo compiles with gcc 2.96 now
* Sat Jan 24 2002 Alexander Skwar <[email protected]> 0.6.2-2mdk
- Make the SPEC be generic, so that it can be built on non-Mandrake
machines
* Sat Jan 24 2002 Alexander Skwar <[email protected]> 0.6.2-1mdk
- 0.6.2
- Remove patch1 - merged upstream
* Tue Jan 22 2002 Alexander Skwar <[email protected]> 0.6.1-1mdk
- First Mandrake release