forked from arnholm/codeblocks_sfmirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
codeblocks.spec.in
550 lines (499 loc) · 17.7 KB
/
codeblocks.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
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
%define _svnrev @REVISION@
%define req_wxgtk 2.8.0
%define _redhat %(if [ -f /etc/redhat-release ]; then echo 1; else echo 0; fi)
%define _mandrake %(if [ -f /etc/mandrake-release ]; then echo 1; else echo 0; fi)
%define _version 20.03.svn.%{_svnrev}
%define _rel 1
%define _release %{_rel}
%define jobs %(if [ -e /usr/bin/getconf ]; then echo $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 )); else echo 1; fi)
%if 0%{?suse_version}
%define _release %{_rel}.suse%{suse_version}
%endif
%if 0%{?mandriva_version}
%define _release %{_rel}.mdk%{mandrake_version}
%define _redhat 0
%endif
%if 0%{?fedora}
%define _release %{_rel}.fc%{fedora}
%define _redhat 0
%endif
%if 0%{?_redhat}
%define _redhat_prefix %(grep -q "Red Hat Linux" /etc/redhat-release && echo rhl || echo el)
%define _redhat_vernum %(cat /etc/redhat-release | sed -rn 's/[^0-9]*([0-9]*).*/\\1/p')
%define _release %{_rel}.%{_redhat_prefix}%{_redhat_vernum}
%endif
%if 0%{?suse_version} >= 930
%define debugrpm 1
%endif
%if 0%{?mandriva_version}
%define debugrpm 1
%endif
%define nassi_shneiderman 1
%define spellchecker 1
%if 0%{?_redhat_vernum}
%if 0%{?_redhat_vernum} < 6
%define nassi_shneiderman 0
%define spellchecker 0
%endif
%endif
%if 0%{?nassi_shneiderman}
%define no_nassi_flag ""
%else
%define no_nassi_flag ,-NassiShneiderman
%endif
%if 0%{?spellchecker}
%define no_spellchecker_flag ""
%else
%define no_spellchecker_flag ,-spellchecker
%endif
Name: codeblocks
Version: %{_version}
Release: %{_release}
Summary: OpenSource Cross Platform Free C++ IDE
Group: Development/Tools
License: GPLv3+
URL: http://www.codeblocks.org/
Source: %{name}-@[email protected]
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: %{name}-libs%{?_isa} = %{version}
Requires: xterm
%if 0%{?mandriva_version}
Requires: wxgtk2.8 >= %{req_wxgtk}
BuildRequires: wxgtk2.8 >= %{req_wxgtk}, libwxgtku2.8-devel >= %{req_wxgtk}
%else
%if 0%{?suse_version}
%if 0%{?suse_version} < 1030
Requires: wxWidgets >= %{req_wxgtk}
BuildRequires: wxWidgets >= %{req_wxgtk}, wxWidgets-devel >= %{req_wxgtk}
%else
Requires: wxGTK >= %{req_wxgtk}
BuildRequires: wxGTK >= %{req_wxgtk}, wxGTK-devel >= %{req_wxgtk}
%endif
%else
Requires: wxGTK >= %{req_wxgtk}
BuildRequires: wxGTK >= %{req_wxgtk}, wxGTK-devel >= %{req_wxgtk}
%endif
%endif
BuildRequires: intltool, gcc-c++, make, gettext, autoconf >= 2.5, libtool >= 1.4, m4
BuildRequires: libstdc++, libstdc++-devel, gtk2-devel, libjpeg-devel, libtiff-devel
BuildRequires: zip, pkgconfig, automake >= 1.9, glib2-devel
%if 0%{?suse_version}
BuildRequires: update-desktop-files
%endif
#{?_distribution:Distribution:%_distribution}
%define pkgdatadir %{_datadir}/%{name}
%define pkglibdir %{_libdir}/%{name}
%define plugindir %{pkglibdir}/plugins
%description
Code::Blocks is the open-source, cross-platform Integrated Development
Environment (IDE).
It is based on a self-developed plugin framework allowing unlimited
extensibility.
Most of its functionality is already provided by plugins.
Plugins included in the base package are:
* Compiler frontend to many free compilers
* Debugger frontend for GDB (and CDB for windows platforms)
* Source formatter (based on AStyle)
* Wizard to create new C++ classes
* Code-completion / symbols-browser (work in progress)
* Default MIME handler
* Wizard to create new Code::Blocks plugins
* To-do list
* Extensible wizard based on scripts
* Autosave (saves your work in the unfortunate case of a crash)
%package libs
Summary: Libraries needed to run Code::Blocks
Group: Development/Tools
%description libs
Libraries needed to run Code::Blocks.
%post libs
test -x /sbin/ldconfig && /sbin/ldconfig
%postun libs
test -x /sbin/ldconfig && /sbin/ldconfig
%package contrib
Summary: Code::Blocks contrib plugins
Group: Development/Tools
Requires: %{name}%{?_isa} = %{version}
Requires: %{name}-contrib-libs%{?_isa} = %{version}
BuildRequires: bzip2-devel, zlib-devel, fontconfig-devel
%if 0%{?nassi_shneiderman}
BuildRequires: boost-devel
%endif
%if 0%{?spellchecker}
BuildRequires: hunspell-devel
%endif
%description contrib
This package extends Code::Blocks functionality a great deal with the included
plugins. These are:
* Autoversioning
* BrowseTracker
* Cccc
* Code profiler (based on gprof)
* Code statistics (SLOCs etc)
* Codesnippets
* Copy strings
* CppCheck
* Cscope
* DoxyBlocks
* DragScroll (enhances mouse operations)
* EditorConfig
* EditorTweaks
* Selection of small games for relaxing between coding sessions! (BYOGames)
* Setting of environment variables
* Source exporter to PDF/HTML/ODT/RTF
* FileManager
* Header fixup
* Help
* HexEditor
* IncrementalSearch
* Keyboard shortcuts configuration
* CB koders
* Library finder
* MouseSap
* NassiShneiderman
* Regular expression testbed
* Reopen last closed editor(s) via menu or hotkey
* Rndgen
* Clangd client
* Smartindent plugin (cpp, HDL, Fortran, Lua, Pascal, Python, XML)
* Spellchecker plugin
* Symbol table plugin
* ThreadSearch
* ToolsPlus
* Valgrind
* RAD gui-builder for wxWidgets (wxSmith)
* wxSmith contrib items
* wxSmith AUI
%package contrib-libs
Summary: Libraries needed to run Code::Blocks contrib-plugins
Group: Development/Tools
%description contrib-libs
Libraries needed to run Code::Blocks contrib-plugins.
%post contrib-libs
test -x /sbin/ldconfig && /sbin/ldconfig
%postun contrib-libs
test -x /sbin/ldconfig && /sbin/ldconfig
%package devel
Summary: Code::Blocks development libraries and headers (SDK)
Group: Development/Tools
Requires: %{name}%{?_isa} = %{version}
%description devel
This package contains the development libraries and headers for creating plugins
for the Code::Blocks IDE.
%package contrib-devel
Summary: Code::Blocks development libraries and headers for wxSmith and wxContribItems
Group: Development/Tools
Requires: %{name}-contrib%{?_isa} = %{version}
%description contrib-devel
This package contains the development libraries and headers needed to build
wxSmith-plugins and to use the wxContribItems in own programs.
%{?debugrpm:%debug_package}
%prep
%setup -q -n codeblocks-@VERSION@
%{?suse_update_libdir:%{suse_update_libdir}}
%{?suse_update_config:%{suse_update_config -f}}
./bootstrap
%if 0%{?suse_version}
%if 0%{?suse_version} > 1020
%configure \
--disable-pch \
--with-wx-config="%{_bindir}/wx-config" \
--with-contrib-plugins=all \
$CONF_OPTS
%else
%configure \
--disable-pch \
--with-wx-config="%{_bindir}/wx-config-2.8" \
--with-contrib-plugins=all \
$CONF_OPTS
%endif
%else
%configure \
--disable-pch \
--with-wx-config="%{_bindir}/wx-config" \
--with-contrib-plugins=all%no_nassi_flag%no_spellchecker_flag \
$CONF_OPTS
%endif
%build
%{__make} %{?jobs:-j %{jobs}}
%install
%__make DESTDIR=$RPM_BUILD_ROOT install
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{pkglibdir}/wxContribItems/*.la
rm -f $RPM_BUILD_ROOT%{plugindir}/*.la
%post
/usr/bin/update-mime-database "%{_datadir}/mime" &> /dev/null || :
# test -x /sbin/ldconfig && /sbin/ldconfig
%preun
/usr/bin/update-mime-database "%{_datadir}/mime" &> /dev/null || :
%clean
test -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" && %{__rm} -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README COPYING AUTHORS BUGS COMPILERS TODO NEWS ChangeLog
%{_bindir}/codeblocks
%{_bindir}/cb_console_runner
%{_bindir}/cb_share_config
%{plugindir}/libabbreviations.so
%{plugindir}/libAstyle.so
%{plugindir}/libautosave.so
%{plugindir}/libclasswizard.so
%{plugindir}/libcodecompletion.so
%{plugindir}/libcompiler.so
%{plugindir}/libdebugger.so
%{plugindir}/libdefaultmimehandler.so
%{plugindir}/libDisplayEvents.so
%{plugindir}/liboccurrenceshighlighting.so
%{plugindir}/libopenfileslist.so
%{plugindir}/libprojectsimporter.so
%{plugindir}/libscriptedwizard.so
%{plugindir}/libtodo.so
%{_datadir}/metainfo/codeblocks.appdata.xml
%{_datadir}/applications/codeblocks.desktop
%{_datadir}/icons/hicolor/48x48/mimetypes/*
%{_datadir}/mime/packages/codeblocks.xml
%{_datadir}/pixmaps/codeblocks.png
%{_mandir}/man1/codeblocks.*
%{_mandir}/man1/cb_console_runner.*
%{_mandir}/man1/cb_share_config.*
%{pkgdatadir}/compilers/*
%{pkgdatadir}/icons/*
%{pkgdatadir}/images/*.png
%{pkgdatadir}/images/settings/*
%{pkgdatadir}/lexers/*
%{pkgdatadir}/scripts/*
%{pkgdatadir}/templates/*
%{pkgdatadir}/Astyle.zip
%{pkgdatadir}/abbreviations.zip
%{pkgdatadir}/autosave.zip
%{pkgdatadir}/classwizard.zip
%{pkgdatadir}/codecompletion.zip
%{pkgdatadir}/compiler.zip
%{pkgdatadir}/debugger.zip
%{pkgdatadir}/defaultmimehandler.zip
%{pkgdatadir}/DisplayEvents.zip
%{pkgdatadir}/manager_resources.zip
%{pkgdatadir}/occurrenceshighlighting.zip
%{pkgdatadir}/openfileslist.zip
%{pkgdatadir}/projectsimporter.zip
%{pkgdatadir}/resources.zip
%{pkgdatadir}/scriptedwizard.zip
%{pkgdatadir}/start_here.zip
%{pkgdatadir}/todo.zip
%{pkgdatadir}/tips.txt
%files libs
%defattr(-,root,root)
%{_libdir}/libcodeblocks.so.*
%doc README COPYING AUTHORS BUGS COMPILERS TODO NEWS ChangeLog
%files contrib
%defattr(-,root,root)
%{plugindir}/libAutoVersioning.so
%{plugindir}/libBrowseTracker.so
%{plugindir}/libbyogames.so
%{plugindir}/libCccc.so
%{plugindir}/libCppCheck.so
%{plugindir}/libSmartIndent*.so
%{plugindir}/libcb_koders.so
%{plugindir}/libcodesnippets.so
%{plugindir}/libcodestat.so
%{plugindir}/libcopystrings.so
%{plugindir}/libCscope.so
%{plugindir}/libDoxyBlocks.so
%{plugindir}/libdragscroll.so
%{plugindir}/libEditorConfig.so
%{plugindir}/libEditorTweaks.so
%{plugindir}/libenvvars.so
%{plugindir}/libexporter.so
%{plugindir}/libFileManager.so
%{plugindir}/libheaderfixup.so
%{plugindir}/libhelp_plugin.so
%{plugindir}/libHexEditor.so
%{plugindir}/libIncrementalSearch.so
%{plugindir}/libkeybinder.so
%{plugindir}/liblib_finder.so
%if 0%{?nassi_shneiderman}
%{plugindir}/libNassiShneiderman.so
%endif
%if 0%{?spellchecker}
%{plugindir}/libSpellChecker.so
%endif
%{plugindir}/libProfiler.so
%{plugindir}/libProjectOptionsManipulator.so
%{plugindir}/libRegExTestbed.so
%{plugindir}/libSymTab.so
%{plugindir}/libThreadSearch.so
%{plugindir}/libToolsPlus.so
%{plugindir}/libValgrind.so
%{plugindir}/libMouseSap.so
%{plugindir}/libReopenEditor.so
%{plugindir}/librndgen.so
%{plugindir}/libclangd_client.so
%{plugindir}/libwxsmith.so
%{plugindir}/libwxsmithcontribitems.so
%{plugindir}/libwxSmithAui.so
%{_libdir}/pkgconfig/wxsmithaui.pc
%{pkgdatadir}/AutoVersioning.zip
%{pkgdatadir}/BrowseTracker.zip
%{pkgdatadir}/byogames.zip
%{pkgdatadir}/Cccc.zip
%{pkgdatadir}/CppCheck.zip
%{pkgdatadir}/SmartIndent*.zip
%{pkgdatadir}/cb_koders.zip
%{pkgdatadir}/codesnippets.zip
%{pkgdatadir}/codestat.zip
%{pkgdatadir}/copystrings.zip
%{pkgdatadir}/Cscope.zip
%{pkgdatadir}/DoxyBlocks.zip
%{pkgdatadir}/dragscroll.zip
%{pkgdatadir}/EditorConfig.zip
%{pkgdatadir}/EditorTweaks.zip
%{pkgdatadir}/envvars.zip
%{pkgdatadir}/exporter.zip
%{pkgdatadir}/FileManager.zip
%{pkgdatadir}/headerfixup.zip
%{pkgdatadir}/help_plugin.zip
%{pkgdatadir}/HexEditor.zip
%{pkgdatadir}/IncrementalSearch.zip
%{pkgdatadir}/keybinder.zip
%{pkgdatadir}/lib_finder.zip
%{pkgdatadir}/MouseSap.zip
%if 0%{?nassi_shneiderman}
%{pkgdatadir}/NassiShneiderman.zip
%endif
%if 0%{?spellchecker}
%{pkgdatadir}/SpellChecker.zip
%endif
%{pkgdatadir}/Profiler.zip
%{pkgdatadir}/ProjectOptionsManipulator.zip
%{pkgdatadir}/RegExTestbed.zip
%{pkgdatadir}/rndgen.zip
%{pkgdatadir}/clangd_client.zip
%{pkgdatadir}/ReopenEditor.zip
%{pkgdatadir}/SymTab.zip
%{pkgdatadir}/ThreadSearch.zip
%{pkgdatadir}/ToolsPlus.zip
%{pkgdatadir}/Valgrind.zip
%{pkgdatadir}/wxsmith.zip
%{pkgdatadir}/wxsmithcontribitems.zip
%{pkgdatadir}/wxSmithAui.zip
%{pkgdatadir}/images/codesnippets/*
%{pkgdatadir}/images/wxsmith/*
%{pkgdatadir}/lib_finder/*
%if 0%{?spellchecker}
%{pkgdatadir}/SpellChecker/*
%endif
%{_mandir}/man1/*snippets*
%doc README COPYING AUTHORS BUGS COMPILERS TODO NEWS ChangeLog
%{_datadir}/metainfo/codeblocks-contrib.metainfo.xml
%files contrib-libs
%defattr(-,root,root)
%{_libdir}/libwxsmithlib.so.*
%{pkglibdir}/wxContribItems/*.so.*
%doc README COPYING AUTHORS BUGS COMPILERS TODO NEWS ChangeLog
%files devel
%defattr(-,root,root)
%{_libdir}/libcodeblocks.so
%{_libdir}/pkgconfig/codeblocks.pc
%{_includedir}/%{name}/*
%files contrib-devel
%defattr(-,root,root)
%{pkglibdir}/wxContribItems/*.so
%{_libdir}/pkgconfig/cb_*.pc
%{_libdir}/pkgconfig/wxsmith.pc
%{_includedir}/%{name}/wxContribItems/*
%{_libdir}/libwxsmithlib.so
%{_libdir}/pkgconfig/wxsmith-contrib.pc
%{_includedir}/wxsmith/*
%changelog
* Thu Feb 20 2020 Teodor Petrov <[email protected]>
- Changes for release 20.03.
* Tue Dec 23 2014 jens <[email protected]>
- do not try to build Spellchecker-plugin on CentOS/RedHat < 6, because the
hunspell packages are only available from a thirdparty repo (atomicorp),
therefore an automatic build is not possible and the users are forced to
enable this repo.
- fix determining of redhat and fedora release-numbers
* Tue Dec 24 2013 Jens Lody <[email protected]>
- Changes for release 13.12.
* Sun Dec 08 2013 Jens Lody <[email protected]>
- Second release candidate of release 13.12.
* Sun Nov 17 2013 Jens Lody <[email protected]>
- First release candidate of release 13.12.
* Fri Jun 08 2012 jens <[email protected]>
- partly reverted last change, to keep the package layout more clear
- do not try to build NassiShneiderman-plugin on CentOS/RedHat < 6, because the
boost packages are too old (based on changes of oBFusCATed)
- move some build-dependencies to the contrib-plugins package, because they are
only needed there, thanks oBFusCATed
* Sat May 26 2012 jens <[email protected]>
- split packages in binaries, arch-independent, development- and header-packages,
similar to the debian package-layout
* Fri May 25 2012 jens <[email protected]>
- Fixed: missing build-dependencies
- Fixed: RPM build error, because of new contrib-packages
- Layout changes in codeblocks.spec.in, to enhance readability
* Sat Feb 20 2010 Biplab <[email protected]>
- Fixed typos: In wxSmithAui generated files.
- Fixed: RPM build error due to inclusion of contrib plugins twice.
- Fixed: Copystrings plugin was not included properly in rpm.
- Fixed: Pkgconfig macros of wxsmithaui and wxsmith-contrib were not included.
- Moved: libwxsmithlib.so to contrib package.
- Removed: 'lynx' as a dependency.
* Thu Feb 18 2010 Biplab <[email protected]>
- Changed source tarball extension to .bz2
- Fixed: broken rpm build due to path change from icons/gnome/* to icons/hicolor/*
* Sun Dec 14 2008 TheTuxKeeper <[email protected]>
- some fixes for changes in rev 5334
* Sat Jul 26 2008 TheTuxKeeper <[email protected]>
- moved libwxsmithlib.so and .la into devel package
- removed selfprovide codeblocks
- removed subversion dependency
- changed release and version tag (version now only contains version + revision)
- added libValgrind.* to file list
* Thu Jan 03 2008 TheTuxKeeper <[email protected]>
- added missing files to file list (libfinder)
- changed dependencies for mandriva
- some clean-ups
* Wed Nov 14 2007 TheTuxKeeper <[email protected]>
- added new plugin to file list
- added make job number "detection"
* Sun Oct 14 2007 TheTuxKeeper <[email protected]>
- applied changes made on opensuse buildservice
* Mon Apr 16 2007 TheTuxKeeper <[email protected]>
- added wxsmithcontribitems files to filelist
* Fri Jan 5 2007 TheTuxKeeper <[email protected]>
- changed prefix on suse to default (from /opt/gnome to /usr)
* Sat Dec 2 2006 TheTuxKeeper <[email protected]>
- Added RegExTestbed plugin to filelist
* Sun Nov 5 2006 TheTuxKeeper <[email protected]>
- applied patch #1605
- renamed _mandriva to _mandrake
* Wed Oct 11 2006 TheTuxKeeper <[email protected]>
- Added cb_share_config to filelist
* Sun Aug 20 2006 TheTuxKeeper <[email protected]>
- Added missing files to filelist
* Sat Jul 22 2006 TheTuxKeeper <[email protected]>
- adapted versioning to autotools
* Fri Jul 14 2006 TheTuxKeeper <[email protected]>
- added man pages to filelist
* Tue Jul 11 2006 Yiannis Mandravellos <[email protected]>
- removed pluginwizard files
- replaced libprojectwizard by libscriptedwizard (renamed)
* Tue Jul 11 2006 TheTuxKeeper <[email protected]>
- removed libwxscintilla from filelist
* Mon Jul 10 2006 TheTuxKeeper <[email protected]>
- fixed wrong path of fedora-release file
- fixed mixed cases in one description macro call
- removed and added finally again libwxscintilla from/to filelist
- added versions to some buildrequires
- added byogames plugin to filelist
* Sun Mar 5 2006 TheTuxKeeper <[email protected]>
- rewrite of release tag setting
* Thu Jan 5 2006 TheTuxKeeper <[email protected]>
- had to add Mandriva specific requires
* Mon Jan 2 2006 TheTuxKeeper <[email protected]>
- simplified the changes made before
* Sun Jan 1 2006 TheTuxKeeper <[email protected]>
- added distribution check (SuSE, Fedora, Mandriva/Mandrake)
- added distribution specific Requires and BuildRequires
- added run of update-mime-database if installed