]>
Commit | Line | Data |
---|---|---|
9bcbe72a | 1 | #TODO |
2 | # - snap build from svn | |
12d3c9b7 | 3 | # |
9bcbe72a | 4 | |
b2a2c8d3 | 5 | %bcond_with snap # build snap instead of release |
6 | ||
7 | %if %{with snap} | |
8 | %define _svn svn5082 | |
9 | %define _snap 20080531 | |
10 | %endif | |
11 | ||
f2e658c8 | 12 | Summary: An open source, cross platform, free C++ IDE |
b4d5defa | 13 | Summary(pl.UTF-8): Wieloplatformowe, darmowe IDE do C++ o otwartych źródłach |
f2e658c8 | 14 | Name: codeblocks |
b2a2c8d3 | 15 | %if %{with snap} |
16 | Version: 1.0 | |
17 | Release: %{_snap}%{_svn} | |
18 | %else | |
9bcbe72a | 19 | Version: 8.02 |
12d3c9b7 | 20 | Release: 1 |
b2a2c8d3 | 21 | %endif |
12d3c9b7 MB |
22 | License: GPL v3 |
23 | Group: X11/Development/Tools | |
b2a2c8d3 | 24 | %if %{with snap} |
25 | Source0: %{name}-%{_snap}.tar.gz | |
26 | %else | |
9bcbe72a | 27 | Source0: http://dl.sourceforge.net/codeblocks/%{name}-%{version}-src.tar.bz2 |
28 | # Source0-md5: ac15b4b3de50d7650c2f7a8dbcb30f88 | |
b2a2c8d3 | 29 | %endif |
9bcbe72a | 30 | Patch0: %{name}-FHS-plugins.patch |
12d3c9b7 MB |
31 | Patch1: %{name}-desktop.patch |
32 | Patch2: %{name}-ac.patch | |
f2e658c8 | 33 | URL: http://www.codeblocks.org/ |
12d3c9b7 | 34 | BuildRequires: autoconf >= 2.50 |
f2e658c8 | 35 | BuildRequires: automake |
12d3c9b7 | 36 | BuildRequires: bzip2-devel |
f2e658c8 PS |
37 | BuildRequires: dos2unix |
38 | BuildRequires: libtool | |
12d3c9b7 MB |
39 | BuildRequires: pkgconfig |
40 | BuildRequires: sed >= 4.0 | |
26999fff | 41 | BuildRequires: unixODBC-devel |
9bcbe72a | 42 | BuildRequires: wxGTK2-unicode-devel >= 2.8.0 |
f2e658c8 | 43 | BuildRequires: zip |
12d3c9b7 MB |
44 | BuildRequires: zlib-devel |
45 | Requires(post,postun): desktop-file-utils | |
46 | Requires(post,postun): gtk+2 | |
47 | Requires(post,postun): shared-mime-info | |
f2e658c8 PS |
48 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
49 | ||
74a27b01 | 50 | %define _pluginsdir %{_libdir}/%{name}/plugins |
9a4b0780 | 51 | |
f2e658c8 PS |
52 | %description |
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! | |
58 | ||
f2e658c8 | 59 | Highlights: |
12d3c9b7 | 60 | - Open Source! GPL 3, no hidden costs |
42743d1b | 61 | - Cross-platform; runs on Linux or Windows (uses wxWidgets) |
64571bfc | 62 | - Made in GNU C++; no interpreted languages or proprietary libs needed |
42743d1b | 63 | - Extensible thru plugins |
f2e658c8 PS |
64 | |
65 | Compiler-related features: | |
42743d1b JB |
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 | |
73 | - Workspaces support | |
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 | |
f2e658c8 PS |
78 | |
79 | Interface Features: | |
42743d1b JB |
80 | - Syntax highlighting, customizable and extensible |
81 | - Code folding for C++ and XML files | |
82 | - Tabbed interface | |
83 | - Code completion plugin | |
84 | - Class Browser | |
85 | - Smart indent | |
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 | |
90 | ||
95d73c87 | 91 | %description -l pl.UTF-8 |
42743d1b | 92 | Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu |
95d73c87 JR |
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ć | |
97 | własne. | |
98 | ||
99 | Główne cechy: | |
12d3c9b7 | 100 | - otwarte źródła na licencji GPL 3, bez ukrytych kosztów |
95d73c87 | 101 | - wieloplatformowość - działa na Linuksie i Windows (przy użyciu |
42743d1b | 102 | wxWidgets) |
95d73c87 JR |
103 | - stworzone w GNU C++, nie wymaga języków interpretowanych ani |
104 | własnościowych bibliotek | |
42743d1b JB |
105 | - rozszerzalne poprzez wtyczki |
106 | ||
95d73c87 JR |
107 | Cechy związane z kompilatorami: |
108 | - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital | |
42743d1b | 109 | Mars, Borland C++ 5.5, Open Watcom |
95d73c87 JR |
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 | |
42743d1b | 114 | - projekty z wieloma celami |
95d73c87 JR |
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++ | |
42743d1b | 119 | - integracja z GDB do odpluskwiania |
f2e658c8 | 120 | |
42743d1b | 121 | Cechy interfejsu: |
95d73c87 | 122 | - podświetlanie składni - konfigurowalne i rozszerzalne |
42743d1b | 123 | - zwijanie kodu w plikach C++ i XML |
95d73c87 JR |
124 | - interfejs z zakładkami |
125 | - wtyczka dopełniania kodu | |
126 | - przeglądarka klas | |
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 | |
132 | użytkowników | |
f2e658c8 | 133 | |
d9b53836 AG |
134 | %package devel |
135 | Summary: Development files for Code::Blocks | |
b4d5defa | 136 | Summary(pl.UTF-8): Pliki nagłówkowe Code::Blocks |
12d3c9b7 | 137 | Group: X11/Development/Libraries |
74a27b01 | 138 | Requires: %{name} = %{version}-%{release} |
d9b53836 AG |
139 | |
140 | %description devel | |
141 | This package provides development files for Code::Blocks. Install this | |
142 | package only if you plan to write plugins for Code::Blocks. | |
143 | ||
95d73c87 JR |
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. | |
d9b53836 | 147 | |
f2e658c8 | 148 | %prep |
b2a2c8d3 | 149 | %if %{with snap} |
150 | %setup -q -n %{name}-%{_snap} | |
151 | %else | |
12d3c9b7 | 152 | %setup -q |
b2a2c8d3 | 153 | %endif |
f2e658c8 | 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 |
b2a2c8d3 | 155 | |
9bcbe72a | 156 | %patch0 -p1 |
12d3c9b7 MB |
157 | %patch1 -p1 |
158 | %patch2 -p1 | |
9bcbe72a | 159 | |
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 | |
163 | do | |
164 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.* | |
165 | done | |
166 | ||
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 | |
170 | do | |
171 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.* | |
172 | done | |
173 | ||
174 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.* | |
175 | ||
12d3c9b7 | 176 | #hardcode libdir, continue of patch0 |
9bcbe72a | 177 | sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp |
178 | ||
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 {} ';' | |
182 | ||
183 | # fix version inside the configure script | |
12d3c9b7 | 184 | sed -i 's/1\.0svn/%{version}/g' revision.m4 |
26999fff | 185 | |
12d3c9b7 | 186 | %build |
b2a2c8d3 | 187 | %if %{with snap} |
188 | chmod a+x update_revision.sh | |
189 | ./update_revision.sh | |
12d3c9b7 | 190 | %endif |
f2e658c8 PS |
191 | %{__libtoolize} |
192 | %{__aclocal} | |
193 | %{__autoconf} | |
194 | %{__autoheader} | |
195 | %{__automake} | |
196 | %configure \ | |
9bcbe72a | 197 | --with-wx-config=wx-gtk2-unicode-config \ |
198 | --with-contrib-plugins=all | |
199 | ||
f2e658c8 | 200 | %{__make} |
12d3c9b7 | 201 | |
f2e658c8 PS |
202 | %install |
203 | rm -rf $RPM_BUILD_ROOT | |
204 | ||
205 | %{__make} install \ | |
12d3c9b7 MB |
206 | DESTDIR=$RPM_BUILD_ROOT \ |
207 | mimeicondir=%{_iconsdir}/hicolor/48x48/mimetypes | |
9bcbe72a | 208 | |
209 | rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la | |
f2e658c8 PS |
210 | |
211 | %clean | |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
12d3c9b7 MB |
214 | %post |
215 | /sbin/ldconfig | |
216 | %update_icon_cache hicolor | |
217 | %update_desktop_database_post | |
218 | %update_mime_database | |
219 | ||
220 | %postun | |
221 | /sbin/ldconfig | |
222 | %update_icon_cache hicolor | |
223 | %update_desktop_database_postun | |
224 | %update_mime_database | |
f2e658c8 PS |
225 | |
226 | %files | |
227 | %defattr(644,root,root,755) | |
a06a8703 | 228 | %doc AUTHORS BUGS COMPILERS README TODO ChangeLog |
9bcbe72a | 229 | %attr(755,root,root) %{_bindir}/cb_share_config |
f2e658c8 | 230 | %attr(755,root,root) %{_bindir}/codeblocks |
9bcbe72a | 231 | %attr(755,root,root) %{_bindir}/codesnippets |
bbe47d95 | 232 | %attr(755,root,root) %{_bindir}/cb_console_runner |
12d3c9b7 MB |
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 | |
a06a8703 | 238 | %{_pixmapsdir}/*.png |
12d3c9b7 | 239 | %{_iconsdir}/hicolor/48x48/mimetypes/*.png |
bbe47d95 | 240 | %{_datadir}/mime/packages/codeblocks.xml |
7b226dae | 241 | %dir %{_datadir}/%{name} |
bbe47d95 | 242 | %dir %{_datadir}/%{name}/scripts |
9bcbe72a | 243 | %{_datadir}/%{name}/scripts/* |
7b226dae PS |
244 | %{_datadir}/%{name}/*.zip |
245 | %{_datadir}/%{name}/*.txt | |
246 | %{_datadir}/%{name}/icons | |
247 | %{_datadir}/%{name}/images | |
248 | %{_datadir}/%{name}/lexers | |
12d3c9b7 | 249 | %{_datadir}/%{name}/lib_finder |
7b226dae | 250 | %{_datadir}/%{name}/templates |
12d3c9b7 | 251 | %dir %{_libdir}/%{name} |
9bcbe72a | 252 | %dir %{_pluginsdir} |
253 | %attr(755,root,root) %{_pluginsdir}/*.so | |
12d3c9b7 | 254 | %{_mandir}/man1/*.1* |
d9b53836 AG |
255 | |
256 | %files devel | |
257 | %defattr(644,root,root,755) | |
12d3c9b7 MB |
258 | %attr(755,root,root) %{_libdir}/libcodeblocks.so |
259 | %attr(755,root,root) %{_libdir}/libwxsmithlib.so | |
260 | %{_libdir}/libcodeblocks.la | |
261 | %{_libdir}/libwxsmithlib.la | |
9bcbe72a | 262 | %{_pkgconfigdir}/codeblocks.pc |
d9b53836 | 263 | %{_includedir}/codeblocks |