]>
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 | |
f1b45715 | 13 | %define buildid 201102101200 |
cbfc3907 | 14 | |
15 | %ifarch %{x8664} | |
f1b45715 | 16 | %define swtsrcdir src/plugins/org.eclipse.swt.gtk.linux.x86_64 |
623fc602 | 17 | %define swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86_64 |
cbfc3907 | 18 | %endif |
19 | ||
20 | %ifarch ppc | |
f1b45715 | 21 | %define swtsrcdir src/plugins/org.eclipse.swt.gtk.linux.ppc |
623fc602 | 22 | %define swtgtkdir plugins/org.eclipse.swt.gtk.linux.ppc |
cbfc3907 | 23 | %endif |
87a4a2ad | 24 | |
cbfc3907 | 25 | %ifarch %{ix86} |
f1b45715 | 26 | %define swtsrcdir src/plugins/org.eclipse.swt.gtk.linux.x86 |
623fc602 | 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 | |
2b5498b8 | 32 | Summary: SWT - a widget toolkit for Java |
9ca1e996 | 33 | Summary(pl.UTF-8): SWT - zestaw widgetów dla Javy |
cbfc3907 | 34 | Name: eclipse-swt |
f1b45715 | 35 | Version: 3.6.2 |
9d52bb45 | 36 | Release: 1 |
2b5498b8 JB |
37 | License: CPL v1.0 |
38 | Group: Libraries | |
6cc799b7 | 39 | Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{buildid}/eclipse-sourceBuild-srcIncluded-%{version}.zip |
f1b45715 JR |
40 | # Source0-md5: 33a298ea33c6f24462aa0a02b9cda3d4 |
41 | Patch0: eclipse-xpcom-h.patch | |
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 |
cbfc3907 | 60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
61 | ||
62 | %description | |
2b5498b8 JB |
63 | SWT is a widget toolkit for Java designed to provide efficient, |
64 | portable access to the user-interface facilities of the operating | |
65 | systems on which it is implemented. | |
66 | ||
d712490c JR |
67 | %description -l pl.UTF-8 |
68 | SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny, | |
69 | przenośny dostęp do udogodnień interfejsu użytkownika na tych | |
70 | systemach operacyjnych, na których został zaimplementowany. | |
cbfc3907 | 71 | |
72 | %prep | |
73 | %setup -q -c | |
623fc602 | 74 | %ant -f %{swtsrcdir}/build.xml src.zip |
87a4a2ad | 75 | mkdir swt |
cbfc3907 | 76 | cd swt |
623fc602 | 77 | %{__unzip} -qq -o ../%{swtsrcdir}/src.zip |
f1b45715 | 78 | %patch0 -p0 |
cbfc3907 | 79 | |
87a4a2ad ER |
80 | %build |
81 | %{__make} -f make_linux.mak -C swt \ | |
82 | make_swt make_atk \ | |
83 | %{?with_glx:make_glx} \ | |
84 | %{?with_gnome:make_gnome} \ | |
85 | %{?with_cairo:make_cairo} \ | |
9d52bb45 | 86 | %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags libxul-embedding)"} \ |
87a4a2ad ER |
87 | JAVA_HOME="%{java_home}" \ |
88 | CC="%{__cc}" \ | |
89 | CXX="%{__cxx}" \ | |
90 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
91 | OPT="%{rpmcflags}" | |
92 | ||
623fc602 | 93 | %ant -f %{swtsrcdir}/build.xml build.jars |
d6978db2 | 94 | |
cbfc3907 | 95 | %install |
96 | rm -rf $RPM_BUILD_ROOT | |
87a4a2ad | 97 | install -d $RPM_BUILD_ROOT%{_javadir} |
623fc602 | 98 | install %{swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir} |
d6978db2 | 99 | |
6cc799b7 | 100 | dir=%{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch} |
87a4a2ad ER |
101 | install -d $RPM_BUILD_ROOT$dir |
102 | for a in swt/libswt-*.so; do | |
103 | install $a $RPM_BUILD_ROOT$dir | |
104 | lib=${a##*/} | |
65cba587 | 105 | ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt |
87a4a2ad | 106 | done |
cbfc3907 | 107 | |
87a4a2ad ER |
108 | install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt |
109 | cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt | |
cbfc3907 | 110 | |
cbfc3907 | 111 | %clean |
112 | rm -rf $RPM_BUILD_ROOT | |
113 | ||
cbfc3907 | 114 | %files |
115 | %defattr(644,root,root,755) | |
2b5498b8 | 116 | %dir %{_libdir}/swt |
6cc799b7 | 117 | %dir %{_libdir}/swt/plugins |
76ed6c55 BZ |
118 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version} |
119 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os | |
120 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux | |
121 | %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch} | |
d6978db2 | 122 | %{_javadir}/swt.jar |
cbfc3907 | 123 | %{_libdir}/swt/about_files |
124 | %{_libdir}/swt/about.html | |
6cc799b7 | 125 | %{_libdir}/swt/libswt-*-*.so |
76ed6c55 BZ |
126 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-atk-gtk-*.so |
127 | %{?with_cairo:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-cairo-gtk-*.so} | |
128 | %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-glx-gtk-*.so} | |
129 | %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gnome-gtk-*.so} | |
130 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gtk-*.so | |
131 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-pi-gtk-*.so | |
132 | %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-xulrunner-gtk-*.so} |