2 # - snap build from svn
5 %bcond_with snap # build snap instead of release
12 Summary: An open source, cross platform, free C++ IDE
13 Summary(pl.UTF-8): Wieloplatformowe, darmowe IDE do C++ o otwartych źródłach
17 Release: %{_snap}%{_svn}
23 Group: X11/Development/Tools
25 Source0: %{name}-%{_snap}.tar.gz
27 Source0: http://dl.sourceforge.net/codeblocks/%{name}-%{version}-src.tar.bz2
28 # Source0-md5: ac15b4b3de50d7650c2f7a8dbcb30f88
30 Patch0: %{name}-FHS-plugins.patch
31 Patch1: %{name}-desktop.patch
32 Patch2: %{name}-ac.patch
33 Patch3: %{name}-pwd.patch
34 URL: http://www.codeblocks.org/
35 BuildRequires: autoconf >= 2.50
36 BuildRequires: automake
37 BuildRequires: bzip2-devel
38 BuildRequires: dos2unix
39 BuildRequires: libtool
40 BuildRequires: pkgconfig
41 BuildRequires: sed >= 4.0
42 BuildRequires: unixODBC-devel
43 BuildRequires: wxGTK2-unicode-devel >= 2.8.0
45 BuildRequires: zlib-devel
46 Requires(post,postun): desktop-file-utils
47 Requires(post,postun): gtk+2
48 Requires(post,postun): shared-mime-info
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define _pluginsdir %{_libdir}/%{name}/plugins
54 Code::Blocks is a free C++ IDE built specifically to meet the most
55 demanding needs of its users. It was designed, right from the start,
56 to be extensible and configurable. Built around a plugin framework,
57 Code::Blocks can be extended with plugin DLLs. It includes a plugin
58 wizard so you can compile your own plugins!
61 - Open Source! GPL 3, no hidden costs
62 - Cross-platform; runs on Linux or Windows (uses wxWidgets)
63 - Made in GNU C++; no interpreted languages or proprietary libs needed
64 - Extensible thru plugins
66 Compiler-related features:
67 - Multiple compiler support: GCC (MingW / Linux), MSVC++, Digital
68 Mars, Borland C++ 5.5, Open Watcom
69 - Compiles directly or with makefiles
70 - Predefined project templates
71 - Custom template support
72 - Uses XML format for project files
73 - Multi-target projects
75 - Imports MSVC projects and workspaces (NOTE: assembly code and
76 inter-project dependencies not supported yet)
77 - Imports Dev-C++ projects
78 - Integrates with GDB for debugging
81 - Syntax highlighting, customizable and extensible
82 - Code folding for C++ and XML files
84 - Code completion plugin
87 - One-key swap between .h and .c/.cpp files
88 - Open files list for quick switching between files (optional)
89 - External customizable "Tools"
90 - To-do list management with different users
92 %description -l pl.UTF-8
93 Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu
94 zaspokojenia największych potrzeb swoich użytkowników. Zostało
95 zaprojektowane od początku aby było rozszerzalne i konfigurowalne.
96 Code::Blocks, jako zbudowane w oparciu o szkielet wtyczek, można
97 rozszerzać. Zawiera czarodzieja dla wtyczek, więc można kompilować
101 - otwarte źródła na licencji GPL 3, bez ukrytych kosztów
102 - wieloplatformowość - działa na Linuksie i Windows (przy użyciu
104 - stworzone w GNU C++, nie wymaga języków interpretowanych ani
105 własnościowych bibliotek
106 - rozszerzalne poprzez wtyczki
108 Cechy związane z kompilatorami:
109 - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital
110 Mars, Borland C++ 5.5, Open Watcom
111 - kompiluje bezpośrednio lub z użyciem plików Makefile
112 - predefiniowane szablony projektów
113 - obsługa własnych szablonów
114 - używa formatu XML dla plików projektów
115 - projekty z wieloma celami
116 - obsługa przestrzeni zadań (workspace)
117 - import projektów i przestrzeni zadań MSVC (uwaga: kdo w asemblerze i
118 zależności między projektami nie są jeszcze obsługiwane)
119 - import projektów Dev-C++
120 - integracja z GDB do odpluskwiania
123 - podświetlanie składni - konfigurowalne i rozszerzalne
124 - zwijanie kodu w plikach C++ i XML
125 - interfejs z zakładkami
126 - wtyczka dopełniania kodu
128 - inteligentne wcięcia
129 - przełączanie jednym klawiszem między plikami .h i .c/.cpp
130 - lista otwartych plików do szybkiego przełączania między nimi (opcja)
131 - zewnętrzne, konfigurowalne "narzędzia"
132 - zarządzanie listą rzeczy do zrobienia ("To-do") przez różnych
136 Summary: Development files for Code::Blocks
137 Summary(pl.UTF-8): Pliki nagłówkowe Code::Blocks
138 Group: X11/Development/Libraries
139 Requires: %{name} = %{version}-%{release}
142 This package provides development files for Code::Blocks. Install this
143 package only if you plan to write plugins for Code::Blocks.
145 %description devel -l pl.UTF-8
146 Ten pakiet dostarcza plików nagłówkowych Code::Blocks. Należy
147 instalować ten pakiet tylko w celu pisania wtyczek do Code::Blocks.
151 %setup -q -n %{name}-%{_snap}
155 find . -type f -and -not -name "*.cpp" -and -not -name "*.h" -and -not -name "*.png" -and -not -name "*.bmp" -and -not -name "*.c" -and -not -name "*.cxx" -and -not -name "*.ico" | sed "s/.*/\"\\0\"/" | xargs dos2unix
162 # fix the dir, where plugins are installed
163 for p in astyle autosave classwizard codecompletion compilergcc debuggergdb \
164 defaultmimehandler openfileslist projectsimporter scriptedwizard todo xpmanifest
166 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.*
169 for p in AutoVersioning BrowseTracker ThreadSearch byogames cb_koders \
170 codesnippets codestat dragscroll envvars help_plugin keybinder lib_finder \
171 profiler regex_testbed source_exporter symtab wxSmith wxSmithContribItems
173 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.*
176 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.*
178 #hardcode libdir, continue of patch0
179 sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp
181 # remove execute bits from source files
182 find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
183 find src/plugins/compilergcc -type f -exec chmod a-x {} ';'
185 # fix version inside the configure script
186 sed -i 's/1\.0svn/%{version}/g' revision.m4
190 chmod a+x update_revision.sh
199 --with-wx-config=wx-gtk2-unicode-config \
200 --with-contrib-plugins=all
205 rm -rf $RPM_BUILD_ROOT
208 DESTDIR=$RPM_BUILD_ROOT \
209 mimeicondir=%{_iconsdir}/hicolor/48x48/mimetypes
211 rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la
214 rm -rf $RPM_BUILD_ROOT
218 %update_icon_cache hicolor
219 %update_desktop_database_post
220 %update_mime_database
224 %update_icon_cache hicolor
225 %update_desktop_database_postun
226 %update_mime_database
229 %defattr(644,root,root,755)
230 %doc AUTHORS BUGS COMPILERS README TODO ChangeLog
231 %attr(755,root,root) %{_bindir}/cb_share_config
232 %attr(755,root,root) %{_bindir}/codeblocks
233 %attr(755,root,root) %{_bindir}/codesnippets
234 %attr(755,root,root) %{_bindir}/cb_console_runner
235 %attr(755,root,root) %{_libdir}/libwxsmithlib.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libwxsmithlib.so.0
237 %attr(755,root,root) %{_libdir}/libcodeblocks.so.*.*.*
238 %attr(755,root,root) %ghost %{_libdir}/libcodeblocks.so.0
239 %{_desktopdir}/codeblocks.desktop
241 %{_iconsdir}/hicolor/48x48/mimetypes/*.png
242 %{_datadir}/mime/packages/codeblocks.xml
243 %dir %{_datadir}/%{name}
244 %dir %{_datadir}/%{name}/scripts
245 %{_datadir}/%{name}/scripts/*
246 %{_datadir}/%{name}/*.zip
247 %{_datadir}/%{name}/*.txt
248 %{_datadir}/%{name}/icons
249 %{_datadir}/%{name}/images
250 %{_datadir}/%{name}/lexers
251 %{_datadir}/%{name}/lib_finder
252 %{_datadir}/%{name}/templates
253 %dir %{_libdir}/%{name}
255 %attr(755,root,root) %{_pluginsdir}/*.so
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_libdir}/libcodeblocks.so
261 %attr(755,root,root) %{_libdir}/libwxsmithlib.so
262 %{_libdir}/libcodeblocks.la
263 %{_libdir}/libwxsmithlib.la
264 %{_pkgconfigdir}/codeblocks.pc
265 %{_includedir}/codeblocks