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