]>
Commit | Line | Data |
---|---|---|
9bcbe72a | 1 | #TODO |
2 | # - snap build from svn | |
3 | # - review remains patches and Source1 | |
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 |
20 | Release: 0.1 | |
b2a2c8d3 | 21 | %endif |
f2e658c8 PS |
22 | License: GPL |
23 | Group: Development/Languages | |
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 |
31 | #Source1: %{name}.conf | |
32 | #Patch0: %{name}-ac.patch | |
33 | #Patch3: %{name}-gcc-4.1.patch | |
f2e658c8 PS |
34 | URL: http://www.codeblocks.org/ |
35 | BuildRequires: autoconf | |
36 | BuildRequires: automake | |
37 | BuildRequires: dos2unix | |
38 | BuildRequires: libtool | |
26999fff | 39 | BuildRequires: unixODBC-devel |
9bcbe72a | 40 | BuildRequires: wxGTK2-unicode-devel >= 2.8.0 |
f2e658c8 PS |
41 | BuildRequires: zip |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
74a27b01 | 44 | %define _pluginsdir %{_libdir}/%{name}/plugins |
9a4b0780 | 45 | |
f2e658c8 PS |
46 | %description |
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! | |
52 | ||
f2e658c8 | 53 | Highlights: |
42743d1b JB |
54 | - Open Source! GPL 2, no hidden costs |
55 | - Cross-platform; runs on Linux or Windows (uses wxWidgets) | |
64571bfc | 56 | - Made in GNU C++; no interpreted languages or proprietary libs needed |
42743d1b | 57 | - Extensible thru plugins |
f2e658c8 PS |
58 | |
59 | Compiler-related features: | |
42743d1b JB |
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 | |
67 | - Workspaces support | |
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 | |
f2e658c8 PS |
72 | |
73 | Interface Features: | |
42743d1b JB |
74 | - Syntax highlighting, customizable and extensible |
75 | - Code folding for C++ and XML files | |
76 | - Tabbed interface | |
77 | - Code completion plugin | |
78 | - Class Browser | |
79 | - Smart indent | |
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 | |
84 | ||
95d73c87 | 85 | %description -l pl.UTF-8 |
42743d1b | 86 | Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu |
95d73c87 JR |
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ć | |
91 | własne. | |
92 | ||
93 | Główne cechy: | |
94 | - otwarte źródła na licencji GPL 2, bez ukrytych kosztów | |
95 | - wieloplatformowość - działa na Linuksie i Windows (przy użyciu | |
42743d1b | 96 | wxWidgets) |
95d73c87 JR |
97 | - stworzone w GNU C++, nie wymaga języków interpretowanych ani |
98 | własnościowych bibliotek | |
42743d1b JB |
99 | - rozszerzalne poprzez wtyczki |
100 | ||
95d73c87 JR |
101 | Cechy związane z kompilatorami: |
102 | - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital | |
42743d1b | 103 | Mars, Borland C++ 5.5, Open Watcom |
95d73c87 JR |
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 | |
42743d1b | 108 | - projekty z wieloma celami |
95d73c87 JR |
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++ | |
42743d1b | 113 | - integracja z GDB do odpluskwiania |
f2e658c8 | 114 | |
42743d1b | 115 | Cechy interfejsu: |
95d73c87 | 116 | - podświetlanie składni - konfigurowalne i rozszerzalne |
42743d1b | 117 | - zwijanie kodu w plikach C++ i XML |
95d73c87 JR |
118 | - interfejs z zakładkami |
119 | - wtyczka dopełniania kodu | |
120 | - przeglądarka klas | |
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 | |
126 | użytkowników | |
f2e658c8 | 127 | |
d9b53836 AG |
128 | %package devel |
129 | Summary: Development files for Code::Blocks | |
b4d5defa | 130 | Summary(pl.UTF-8): Pliki nagłówkowe Code::Blocks |
d9b53836 | 131 | Group: Development/Libraries |
74a27b01 | 132 | Requires: %{name} = %{version}-%{release} |
d9b53836 AG |
133 | |
134 | %description devel | |
135 | This package provides development files for Code::Blocks. Install this | |
136 | package only if you plan to write plugins for Code::Blocks. | |
137 | ||
95d73c87 JR |
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. | |
d9b53836 | 141 | |
f2e658c8 | 142 | %prep |
b2a2c8d3 | 143 | %if %{with snap} |
144 | %setup -q -n %{name}-%{_snap} | |
145 | %else | |
9bcbe72a | 146 | %setup -q -n %{name}-%{version} |
b2a2c8d3 | 147 | %endif |
f2e658c8 | 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 |
b2a2c8d3 | 149 | |
150 | %if %{without snap} | |
151 | chmod -f a+x acinclude.m4 src/update configure | |
152 | %endif | |
9bcbe72a | 153 | |
154 | %patch0 -p1 | |
bbe47d95 | 155 | #%patch1 -p1 |
26999fff | 156 | #%patch2 -p1 |
9bcbe72a | 157 | #%patch3 -p0 |
158 | ||
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 | |
162 | do | |
163 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.* | |
164 | done | |
165 | ||
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 | |
169 | do | |
170 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.* | |
171 | done | |
172 | ||
173 | sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.* | |
174 | ||
175 | #hardcode libdir, continue of patch0 | |
176 | sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp | |
177 | ||
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 {} ';' | |
181 | ||
182 | # fix version inside the configure script | |
b2a2c8d3 | 183 | #sed -i 's/1\.0svn/%{version}/g' configure |
26999fff | 184 | |
b2a2c8d3 | 185 | %if %{with snap} |
186 | chmod a+x update_revision.sh | |
187 | ./update_revision.sh | |
f2e658c8 PS |
188 | %{__libtoolize} |
189 | %{__aclocal} | |
190 | %{__autoconf} | |
191 | %{__autoheader} | |
192 | %{__automake} | |
b2a2c8d3 | 193 | %else |
194 | # fix version inside the configure script | |
195 | sed -i 's/1\.0svn/%{version}/g' configure | |
196 | %endif | |
f2e658c8 | 197 | %configure \ |
9bcbe72a | 198 | --with-wx-config=wx-gtk2-unicode-config \ |
199 | --with-contrib-plugins=all | |
200 | ||
f2e658c8 | 201 | %{__make} |
f2e658c8 PS |
202 | %install |
203 | rm -rf $RPM_BUILD_ROOT | |
204 | ||
64571bfc | 205 | install -d $RPM_BUILD_ROOT%{_sysconfdir} |
f2e658c8 PS |
206 | %{__make} install \ |
207 | DESTDIR=$RPM_BUILD_ROOT | |
9bcbe72a | 208 | |
209 | rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la | |
f2e658c8 PS |
210 | |
211 | %clean | |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
214 | %post -p /sbin/ldconfig | |
215 | %postun -p /sbin/ldconfig | |
216 | ||
217 | %files | |
218 | %defattr(644,root,root,755) | |
a06a8703 | 219 | %doc AUTHORS BUGS COMPILERS README TODO ChangeLog |
9bcbe72a | 220 | %attr(755,root,root) %{_bindir}/cb_share_config |
f2e658c8 | 221 | %attr(755,root,root) %{_bindir}/codeblocks |
9bcbe72a | 222 | %attr(755,root,root) %{_bindir}/codesnippets |
bbe47d95 | 223 | %attr(755,root,root) %{_bindir}/cb_console_runner |
9bcbe72a | 224 | %attr(755,root,root) %{_libdir}/libwxsmithlib.so* |
f2e658c8 | 225 | %attr(755,root,root) %{_libdir}/lib*.so.*.*.* |
7b226dae | 226 | %{_desktopdir}/*.desktop |
a06a8703 | 227 | %{_pixmapsdir}/*.png |
eb62139c | 228 | %{_iconsdir}/gnome/48x48/mimetypes/*.png |
9bcbe72a | 229 | #%{_datadir}/application-registry/codeblocks.applications |
bbe47d95 | 230 | %{_datadir}/mime/packages/codeblocks.xml |
9bcbe72a | 231 | #%{_datadir}/mime-info/codeblocks* |
7b226dae | 232 | %dir %{_datadir}/%{name} |
bbe47d95 | 233 | %dir %{_datadir}/%{name}/scripts |
9bcbe72a | 234 | %{_datadir}/%{name}/scripts/* |
7b226dae PS |
235 | %{_datadir}/%{name}/*.zip |
236 | %{_datadir}/%{name}/*.txt | |
237 | %{_datadir}/%{name}/icons | |
238 | %{_datadir}/%{name}/images | |
239 | %{_datadir}/%{name}/lexers | |
240 | %{_datadir}/%{name}/templates | |
9bcbe72a | 241 | %dir %{_pluginsdir} |
242 | %attr(755,root,root) %{_pluginsdir}/*.so | |
d9b53836 AG |
243 | %{_mandir}/man1/* |
244 | ||
245 | %files devel | |
246 | %defattr(644,root,root,755) | |
9bcbe72a | 247 | %attr(755,root,root) %{_libdir}/lib%{name}.so* |
248 | %{_pkgconfigdir}/codeblocks.pc | |
d9b53836 AG |
249 | %{_libdir}/*.la |
250 | %{_includedir}/codeblocks |