]> git.pld-linux.org Git - packages/codeblocks.git/blob - codeblocks.spec
2831fe97057cb5b567afe1d254fee04f5bd93b9e
[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 URL:            http://www.codeblocks.org/
34 BuildRequires:  autoconf >= 2.50
35 BuildRequires:  automake
36 BuildRequires:  bzip2-devel
37 BuildRequires:  dos2unix
38 BuildRequires:  libtool
39 BuildRequires:  pkgconfig
40 BuildRequires:  sed >= 4.0
41 BuildRequires:  unixODBC-devel
42 BuildRequires:  wxGTK2-unicode-devel >= 2.8.0
43 BuildRequires:  zip
44 BuildRequires:  zlib-devel
45 Requires(post,postun):  desktop-file-utils
46 Requires(post,postun):  gtk+2
47 Requires(post,postun):  shared-mime-info
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %define         _pluginsdir %{_libdir}/%{name}/plugins
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
59 Highlights:
60  - Open Source! GPL 3, no hidden costs
61  - Cross-platform; runs on Linux or Windows (uses wxWidgets)
62  - Made in GNU C++; no interpreted languages or proprietary libs needed
63  - Extensible thru plugins
64
65 Compiler-related features:
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
78
79 Interface Features:
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
91 %description -l pl.UTF-8
92 Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu
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:
100  - otwarte źródła na licencji GPL 3, bez ukrytych kosztów
101  - wieloplatformowość - działa na Linuksie i Windows (przy użyciu
102    wxWidgets)
103  - stworzone w GNU C++, nie wymaga języków interpretowanych ani
104    własnościowych bibliotek
105  - rozszerzalne poprzez wtyczki
106
107 Cechy związane z kompilatorami:
108  - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital
109    Mars, Borland C++ 5.5, Open Watcom
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
114  - projekty z wieloma celami
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++
119  - integracja z GDB do odpluskwiania
120
121 Cechy interfejsu:
122  - podświetlanie składni - konfigurowalne i rozszerzalne
123  - zwijanie kodu w plikach C++ i XML
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
133
134 %package devel
135 Summary:        Development files for Code::Blocks
136 Summary(pl.UTF-8):      Pliki nagłówkowe Code::Blocks
137 Group:          X11/Development/Libraries
138 Requires:       %{name} = %{version}-%{release}
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
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.
147
148 %prep
149 %if %{with snap}
150 %setup -q -n %{name}-%{_snap}
151 %else
152 %setup -q
153 %endif
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
155
156 %patch0 -p1
157 %patch1 -p1
158 %patch2 -p1
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
176 #hardcode libdir, continue of patch0
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
184 sed -i 's/1\.0svn/%{version}/g' revision.m4
185
186 %build
187 %if %{with snap}
188 chmod a+x update_revision.sh
189 ./update_revision.sh
190 %endif
191 %{__libtoolize}
192 %{__aclocal}
193 %{__autoconf}
194 %{__autoheader}
195 %{__automake}
196 %configure \
197         --with-wx-config=wx-gtk2-unicode-config \
198         --with-contrib-plugins=all
199
200 %{__make}
201
202 %install
203 rm -rf $RPM_BUILD_ROOT
204
205 %{__make} install \
206         DESTDIR=$RPM_BUILD_ROOT \
207         mimeicondir=%{_iconsdir}/hicolor/48x48/mimetypes
208
209 rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la
210
211 %clean
212 rm -rf $RPM_BUILD_ROOT
213
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
225
226 %files
227 %defattr(644,root,root,755)
228 %doc AUTHORS BUGS COMPILERS README TODO ChangeLog
229 %attr(755,root,root) %{_bindir}/cb_share_config
230 %attr(755,root,root) %{_bindir}/codeblocks
231 %attr(755,root,root) %{_bindir}/codesnippets
232 %attr(755,root,root) %{_bindir}/cb_console_runner
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
238 %{_pixmapsdir}/*.png
239 %{_iconsdir}/hicolor/48x48/mimetypes/*.png
240 %{_datadir}/mime/packages/codeblocks.xml
241 %dir %{_datadir}/%{name}
242 %dir %{_datadir}/%{name}/scripts
243 %{_datadir}/%{name}/scripts/*
244 %{_datadir}/%{name}/*.zip
245 %{_datadir}/%{name}/*.txt
246 %{_datadir}/%{name}/icons
247 %{_datadir}/%{name}/images
248 %{_datadir}/%{name}/lexers
249 %{_datadir}/%{name}/lib_finder
250 %{_datadir}/%{name}/templates
251 %dir %{_libdir}/%{name}
252 %dir %{_pluginsdir}
253 %attr(755,root,root) %{_pluginsdir}/*.so
254 %{_mandir}/man1/*.1*
255
256 %files devel
257 %defattr(644,root,root,755)
258 %attr(755,root,root) %{_libdir}/libcodeblocks.so
259 %attr(755,root,root) %{_libdir}/libwxsmithlib.so
260 %{_libdir}/libcodeblocks.la
261 %{_libdir}/libwxsmithlib.la
262 %{_pkgconfigdir}/codeblocks.pc
263 %{_includedir}/codeblocks
This page took 0.116411 seconds and 2 git commands to generate.