da1add0c86e01f062a74cdf76e604cffe08ca1df
[packages/eclipse.git] / eclipse.spec
1 # TODO:
2 # - make use of eclipse-swt package
3
4 %define         ver_major       3.3.1.1
5 %define         buildid 200710231652
6 Summary:        Eclipse - an open extensible IDE
7 Summary(pl.UTF-8):      Eclipse - otwarte, rozszerzalne środowisko programistyczne
8 Name:           eclipse
9 Version:        %{ver_major}
10 Release:        3
11 License:        EPL v1.0
12 Group:          Development/Tools
13 Source0:        http://download.eclipse.org/eclipse/downloads/drops/R-%{ver_major}-%{buildid}/%{name}-sourceBuild-srcIncluded-%{version}.zip
14 # Source0-md5:  593b56fce7d1f1f799e87365cafefbef
15 Source1:        %{name}.desktop
16 Patch0:         %{name}-launcher-set-install-dir-and-shared-config.patch
17 Patch1:         %{name}-launcher-double-free-bug.patch
18 URL:            http://www.eclipse.org/
19 BuildRequires:  ant >= 1.6.1
20 BuildRequires:  ant-apache-regexp
21 BuildRequires:  jdk >= 1.6
22 BuildRequires:  pkgconfig
23 BuildRequires:  rpm-pythonprov
24 BuildRequires:  rpmbuild(macros) >= 1.300
25 BuildRequires:  sed >= 4.0
26 BuildRequires:  unzip
27 BuildRequires:  zip
28 Requires:       ant
29 Requires:       jdk >= 1.4
30 Obsoletes:      eclipse-SDK
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         eclipse_arch    %(echo %{_target_cpu} | sed 's/i.86\\|athlon\\|pentium/x86/;s/amd64/x86_64/')
34 %define         no_install_post_chrpath         1
35
36 # list of script capabilities (regexps) not to be used in Provides
37 %define         _noautoprov                     libcairo.so.2
38
39 %description
40 Eclipse is a kind of universal tool platform - an open extensible IDE
41 for anything and nothing in particular.
42
43 %description -l pl.UTF-8
44 Eclipse to rodzaj uniwersalnej platformy narzędziowej - otwarte,
45 rozszerzalne IDE (zintegrowane środowisko programistyczne) do
46 wszystkiego i niczego w szczególności.
47
48 %prep
49 %setup -q -c
50
51 # Build Id - it's visible in couple places in GUI
52 %{__sed} -i -e 's,buildId=.*,& (PLD Linux %{name}-%{version}-%{release}),' label.properties
53
54 # launcher patches
55 rm plugins/org.eclipse.platform/launchersrc.zip
56 cd features/org.eclipse.equinox.executable
57 %patch0 -p0
58 %patch1 -p0
59 # put the configuration directory in an arch-specific location
60 sed -i -e 's:/usr/lib/eclipse/configuration:%{_libdir}/%{name}/configuration:' library/eclipse.c
61 # make the eclipse binary relocatable
62 sed -i -e 's:/usr/share/eclipse:%{_datadir}/%{name}:' library/eclipse.c
63 zip -q -9 -r ../../plugins/org.eclipse.platform/launchersrc.zip library
64 cd -
65
66 %build
67 unset CLASSPATH || :
68 export JAVA_HOME=%{java_home}
69
70 ./build -os linux -ws gtk -arch %{eclipse_arch} -target compile
71
72 %ant insertBuildId
73
74 export JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
75
76 %{__make} -C plugins/org.eclipse.core.filesystem/natives/unix/linux/ \
77     OPT_FLAGS="%{rpmcflags} $JAVA_INC" \
78     CFLAGS="%{rpmcflags} $JAVA_INC" \
79     LDFLAGS="%{rpmldflags}"
80
81 cd plugins/org.eclipse.update.core.linux/src
82 %{__cc} %{rpmcflags} -fPIC %{rpmldflags} -I. $JAVA_INC update.c -o libupdate.so -shared
83 cd -
84
85 %install
86 if [ ! -f makeinstall.stamp -o ! -d $RPM_BUILD_ROOT ]; then
87         rm -rf makeinstall.stamp installed.stamp $RPM_BUILD_ROOT
88
89         install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_bindir},%{_libdir}/%{name}}
90         # place for arch independent plugins
91         install -d $RPM_BUILD_ROOT%{_datadir}/%{name}/{features,plugins}
92
93         unset JAVA_HOME || :
94         export JAVA_HOME=%{java_home}
95         ./build -os linux -ws gtk -arch %{eclipse_arch} -target install
96
97         tar xfz result/linux-gtk-%{eclipse_arch}-sdk.tar.gz -C $RPM_BUILD_ROOT%{_libdir}
98         touch makeinstall.stamp
99 fi
100
101 if [ ! -f installed.stamp ]; then
102         install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
103
104         install plugins/org.eclipse.core.filesystem/natives/unix/linux/lib*.so $RPM_BUILD_ROOT%{_libdir}/%{name}
105         install plugins/org.eclipse.update.core.linux/src/lib*.so $RPM_BUILD_ROOT%{_libdir}/%{name}
106
107         # wrapper
108         install -d $RPM_BUILD_ROOT%{_bindir}
109         cat > $RPM_BUILD_ROOT%{_bindir}/eclipse <<-'EOF'
110         #!/bin/sh
111         exec %{_libdir}/%{name}/eclipse ${1:+"$@"}
112         EOF
113
114         cat <<-'EOF'> $RPM_BUILD_ROOT%{_datadir}/%{name}/.eclipseextension
115         id=org.eclipse.platform name=Eclipse Platform
116         version=%{version}
117         EOF
118
119         if [ ! -f "$RPM_BUILD_ROOT%{_libdir}/%{name}/icon.xpm" ]; then
120                 install features/org.eclipse.equinox.executable/bin/gtk/linux/x86/icon.xpm $RPM_BUILD_ROOT%{_libdir}/%{name}/icon.xpm
121         fi
122         install -D features/org.eclipse.equinox.executable/bin/gtk/linux/x86/icon.xpm $RPM_BUILD_ROOT%{_pixmapsdir}/eclipse-icon.xpm
123
124         # not packaged -- remove
125         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/features/org.eclipse.cvs.source_*
126         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/features/org.eclipse.jdt.source_*
127         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/features/org.eclipse.pde.source_*
128         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/features/org.eclipse.platform.source_*
129         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/features/org.eclipse.rcp.source_*
130         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/javax.servlet.jsp.source_*
131         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/javax.servlet.source_*
132         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.ant.source_*
133         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.commons.el.source_*
134         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.commons.logging.source_*
135         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.jasper.source_*
136         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.lucene.analysis.source_*
137         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.apache.lucene.source_*
138         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.cvs.source_*
139         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.jdt.source_*
140         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.pde.source_*
141         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.platform.source.linux.gtk.*
142         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.platform.source_*
143         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.rcp.source.linux.gtk.*
144         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.eclipse.rcp.source_*
145         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.junit.source_*
146         rm -rf $RPM_BUILD_ROOT%{_libdir}/%{name}/plugins/org.mortbay.jetty.source_*
147
148         touch installed.stamp
149 fi
150
151 %clean
152 rm -rf $RPM_BUILD_ROOT
153
154 %files
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_bindir}/eclipse
157 %attr(755,root,root) %{_libdir}/%{name}/eclipse
158 %attr(755,root,root) %{_libdir}/%{name}/lib*.so
159 %{_desktopdir}/eclipse.desktop
160 %{_pixmapsdir}/eclipse-icon.xpm
161 %dir %{_libdir}/%{name}
162 %{_libdir}/%{name}/.eclipseproduct
163 %{_libdir}/%{name}/configuration
164 %{_libdir}/%{name}/eclipse.ini
165 %{_libdir}/%{name}/epl-v10.html
166 %{_libdir}/%{name}/icon.xpm
167 %{_libdir}/%{name}/notice.html
168 %{_libdir}/%{name}/readme
169 %{_libdir}/%{name}/about.html
170 #%dir %{_libdir}/%{name}/about_files
171 #%{_libdir}/%{name}/about_files/mpl-v11.txt
172 %dir %{_libdir}/%{name}/features
173 %{_libdir}/%{name}/features/org.eclipse.cvs_*.*.*
174 %{_libdir}/%{name}/features/org.eclipse.jdt_*.*.*
175 %{_libdir}/%{name}/features/org.eclipse.pde_*.*.*
176 %{_libdir}/%{name}/features/org.eclipse.platform_*.*.*
177 %{_libdir}/%{name}/features/org.eclipse.rcp_*.*.*
178 %{_libdir}/%{name}/features/org.eclipse.sdk_*.*.*
179 %dir %{_libdir}/%{name}/plugins
180 %{_libdir}/%{name}/plugins/org.eclipse.swt.gtk.linux.%{eclipse_arch}_*.*.*
181 %{_libdir}/%{name}/plugins/org.eclipse.equinox.launcher.gtk.linux.%{eclipse_arch}_*.*.*
182 %{_libdir}/%{name}/plugins/javax.servlet.jsp_*.*.*
183 %{_libdir}/%{name}/plugins/javax.servlet_*.*.*
184 %{_libdir}/%{name}/plugins/com.ibm.icu_*.*.*
185 %{_libdir}/%{name}/plugins/com.jcraft.jsch_*.*.*
186 %{_libdir}/%{name}/plugins/org.apache.ant_*.*.*
187 %{_libdir}/%{name}/plugins/org.apache.commons.el_*.*.*
188 %{_libdir}/%{name}/plugins/org.apache.commons.logging_*.*.*
189 %{_libdir}/%{name}/plugins/org.apache.jasper_*.*.*
190 %{_libdir}/%{name}/plugins/org.apache.lucene_*.*.*
191 %{_libdir}/%{name}/plugins/org.apache.lucene.analysis_*.*.*
192 %{_libdir}/%{name}/plugins/org.eclipse.ant.core_*.*.*
193 %{_libdir}/%{name}/plugins/org.eclipse.ant.ui_*.*.*
194 %{_libdir}/%{name}/plugins/org.eclipse.compare_*.*.*
195 %{_libdir}/%{name}/plugins/org.eclipse.core.boot_*.*.*
196 %{_libdir}/%{name}/plugins/org.eclipse.core.commands_*.*.*
197 %{_libdir}/%{name}/plugins/org.eclipse.core.contenttype_*.*.*
198 %{_libdir}/%{name}/plugins/org.eclipse.core.databinding_*.*.*
199 %{_libdir}/%{name}/plugins/org.eclipse.core.databinding.beans_*.*.*
200 %{_libdir}/%{name}/plugins/org.eclipse.core.expressions_*.*.*
201 %{_libdir}/%{name}/plugins/org.eclipse.core.filebuffers_*.*.*
202 %{_libdir}/%{name}/plugins/org.eclipse.core.filesystem_*.*.*
203 %{_libdir}/%{name}/plugins/org.eclipse.core.filesystem.linux.*_*.*.*
204 %{_libdir}/%{name}/plugins/org.eclipse.core.jobs_*.*.*
205 %{_libdir}/%{name}/plugins/org.eclipse.core.net_*.*.*
206 %{_libdir}/%{name}/plugins/org.eclipse.core.resources_*.*.*
207 %{_libdir}/%{name}/plugins/org.eclipse.core.resources.compatibility_*.*.*
208 %{_libdir}/%{name}/plugins/org.eclipse.core.runtime_*.*.*
209 %{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility_*.*.*
210 %{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility.auth_*.*.*
211 %{_libdir}/%{name}/plugins/org.eclipse.core.runtime.compatibility.registry_*.*.*
212 %{_libdir}/%{name}/plugins/org.eclipse.core.variables_*.*.*
213 %{_libdir}/%{name}/plugins/org.eclipse.cvs_*.*.*
214 %{_libdir}/%{name}/plugins/org.eclipse.debug.core_*.*.*
215 %{_libdir}/%{name}/plugins/org.eclipse.debug.ui_*.*.*
216 %{_libdir}/%{name}/plugins/org.eclipse.equinox.app_*.*.*
217 %{_libdir}/%{name}/plugins/org.eclipse.equinox.common_*.*.*
218 %{_libdir}/%{name}/plugins/org.eclipse.equinox.http.jetty_*.*.*
219 %{_libdir}/%{name}/plugins/org.eclipse.equinox.http.registry_*.*.*
220 %{_libdir}/%{name}/plugins/org.eclipse.equinox.http.servlet_*.*.*
221 %{_libdir}/%{name}/plugins/org.eclipse.equinox.jsp.jasper.registry_*.*.*
222 %{_libdir}/%{name}/plugins/org.eclipse.equinox.jsp.jasper_*.*.*
223 %{_libdir}/%{name}/plugins/org.eclipse.equinox.launcher_*.*.*
224 %{_libdir}/%{name}/plugins/org.eclipse.equinox.preferences_*.*.*
225 %{_libdir}/%{name}/plugins/org.eclipse.equinox.registry_*.*.*
226 %{_libdir}/%{name}/plugins/org.eclipse.help_*.*.*
227 %{_libdir}/%{name}/plugins/org.eclipse.help.appserver_*.*.*
228 %{_libdir}/%{name}/plugins/org.eclipse.help.base_*.*.*
229 %{_libdir}/%{name}/plugins/org.eclipse.help.ui_*.*.*
230 %{_libdir}/%{name}/plugins/org.eclipse.help.webapp_*.*.*
231 %{_libdir}/%{name}/plugins/org.eclipse.jdt_*.*.*
232 %{_libdir}/%{name}/plugins/org.eclipse.jdt.apt.*.*.*
233 %{_libdir}/%{name}/plugins/org.eclipse.jdt.core_*.*.*
234 %{_libdir}/%{name}/plugins/org.eclipse.jdt.core.manipulation*.*.*
235 %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug_*.*.*
236 %{_libdir}/%{name}/plugins/org.eclipse.jdt.debug.ui_*.*.*
237 %{_libdir}/%{name}/plugins/org.eclipse.jdt.doc.isv_*.*.*
238 %{_libdir}/%{name}/plugins/org.eclipse.jdt.doc.user_*.*.*
239 %{_libdir}/%{name}/plugins/org.eclipse.jdt.junit_*.*.*
240 %{_libdir}/%{name}/plugins/org.eclipse.jdt.junit.runtime_*.*.*
241 %{_libdir}/%{name}/plugins/org.eclipse.jdt.junit4.runtime_*.*.*
242 %{_libdir}/%{name}/plugins/org.eclipse.jdt.launching_*.*.*
243 %{_libdir}/%{name}/plugins/org.eclipse.jdt.ui_*.*.*
244 %{_libdir}/%{name}/plugins/org.eclipse.jdt.compiler.apt_*.*.*
245 %{_libdir}/%{name}/plugins/org.eclipse.jdt.compiler.tool_*.*.*
246 %{_libdir}/%{name}/plugins/org.eclipse.jface_*.*.*
247 %{_libdir}/%{name}/plugins/org.eclipse.jface.databinding_*.*.*
248 %{_libdir}/%{name}/plugins/org.eclipse.jface.text_*.*.*
249 %{_libdir}/%{name}/plugins/org.eclipse.jsch.core_*.*.*
250 %{_libdir}/%{name}/plugins/org.eclipse.jsch.ui_*.*.*
251 %{_libdir}/%{name}/plugins/org.eclipse.ltk.core.refactoring_*.*.*
252 %{_libdir}/%{name}/plugins/org.eclipse.ltk.ui.refactoring_*.*.*
253 %{_libdir}/%{name}/plugins/org.eclipse.osgi_*.*.*
254 %{_libdir}/%{name}/plugins/org.eclipse.osgi.services_*.*.*
255 %{_libdir}/%{name}/plugins/org.eclipse.osgi.util_*.*.*
256 %{_libdir}/%{name}/plugins/org.eclipse.pde_*.*.*
257 %{_libdir}/%{name}/plugins/org.eclipse.pde.build_*.*.*
258 %{_libdir}/%{name}/plugins/org.eclipse.pde.core_*.*.*
259 %{_libdir}/%{name}/plugins/org.eclipse.pde.doc.user_*.*.*
260 %{_libdir}/%{name}/plugins/org.eclipse.pde.junit.runtime_*.*.*
261 %{_libdir}/%{name}/plugins/org.eclipse.pde.runtime_*.*.*
262 %{_libdir}/%{name}/plugins/org.eclipse.pde.ui_*.*.*
263 %{_libdir}/%{name}/plugins/org.eclipse.pde.ui.templates_*.*.*
264 %{_libdir}/%{name}/plugins/org.eclipse.platform_*.*.*
265 %{_libdir}/%{name}/plugins/org.eclipse.platform.doc.isv_*.*.*
266 %{_libdir}/%{name}/plugins/org.eclipse.platform.doc.user_*.*.*
267 %{_libdir}/%{name}/plugins/org.eclipse.rcp_*.*.*
268 %{_libdir}/%{name}/plugins/org.eclipse.sdk_*.*.*
269 %{_libdir}/%{name}/plugins/org.eclipse.swt_*.*.*
270 %{_libdir}/%{name}/plugins/org.eclipse.search_*.*.*
271 %{_libdir}/%{name}/plugins/org.eclipse.team.core_*.*.*
272 %{_libdir}/%{name}/plugins/org.eclipse.team.cvs.core_*.*.*
273 %{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ssh2_*.*.*
274 %{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ssh_*.*.*
275 %{_libdir}/%{name}/plugins/org.eclipse.team.cvs.ui_*.*.*
276 %{_libdir}/%{name}/plugins/org.eclipse.team.ui_*.*.*
277 %{_libdir}/%{name}/plugins/org.eclipse.text_*.*.*
278 %{_libdir}/%{name}/plugins/org.eclipse.tomcat_*.*.*
279 %{_libdir}/%{name}/plugins/org.eclipse.ui_*.*.*
280 %{_libdir}/%{name}/plugins/org.eclipse.ui.browser_*.*.*
281 %{_libdir}/%{name}/plugins/org.eclipse.ui.cheatsheets_*.*.*
282 %{_libdir}/%{name}/plugins/org.eclipse.ui.console_*.*.*
283 %{_libdir}/%{name}/plugins/org.eclipse.ui.editors_*.*.*
284 %{_libdir}/%{name}/plugins/org.eclipse.ui.externaltools_*.*.*
285 %{_libdir}/%{name}/plugins/org.eclipse.ui.forms_*.*.*
286 %{_libdir}/%{name}/plugins/org.eclipse.ui.ide_*.*.*
287 %{_libdir}/%{name}/plugins/org.eclipse.ui.ide.application_*.*.*
288 %{_libdir}/%{name}/plugins/org.eclipse.ui.intro_*.*.*
289 %{_libdir}/%{name}/plugins/org.eclipse.ui.intro.universal_*.*.*
290 %{_libdir}/%{name}/plugins/org.eclipse.ui.navigator_*.*.*
291 %{_libdir}/%{name}/plugins/org.eclipse.ui.navigator.resources_*.*.*
292 %{_libdir}/%{name}/plugins/org.eclipse.ui.net_*.*.*
293 %{_libdir}/%{name}/plugins/org.eclipse.ui.presentations.r21_*.*.*
294 %{_libdir}/%{name}/plugins/org.eclipse.ui.views_*.*.*
295 %{_libdir}/%{name}/plugins/org.eclipse.ui.views.properties.tabbed_*.*.*
296 %{_libdir}/%{name}/plugins/org.eclipse.ui.workbench_*.*.*
297 %{_libdir}/%{name}/plugins/org.eclipse.ui.workbench.compatibility_*.*.*
298 %{_libdir}/%{name}/plugins/org.eclipse.ui.workbench.texteditor_*.*.*
299 %{_libdir}/%{name}/plugins/org.eclipse.update.configurator_*.*.*
300 %{_libdir}/%{name}/plugins/org.eclipse.update.core_*.*.*
301 %{_libdir}/%{name}/plugins/org.eclipse.update.core.linux_*.*.*
302 %{_libdir}/%{name}/plugins/org.eclipse.update.scheduler_*.*.*
303 %{_libdir}/%{name}/plugins/org.eclipse.update.ui_*.*.*
304 %{_libdir}/%{name}/plugins/org.junit_*.*.*
305 %{_libdir}/%{name}/plugins/org.junit4_*.*.*
306 %{_libdir}/%{name}/plugins/org.mortbay.jetty_*.*.*
307
308 %dir %{_datadir}/%{name}
309 %dir %{_datadir}/%{name}/features
310 %dir %{_datadir}/%{name}/plugins
311 %{_datadir}/%{name}/.eclipseextension
This page took 0.149089 seconds and 2 git commands to generate.