2 # - snap build from svn
3 # - review remains patches and Source1
6 ##%define _snap 20060721
7 Summary: An open source, cross platform, free C++ IDE
8 Summary(pl.UTF-8): Wieloplatformowe, darmowe IDE do C++ o otwartych źródłach
14 Group: Development/Languages
15 #Source0: %{name}-%{_snap}.tar.gz
16 Source0: http://dl.sourceforge.net/codeblocks/%{name}-%{version}-src.tar.bz2
17 # Source0-md5: ac15b4b3de50d7650c2f7a8dbcb30f88
18 Patch0: %{name}-FHS-plugins.patch
19 #Source1: %{name}.conf
20 #Patch0: %{name}-ac.patch
21 #Patch3: %{name}-gcc-4.1.patch
22 URL: http://www.codeblocks.org/
23 BuildRequires: autoconf
24 BuildRequires: automake
25 BuildRequires: dos2unix
26 BuildRequires: libtool
27 BuildRequires: unixODBC-devel
28 BuildRequires: wxGTK2-unicode-devel >= 2.8.0
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _pluginsdir %{_libdir}/%{name}/plugins
35 Code::Blocks is a free C++ IDE built specifically to meet the most
36 demanding needs of its users. It was designed, right from the start,
37 to be extensible and configurable. Built around a plugin framework,
38 Code::Blocks can be extended with plugin DLLs. It includes a plugin
39 wizard so you can compile your own plugins!
42 - Open Source! GPL 2, no hidden costs
43 - Cross-platform; runs on Linux or Windows (uses wxWidgets)
44 - Made in GNU C++; no interpreted languages or proprietary libs needed
45 - Extensible thru plugins
47 Compiler-related features:
48 - Multiple compiler support: GCC (MingW / Linux), MSVC++, Digital
49 Mars, Borland C++ 5.5, Open Watcom
50 - Compiles directly or with makefiles
51 - Predefined project templates
52 - Custom template support
53 - Uses XML format for project files
54 - Multi-target projects
56 - Imports MSVC projects and workspaces (NOTE: assembly code and
57 inter-project dependencies not supported yet)
58 - Imports Dev-C++ projects
59 - Integrates with GDB for debugging
62 - Syntax highlighting, customizable and extensible
63 - Code folding for C++ and XML files
65 - Code completion plugin
68 - One-key swap between .h and .c/.cpp files
69 - Open files list for quick switching between files (optional)
70 - External customizable "Tools"
71 - To-do list management with different users
73 %description -l pl.UTF-8
74 Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu
75 zaspokojenia największych potrzeb swoich użytkowników. Zostało
76 zaprojektowane od początku aby było rozszerzalne i konfigurowalne.
77 Code::Blocks, jako zbudowane w oparciu o szkielet wtyczek, można
78 rozszerzać. Zawiera czarodzieja dla wtyczek, więc można kompilować
82 - otwarte źródła na licencji GPL 2, bez ukrytych kosztów
83 - wieloplatformowość - działa na Linuksie i Windows (przy użyciu
85 - stworzone w GNU C++, nie wymaga języków interpretowanych ani
86 własnościowych bibliotek
87 - rozszerzalne poprzez wtyczki
89 Cechy związane z kompilatorami:
90 - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital
91 Mars, Borland C++ 5.5, Open Watcom
92 - kompiluje bezpośrednio lub z użyciem plików Makefile
93 - predefiniowane szablony projektów
94 - obsługa własnych szablonów
95 - używa formatu XML dla plików projektów
96 - projekty z wieloma celami
97 - obsługa przestrzeni zadań (workspace)
98 - import projektów i przestrzeni zadań MSVC (uwaga: kdo w asemblerze i
99 zależności między projektami nie są jeszcze obsługiwane)
100 - import projektów Dev-C++
101 - integracja z GDB do odpluskwiania
104 - podświetlanie składni - konfigurowalne i rozszerzalne
105 - zwijanie kodu w plikach C++ i XML
106 - interfejs z zakładkami
107 - wtyczka dopełniania kodu
109 - inteligentne wcięcia
110 - przełączanie jednym klawiszem między plikami .h i .c/.cpp
111 - lista otwartych plików do szybkiego przełączania między nimi (opcja)
112 - zewnętrzne, konfigurowalne "narzędzia"
113 - zarządzanie listą rzeczy do zrobienia ("To-do") przez różnych
117 Summary: Development files for Code::Blocks
118 Summary(pl.UTF-8): Pliki nagłówkowe Code::Blocks
119 Group: Development/Libraries
120 Requires: %{name} = %{version}-%{release}
123 This package provides development files for Code::Blocks. Install this
124 package only if you plan to write plugins for Code::Blocks.
126 %description devel -l pl.UTF-8
127 Ten pakiet dostarcza plików nagłówkowych Code::Blocks. Należy
128 instalować ten pakiet tylko w celu pisania wtyczek do Code::Blocks.
131 %setup -q -n %{name}-%{version}
132 #%setup -q -n %{name}-%{_snap}
133 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
134 chmod a+x acinclude.m4 src/update configure
141 # fix the dir, where plugins are installed
142 for p in astyle autosave classwizard codecompletion compilergcc debuggergdb \
143 defaultmimehandler openfileslist projectsimporter scriptedwizard todo xpmanifest
145 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.*
148 for p in AutoVersioning BrowseTracker ThreadSearch byogames cb_koders \
149 codesnippets codestat dragscroll envvars help_plugin keybinder lib_finder \
150 profiler regex_testbed source_exporter symtab wxSmith wxSmithContribItems
152 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.*
155 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.*
157 #hardcode libdir, continue of patch0
158 sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp
160 # remove execute bits from source files
161 find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
162 find src/plugins/compilergcc -type f -exec chmod a-x {} ';'
164 # fix version inside the configure script
165 sed -i 's/1\.0svn/%{version}/g' configure
167 # Because of new bootstrap script, crating revision.m4
168 echo "m4_define([SVN_REVISION], trunk-r0)" > ./revision.m4
176 --with-wx-config=wx-gtk2-unicode-config \
177 --with-contrib-plugins=all
181 rm -rf $RPM_BUILD_ROOT
183 install -d $RPM_BUILD_ROOT%{_sysconfdir}
185 DESTDIR=$RPM_BUILD_ROOT
187 rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la
190 rm -rf $RPM_BUILD_ROOT
192 %post -p /sbin/ldconfig
193 %postun -p /sbin/ldconfig
196 %defattr(644,root,root,755)
197 %doc AUTHORS BUGS COMPILERS README TODO ChangeLog
198 %attr(755,root,root) %{_bindir}/cb_share_config
199 %attr(755,root,root) %{_bindir}/codeblocks
200 %attr(755,root,root) %{_bindir}/codesnippets
201 %attr(755,root,root) %{_bindir}/cb_console_runner
202 %attr(755,root,root) %{_libdir}/libwxsmithlib.so*
203 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
204 %{_desktopdir}/*.desktop
206 %{_iconsdir}/gnome/48x48/mimetypes/*.png
207 #%{_datadir}/application-registry/codeblocks.applications
208 %{_datadir}/mime/packages/codeblocks.xml
209 #%{_datadir}/mime-info/codeblocks*
210 %dir %{_datadir}/%{name}
211 %dir %{_datadir}/%{name}/scripts
212 %{_datadir}/%{name}/scripts/*
213 %{_datadir}/%{name}/*.zip
214 %{_datadir}/%{name}/*.txt
215 %{_datadir}/%{name}/icons
216 %{_datadir}/%{name}/images
217 %{_datadir}/%{name}/lexers
218 %{_datadir}/%{name}/templates
220 %attr(755,root,root) %{_pluginsdir}/*.so
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/lib%{name}.so*
226 %{_pkgconfigdir}/codeblocks.pc
228 %{_includedir}/codeblocks