]> git.pld-linux.org Git - packages/codeblocks.git/blob - codeblocks.spec
- re-added -pwd.patch
[packages/codeblocks.git] / codeblocks.spec
1 #TODO
2 #       - snap build from svn
3 #
4
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
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
14 Name:           codeblocks
15 %if %{with snap}
16 Version:        1.0
17 Release:        %{_snap}%{_svn}
18 %else
19 Version:        8.02
20 Release:        1
21 %endif
22 License:        GPL v3
23 Group:          X11/Development/Tools
24 %if %{with snap}
25 Source0:        %{name}-%{_snap}.tar.gz
26 %else
27 Source0:        http://dl.sourceforge.net/codeblocks/%{name}-%{version}-src.tar.bz2
28 # Source0-md5:  ac15b4b3de50d7650c2f7a8dbcb30f88
29 %endif
30 Patch0:         %{name}-FHS-plugins.patch
31 Patch1:         %{name}-desktop.patch
32 Patch2:         %{name}-ac.patch
33 Patch3:         %{name}-pwd.patch
34 URL:            http://www.codeblocks.org/
35 BuildRequires:  autoconf >= 2.50
36 BuildRequires:  automake
37 BuildRequires:  bzip2-devel
38 BuildRequires:  dos2unix
39 BuildRequires:  libtool
40 BuildRequires:  pkgconfig
41 BuildRequires:  sed >= 4.0
42 BuildRequires:  unixODBC-devel
43 BuildRequires:  wxGTK2-unicode-devel >= 2.8.0
44 BuildRequires:  zip
45 BuildRequires:  zlib-devel
46 Requires(post,postun):  desktop-file-utils
47 Requires(post,postun):  gtk+2
48 Requires(post,postun):  shared-mime-info
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         _pluginsdir %{_libdir}/%{name}/plugins
52
53 %description
54 Code::Blocks is a free C++ IDE built specifically to meet the most
55 demanding needs of its users. It was designed, right from the start,
56 to be extensible and configurable. Built around a plugin framework,
57 Code::Blocks can be extended with plugin DLLs. It includes a plugin
58 wizard so you can compile your own plugins!
59
60 Highlights:
61  - Open Source! GPL 3, no hidden costs
62  - Cross-platform; runs on Linux or Windows (uses wxWidgets)
63  - Made in GNU C++; no interpreted languages or proprietary libs needed
64  - Extensible thru plugins
65
66 Compiler-related features:
67  - Multiple compiler support: GCC (MingW / Linux), MSVC++, Digital
68    Mars, Borland C++ 5.5, Open Watcom
69  - Compiles directly or with makefiles
70  - Predefined project templates
71  - Custom template support
72  - Uses XML format for project files
73  - Multi-target projects
74  - Workspaces support
75  - Imports MSVC projects and workspaces (NOTE: assembly code and
76    inter-project dependencies not supported yet)
77  - Imports Dev-C++ projects
78  - Integrates with GDB for debugging
79
80 Interface Features:
81  - Syntax highlighting, customizable and extensible
82  - Code folding for C++ and XML files
83  - Tabbed interface
84  - Code completion plugin
85  - Class Browser
86  - Smart indent
87  - One-key swap between .h and .c/.cpp files
88  - Open files list for quick switching between files (optional)
89  - External customizable "Tools"
90  - To-do list management with different users
91
92 %description -l pl.UTF-8
93 Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu
94 zaspokojenia największych potrzeb swoich użytkowników. Zostało
95 zaprojektowane od początku aby było rozszerzalne i konfigurowalne.
96 Code::Blocks, jako zbudowane w oparciu o szkielet wtyczek, można
97 rozszerzać. Zawiera czarodzieja dla wtyczek, więc można kompilować
98 własne.
99
100 Główne cechy:
101  - otwarte źródła na licencji GPL 3, bez ukrytych kosztów
102  - wieloplatformowość - działa na Linuksie i Windows (przy użyciu
103    wxWidgets)
104  - stworzone w GNU C++, nie wymaga języków interpretowanych ani
105    własnościowych bibliotek
106  - rozszerzalne poprzez wtyczki
107
108 Cechy związane z kompilatorami:
109  - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital
110    Mars, Borland C++ 5.5, Open Watcom
111  - kompiluje bezpośrednio lub z użyciem plików Makefile
112  - predefiniowane szablony projektów
113  - obsługa własnych szablonów
114  - używa formatu XML dla plików projektów
115  - projekty z wieloma celami
116  - obsługa przestrzeni zadań (workspace)
117  - import projektów i przestrzeni zadań MSVC (uwaga: kdo w asemblerze i
118    zależności między projektami nie są jeszcze obsługiwane)
119  - import projektów Dev-C++
120  - integracja z GDB do odpluskwiania
121
122 Cechy interfejsu:
123  - podświetlanie składni - konfigurowalne i rozszerzalne
124  - zwijanie kodu w plikach C++ i XML
125  - interfejs z zakładkami
126  - wtyczka dopełniania kodu
127  - przeglądarka klas
128  - inteligentne wcięcia
129  - przełączanie jednym klawiszem między plikami .h i .c/.cpp
130  - lista otwartych plików do szybkiego przełączania między nimi (opcja)
131  - zewnętrzne, konfigurowalne "narzędzia"
132  - zarządzanie listą rzeczy do zrobienia ("To-do") przez różnych
133    użytkowników
134
135 %package devel
136 Summary:        Development files for Code::Blocks
137 Summary(pl.UTF-8):      Pliki nagłówkowe Code::Blocks
138 Group:          X11/Development/Libraries
139 Requires:       %{name} = %{version}-%{release}
140
141 %description devel
142 This package provides development files for Code::Blocks. Install this
143 package only if you plan to write plugins for Code::Blocks.
144
145 %description devel -l pl.UTF-8
146 Ten pakiet dostarcza plików nagłówkowych Code::Blocks. Należy
147 instalować ten pakiet tylko w celu pisania wtyczek do Code::Blocks.
148
149 %prep
150 %if %{with snap}
151 %setup -q -n %{name}-%{_snap}
152 %else
153 %setup -q
154 %endif
155 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
156
157 %patch0 -p1
158 %patch1 -p1
159 %patch2 -p1
160 %patch3 -p1
161
162 # fix the dir, where plugins are installed
163 for p in astyle autosave classwizard codecompletion compilergcc debuggergdb \
164 defaultmimehandler openfileslist projectsimporter scriptedwizard todo xpmanifest
165 do
166         sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/$p/Makefile.*
167 done
168
169 for p in AutoVersioning BrowseTracker ThreadSearch byogames cb_koders \
170 codesnippets codestat dragscroll envvars help_plugin keybinder lib_finder \
171 profiler regex_testbed source_exporter symtab wxSmith wxSmithContribItems
172 do
173         sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/$p/Makefile.*
174 done
175
176 sed -i 's|$(pkgdatadir)/plugins|@libdir@/@PACKAGE@/plugins|' src/plugins/contrib/wxSmith/plugin/Makefile.*
177
178 #hardcode libdir, continue of patch0
179 sed -i 's|@libdir@|%{_libdir}|' src/sdk/configmanager.cpp
180
181 # remove execute bits from source files
182 find src/plugins/contrib/regex_testbed -type f -exec chmod a-x {} ';'
183 find src/plugins/compilergcc -type f -exec chmod a-x {} ';'
184
185 # fix version inside the configure script
186 sed -i 's/1\.0svn/%{version}/g' revision.m4
187
188 %build
189 %if %{with snap}
190 chmod a+x update_revision.sh
191 ./update_revision.sh
192 %endif
193 %{__libtoolize}
194 %{__aclocal}
195 %{__autoconf}
196 %{__autoheader}
197 %{__automake}
198 %configure \
199         --with-wx-config=wx-gtk2-unicode-config \
200         --with-contrib-plugins=all
201
202 %{__make}
203
204 %install
205 rm -rf $RPM_BUILD_ROOT
206
207 %{__make} install \
208         DESTDIR=$RPM_BUILD_ROOT \
209         mimeicondir=%{_iconsdir}/hicolor/48x48/mimetypes
210
211 rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %post
217 /sbin/ldconfig
218 %update_icon_cache hicolor
219 %update_desktop_database_post
220 %update_mime_database
221
222 %postun
223 /sbin/ldconfig
224 %update_icon_cache hicolor
225 %update_desktop_database_postun
226 %update_mime_database
227
228 %files
229 %defattr(644,root,root,755)
230 %doc AUTHORS BUGS COMPILERS README TODO ChangeLog
231 %attr(755,root,root) %{_bindir}/cb_share_config
232 %attr(755,root,root) %{_bindir}/codeblocks
233 %attr(755,root,root) %{_bindir}/codesnippets
234 %attr(755,root,root) %{_bindir}/cb_console_runner
235 %attr(755,root,root) %{_libdir}/libwxsmithlib.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libwxsmithlib.so.0
237 %attr(755,root,root) %{_libdir}/libcodeblocks.so.*.*.*
238 %attr(755,root,root) %ghost %{_libdir}/libcodeblocks.so.0
239 %{_desktopdir}/codeblocks.desktop
240 %{_pixmapsdir}/*.png
241 %{_iconsdir}/hicolor/48x48/mimetypes/*.png
242 %{_datadir}/mime/packages/codeblocks.xml
243 %dir %{_datadir}/%{name}
244 %dir %{_datadir}/%{name}/scripts
245 %{_datadir}/%{name}/scripts/*
246 %{_datadir}/%{name}/*.zip
247 %{_datadir}/%{name}/*.txt
248 %{_datadir}/%{name}/icons
249 %{_datadir}/%{name}/images
250 %{_datadir}/%{name}/lexers
251 %{_datadir}/%{name}/lib_finder
252 %{_datadir}/%{name}/templates
253 %dir %{_libdir}/%{name}
254 %dir %{_pluginsdir}
255 %attr(755,root,root) %{_pluginsdir}/*.so
256 %{_mandir}/man1/*.1*
257
258 %files devel
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_libdir}/libcodeblocks.so
261 %attr(755,root,root) %{_libdir}/libwxsmithlib.so
262 %{_libdir}/libcodeblocks.la
263 %{_libdir}/libwxsmithlib.la
264 %{_pkgconfigdir}/codeblocks.pc
265 %{_includedir}/codeblocks
This page took 0.061531 seconds and 3 git commands to generate.