]> git.pld-linux.org Git - packages/codeblocks.git/blob - codeblocks.spec
- added snap bcond
[packages/codeblocks.git] / codeblocks.spec
1 #TODO
2 #       - snap build from svn
3 #       - review remains patches and Source1
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:        0.1
21 %endif
22 License:        GPL
23 Group:          Development/Languages
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 #Source1:       %{name}.conf
32 #Patch0:                %{name}-ac.patch
33 #Patch3:                %{name}-gcc-4.1.patch
34 URL:            http://www.codeblocks.org/
35 BuildRequires:  autoconf
36 BuildRequires:  automake
37 BuildRequires:  dos2unix
38 BuildRequires:  libtool
39 BuildRequires:  unixODBC-devel
40 BuildRequires:  wxGTK2-unicode-devel >= 2.8.0
41 BuildRequires:  zip
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _pluginsdir %{_libdir}/%{name}/plugins
45
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
53 Highlights:
54  - Open Source! GPL 2, no hidden costs
55  - Cross-platform; runs on Linux or Windows (uses wxWidgets)
56  - Made in GNU C++; no interpreted languages or proprietary libs needed
57  - Extensible thru plugins
58
59 Compiler-related features:
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
72
73 Interface Features:
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
85 %description -l pl.UTF-8
86 Code::Blocks to darmowe IDE dla C++ tworzone specjalnie w celu
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
96    wxWidgets)
97  - stworzone w GNU C++, nie wymaga języków interpretowanych ani
98    własnościowych bibliotek
99  - rozszerzalne poprzez wtyczki
100
101 Cechy związane z kompilatorami:
102  - obsługa wielu kompilatorów: GCC (MingW / Linux), MSVC++, Digital
103    Mars, Borland C++ 5.5, Open Watcom
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
108  - projekty z wieloma celami
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++
113  - integracja z GDB do odpluskwiania
114
115 Cechy interfejsu:
116  - podświetlanie składni - konfigurowalne i rozszerzalne
117  - zwijanie kodu w plikach C++ i XML
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
127
128 %package devel
129 Summary:        Development files for Code::Blocks
130 Summary(pl.UTF-8):      Pliki nagłówkowe Code::Blocks
131 Group:          Development/Libraries
132 Requires:       %{name} = %{version}-%{release}
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
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.
141
142 %prep
143 %if %{with snap}
144 %setup -q -n %{name}-%{_snap}
145 %else
146 %setup -q -n %{name}-%{version}
147 %endif
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
149
150 %if %{without snap}
151 chmod -f a+x acinclude.m4 src/update configure
152 %endif
153
154 %patch0 -p1
155 #%patch1 -p1
156 #%patch2 -p1
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
183 #sed -i 's/1\.0svn/%{version}/g' configure
184
185 %if %{with snap}
186 chmod a+x update_revision.sh
187 ./update_revision.sh
188 %{__libtoolize}
189 %{__aclocal}
190 %{__autoconf}
191 %{__autoheader}
192 %{__automake}
193 %else
194 # fix version inside the configure script
195 sed -i 's/1\.0svn/%{version}/g' configure
196 %endif
197 %configure \
198         --with-wx-config=wx-gtk2-unicode-config \
199         --with-contrib-plugins=all
200
201 %{__make}
202 %install
203 rm -rf $RPM_BUILD_ROOT
204
205 install -d $RPM_BUILD_ROOT%{_sysconfdir}
206 %{__make} install \
207         DESTDIR=$RPM_BUILD_ROOT
208
209 rm -f $RPM_BUILD_ROOT%{_pluginsdir}/*.la
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)
219 %doc AUTHORS BUGS COMPILERS README TODO ChangeLog
220 %attr(755,root,root) %{_bindir}/cb_share_config
221 %attr(755,root,root) %{_bindir}/codeblocks
222 %attr(755,root,root) %{_bindir}/codesnippets
223 %attr(755,root,root) %{_bindir}/cb_console_runner
224 %attr(755,root,root) %{_libdir}/libwxsmithlib.so*
225 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
226 %{_desktopdir}/*.desktop
227 %{_pixmapsdir}/*.png
228 %{_iconsdir}/gnome/48x48/mimetypes/*.png
229 #%{_datadir}/application-registry/codeblocks.applications
230 %{_datadir}/mime/packages/codeblocks.xml
231 #%{_datadir}/mime-info/codeblocks*
232 %dir %{_datadir}/%{name}
233 %dir %{_datadir}/%{name}/scripts
234 %{_datadir}/%{name}/scripts/*
235 %{_datadir}/%{name}/*.zip
236 %{_datadir}/%{name}/*.txt
237 %{_datadir}/%{name}/icons
238 %{_datadir}/%{name}/images
239 %{_datadir}/%{name}/lexers
240 %{_datadir}/%{name}/templates
241 %dir %{_pluginsdir}
242 %attr(755,root,root) %{_pluginsdir}/*.so
243 %{_mandir}/man1/*
244
245 %files devel
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/lib%{name}.so*
248 %{_pkgconfigdir}/codeblocks.pc
249 %{_libdir}/*.la
250 %{_includedir}/codeblocks
This page took 0.042317 seconds and 4 git commands to generate.