]>
Commit | Line | Data |
---|---|---|
87a4a2ad ER |
1 | # NOTE |
2 | # - build instructions: http://www.eclipse.org/swt/faq.php#howbuilddll | |
cbfc3907 | 3 | # |
9d52bb45 BZ |
4 | # TODO |
5 | # - check if any patches are needed | |
6 | # | |
cbfc3907 | 7 | # Conditional build: |
623fc602 JB |
8 | %bcond_without gnome # build without GNOME |
9 | %bcond_without xulrunner # build without xulrunner | |
10 | %bcond_without glx # build without GLX | |
5bf39257 | 11 | %bcond_without cairo # build without cairo |
6cc799b7 | 12 | |
9d52bb45 | 13 | %define buildid 200906111540 |
cbfc3907 | 14 | |
15 | %ifarch %{x8664} | |
623fc602 JB |
16 | %define swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86_64 |
17 | %define swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86_64 | |
cbfc3907 | 18 | %endif |
19 | ||
20 | %ifarch ppc | |
623fc602 JB |
21 | %define swtsrcdir plugins/org.eclipse.swt.gtk.linux.ppc |
22 | %define swtgtkdir plugins/org.eclipse.swt.gtk.linux.ppc | |
cbfc3907 | 23 | %endif |
87a4a2ad | 24 | |
cbfc3907 | 25 | %ifarch %{ix86} |
623fc602 JB |
26 | %define swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86 |
27 | %define swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86 | |
cbfc3907 | 28 | %endif |
29 | ||
623fc602 | 30 | %define eclipse_arch %(echo %{_target_cpu} | sed 's/i.86/x86/;s/athlon/x86/;s/pentium./x86/') |
cbfc3907 | 31 | |
fd5b4581 | 32 | %include /usr/lib/rpm/macros.java |
2b5498b8 | 33 | Summary: SWT - a widget toolkit for Java |
9ca1e996 | 34 | Summary(pl.UTF-8): SWT - zestaw widgetów dla Javy |
cbfc3907 | 35 | Name: eclipse-swt |
9d52bb45 BZ |
36 | Version: 3.5 |
37 | Release: 1 | |
2b5498b8 JB |
38 | License: CPL v1.0 |
39 | Group: Libraries | |
6cc799b7 | 40 | Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{buildid}/eclipse-sourceBuild-srcIncluded-%{version}.zip |
a5e8080f | 41 | # Source0-md5: d41d8cd98f00b204e9800998ecf8427e |
623fc602 | 42 | URL: http://www.eclipse.org/swt/ |
87a4a2ad ER |
43 | %{?with_glx:BuildRequires: OpenGL-devel} |
44 | BuildRequires: ant >= 1.6.1 | |
2b5498b8 | 45 | BuildRequires: atk-devel |
cbfc3907 | 46 | %{?with_cairo:BuildRequires: cairo-devel} |
87a4a2ad | 47 | BuildRequires: gtk+2-devel >= 2.0.0 |
2b5498b8 JB |
48 | BuildRequires: jdk >= 1.4 |
49 | %{?with_gnome:BuildRequires: libgnomeui-devel} | |
87a4a2ad | 50 | %{?with_xulrunner:BuildRequires: libstdc++-devel} |
2b5498b8 | 51 | BuildRequires: pkgconfig |
fd5b4581 ER |
52 | BuildRequires: rpm-javaprov |
53 | BuildRequires: rpmbuild(macros) >= 1.300 | |
2b5498b8 | 54 | BuildRequires: unzip |
a5e8080f | 55 | BuildRequires: xorg-lib-libXtst-devel |
3fa65cb8 | 56 | %{?with_xulrunner:BuildRequires: xulrunner-devel >= 1.9} |
2b5498b8 | 57 | BuildRequires: zip |
2b5498b8 | 58 | Requires: jdk >= 1.4 |
5473da8d | 59 | Requires: jpackage-utils |
2b5498b8 | 60 | ExclusiveArch: %{ix86} %{x8664} ppc |
cbfc3907 | 61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
62 | ||
63 | %description | |
2b5498b8 JB |
64 | SWT is a widget toolkit for Java designed to provide efficient, |
65 | portable access to the user-interface facilities of the operating | |
66 | systems on which it is implemented. | |
67 | ||
d712490c JR |
68 | %description -l pl.UTF-8 |
69 | SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny, | |
70 | przenośny dostęp do udogodnień interfejsu użytkownika na tych | |
71 | systemach operacyjnych, na których został zaimplementowany. | |
cbfc3907 | 72 | |
73 | %prep | |
74 | %setup -q -c | |
cc84b802 ER |
75 | %ifarch %{x8664} |
76 | # probably broken only in 3.3.1.1 | |
77 | %{__sed} -i -e 's,${basedir}/src/Eclipse SWT,${plugindir}/Eclipse SWT,' %{swtsrcdir}/build.xml | |
78 | %endif | |
623fc602 | 79 | %ant -f %{swtsrcdir}/build.xml src.zip |
87a4a2ad | 80 | mkdir swt |
cbfc3907 | 81 | cd swt |
623fc602 | 82 | %{__unzip} -qq -o ../%{swtsrcdir}/src.zip |
cbfc3907 | 83 | |
87a4a2ad ER |
84 | %build |
85 | %{__make} -f make_linux.mak -C swt \ | |
86 | make_swt make_atk \ | |
87 | %{?with_glx:make_glx} \ | |
88 | %{?with_gnome:make_gnome} \ | |
89 | %{?with_cairo:make_cairo} \ | |
9d52bb45 | 90 | %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags libxul-embedding)"} \ |
87a4a2ad ER |
91 | JAVA_HOME="%{java_home}" \ |
92 | CC="%{__cc}" \ | |
93 | CXX="%{__cxx}" \ | |
94 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
95 | OPT="%{rpmcflags}" | |
96 | ||
623fc602 | 97 | %ant -f %{swtsrcdir}/build.xml build.jars |
d6978db2 | 98 | |
cbfc3907 | 99 | %install |
100 | rm -rf $RPM_BUILD_ROOT | |
87a4a2ad | 101 | install -d $RPM_BUILD_ROOT%{_javadir} |
623fc602 | 102 | install %{swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir} |
d6978db2 | 103 | |
6cc799b7 | 104 | dir=%{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch} |
87a4a2ad ER |
105 | install -d $RPM_BUILD_ROOT$dir |
106 | for a in swt/libswt-*.so; do | |
107 | install $a $RPM_BUILD_ROOT$dir | |
108 | lib=${a##*/} | |
65cba587 | 109 | ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt |
87a4a2ad | 110 | done |
cbfc3907 | 111 | |
87a4a2ad ER |
112 | install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt |
113 | cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt | |
cbfc3907 | 114 | |
cbfc3907 | 115 | %clean |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
cbfc3907 | 118 | %files |
119 | %defattr(644,root,root,755) | |
2b5498b8 | 120 | %dir %{_libdir}/swt |
6cc799b7 | 121 | %dir %{_libdir}/swt/plugins |
76ed6c55 BZ |
122 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version} |
123 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os | |
124 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux | |
125 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch} | |
d6978db2 | 126 | %{_javadir}/swt.jar |
cbfc3907 | 127 | %{_libdir}/swt/about_files |
128 | %{_libdir}/swt/about.html | |
6cc799b7 | 129 | %{_libdir}/swt/libswt-*-*.so |
76ed6c55 BZ |
130 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-atk-gtk-*.so |
131 | %{?with_cairo:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-cairo-gtk-*.so} | |
132 | %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-glx-gtk-*.so} | |
133 | %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gnome-gtk-*.so} | |
134 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gtk-*.so | |
135 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-pi-gtk-*.so | |
136 | %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-xulrunner-gtk-*.so} |