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