]>
Commit | Line | Data |
---|---|---|
0bf0e321 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with gtk2 # GTK+ 2.x instead of 3.x | |
b2a2c8d3 | 4 | |
f2e658c8 | 5 | Summary: An open source, cross platform, free C++ IDE |
b4d5defa | 6 | Summary(pl.UTF-8): Wieloplatformowe, darmowe IDE do C++ o otwartych źródłach |
f2e658c8 | 7 | Name: codeblocks |
6e957b81 JR |
8 | %define snap svn13361 |
9 | Version: 20.03 | |
10 | Release: 1.%{snap}.1 | |
12d3c9b7 MB |
11 | License: GPL v3 |
12 | Group: X11/Development/Tools | |
6e957b81 JR |
13 | #Source0: http://download.sourceforge.net/codeblocks/%{name}-%{version}%{snap}.tar.xz |
14 | Source0: %{name}-%{version}%{snap}.tar.xz | |
15 | # Source0-md5: 4f856967ec38135cebc09adc8db93294 | |
9bcbe72a | 16 | Patch0: %{name}-FHS-plugins.patch |
6e957b81 | 17 | Patch1: no-parallel.patch |
12d3c9b7 | 18 | Patch2: %{name}-ac.patch |
f2e658c8 | 19 | URL: http://www.codeblocks.org/ |
0bf0e321 | 20 | BuildRequires: astyle-devel >= 3.0 |
12d3c9b7 | 21 | BuildRequires: autoconf >= 2.50 |
f2e658c8 | 22 | BuildRequires: automake |
0bf0e321 | 23 | BuildRequires: boost-devel |
12d3c9b7 | 24 | BuildRequires: bzip2-devel |
0bf0e321 | 25 | BuildRequires: fontconfig-devel |
1c7e5cba | 26 | BuildRequires: gamin-devel |
0bf0e321 JB |
27 | BuildRequires: glib2-devel >= 2.0 |
28 | %{?with_gtk2:BuildRequires: gtk+2-devel >= 1:2.0.0} | |
29 | %{!?with_gtk2:BuildRequires: gtk+3-devel >= 3.0.0} | |
30 | BuildRequires: libstdc++-devel >= 6:4.7 | |
31 | BuildRequires: libtool >= 2:2 | |
12d3c9b7 MB |
32 | BuildRequires: pkgconfig |
33 | BuildRequires: sed >= 4.0 | |
0bf0e321 JB |
34 | # pkgconfig(squirrel) |
35 | BuildRequires: squirrel-devel >= 2.2.5 | |
c4cd2d49 | 36 | BuildRequires: hunspell-devel |
26999fff | 37 | BuildRequires: unixODBC-devel |
0bf0e321 JB |
38 | BuildRequires: tar >= 1:1.22 |
39 | # pkgconfig(tinyxml) | |
40 | BuildRequires: tinyxml-devel >= 2.6.2-8 | |
41 | %{?with_gtk2:BuildRequires: wxGTK2-unicode-devel >= 2.8.12} | |
42 | %{!?with_gtk2:BuildRequires: wxGTK3-unicode-devel >= 2.8.12} | |
43 | BuildRequires: xorg-lib-libX11-devel | |
44 | BuildRequires: xz | |
f2e658c8 | 45 | BuildRequires: zip |
12d3c9b7 MB |
46 | BuildRequires: zlib-devel |
47 | Requires(post,postun): desktop-file-utils | |
b55345e5 | 48 | Requires(post,postun): gtk-update-icon-cache |
12d3c9b7 | 49 | Requires(post,postun): shared-mime-info |
f2e658c8 PS |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
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 |
6e957b81 | 149 | %setup -q -n %{name}-%{version}%{snap} |
9bcbe72a | 150 | %patch0 -p1 |
6e957b81 | 151 | %patch1 -p1 |
12d3c9b7 | 152 | %patch2 -p1 |
9bcbe72a | 153 | |
0bf0e321 | 154 | # hardcode libdir, continue of patch0 |
9bcbe72a | 155 | sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp |
156 | ||
9bcbe72a | 157 | # fix version inside the configure script |
0bf0e321 | 158 | sed -i 's/svn[0-9]\+//g' revision.m4 |
26999fff | 159 | |
12d3c9b7 | 160 | %build |
f2e658c8 | 161 | %{__libtoolize} |
0bf0e321 | 162 | %{__aclocal} -I m4 |
f2e658c8 PS |
163 | %{__autoconf} |
164 | %{__autoheader} | |
165 | %{__automake} | |
6e957b81 | 166 | #CXXFLAGS="%{rpmcxxflags} -std=c++11" |
f2e658c8 | 167 | %configure \ |
0bf0e321 JB |
168 | --with-boost-system=boost_system \ |
169 | --with-contrib-plugins=all \ | |
170 | %if %{with gtk2} | |
9bcbe72a | 171 | --with-wx-config=wx-gtk2-unicode-config \ |
0bf0e321 JB |
172 | %else |
173 | --with-wx-config=wx-gtk3-unicode-config | |
174 | %endif | |
9bcbe72a | 175 | |
f2e658c8 | 176 | %{__make} |
12d3c9b7 | 177 | |
f2e658c8 PS |
178 | %install |
179 | rm -rf $RPM_BUILD_ROOT | |
180 | ||
181 | %{__make} install \ | |
12d3c9b7 MB |
182 | DESTDIR=$RPM_BUILD_ROOT \ |
183 | mimeicondir=%{_iconsdir}/hicolor/48x48/mimetypes | |
9bcbe72a | 184 | |
0bf0e321 JB |
185 | # loadable plugins |
186 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/codeblocks/plugins/*.la | |
187 | # private libraries | |
188 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/codeblocks/wxContribItems/*.la | |
189 | # obsoleted by pkg-config | |
190 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
f2e658c8 PS |
191 | |
192 | %clean | |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
12d3c9b7 MB |
195 | %post |
196 | /sbin/ldconfig | |
197 | %update_icon_cache hicolor | |
198 | %update_desktop_database_post | |
199 | %update_mime_database | |
200 | ||
201 | %postun | |
202 | /sbin/ldconfig | |
203 | %update_icon_cache hicolor | |
204 | %update_desktop_database_postun | |
205 | %update_mime_database | |
f2e658c8 PS |
206 | |
207 | %files | |
208 | %defattr(644,root,root,755) | |
a06a8703 | 209 | %doc AUTHORS BUGS COMPILERS README TODO ChangeLog |
9bcbe72a | 210 | %attr(755,root,root) %{_bindir}/cb_share_config |
bbe47d95 | 211 | %attr(755,root,root) %{_bindir}/cb_console_runner |
e3da7901 | 212 | %attr(755,root,root) %{_bindir}/codeblocks |
12d3c9b7 MB |
213 | %attr(755,root,root) %{_libdir}/libwxsmithlib.so.*.*.* |
214 | %attr(755,root,root) %ghost %{_libdir}/libwxsmithlib.so.0 | |
215 | %attr(755,root,root) %{_libdir}/libcodeblocks.so.*.*.* | |
216 | %attr(755,root,root) %ghost %{_libdir}/libcodeblocks.so.0 | |
217 | %{_desktopdir}/codeblocks.desktop | |
0bf0e321 JB |
218 | %{_pixmapsdir}/codeblocks.png |
219 | %{_iconsdir}/hicolor/48x48/mimetypes/application-x-codeblocks*.png | |
6e957b81 JR |
220 | %{_metainfodir}/codeblocks.appdata.xml |
221 | %{_metainfodir}/codeblocks-contrib.metainfo.xml | |
bbe47d95 | 222 | %{_datadir}/mime/packages/codeblocks.xml |
7b226dae | 223 | %dir %{_datadir}/%{name} |
bbe47d95 | 224 | %dir %{_datadir}/%{name}/scripts |
9bcbe72a | 225 | %{_datadir}/%{name}/scripts/* |
7b226dae PS |
226 | %{_datadir}/%{name}/*.zip |
227 | %{_datadir}/%{name}/*.txt | |
c4cd2d49 JR |
228 | %{_datadir}/%{name}/SpellChecker |
229 | %{_datadir}/%{name}/compilers | |
7b226dae PS |
230 | %{_datadir}/%{name}/icons |
231 | %{_datadir}/%{name}/images | |
232 | %{_datadir}/%{name}/lexers | |
12d3c9b7 | 233 | %{_datadir}/%{name}/lib_finder |
7b226dae | 234 | %{_datadir}/%{name}/templates |
12d3c9b7 | 235 | %dir %{_libdir}/%{name} |
0bf0e321 JB |
236 | %dir %{_libdir}/%{name}/plugins |
237 | %attr(755,root,root) %{_libdir}/%{name}/plugins/*.so | |
c4cd2d49 | 238 | %dir %{_libdir}/%{name}/wxContribItems |
0bf0e321 JB |
239 | %attr(755,root,root) %{_libdir}/%{name}/wxContribItems/libwx*.so.* |
240 | %{_mandir}/man1/cb_console_runner.1* | |
241 | %{_mandir}/man1/cb_share_config.1* | |
242 | %{_mandir}/man1/codeblocks.1* | |
243 | %{_mandir}/man1/codesnippets.1* | |
d9b53836 AG |
244 | |
245 | %files devel | |
246 | %defattr(644,root,root,755) | |
12d3c9b7 MB |
247 | %attr(755,root,root) %{_libdir}/libcodeblocks.so |
248 | %attr(755,root,root) %{_libdir}/libwxsmithlib.so | |
0bf0e321 JB |
249 | %attr(755,root,root) %{_libdir}/%{name}/wxContribItems/libwx*.so |
250 | %{_pkgconfigdir}/cb_wx*.pc | |
9bcbe72a | 251 | %{_pkgconfigdir}/codeblocks.pc |
a5cfa761 | 252 | %{_pkgconfigdir}/wxsmith*.pc |
d9b53836 | 253 | %{_includedir}/codeblocks |
a5cfa761 | 254 | %{_includedir}/wxsmith |