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