2 # - build instructions: http://www.eclipse.org/swt/faq.php#howbuilddll
5 %bcond_without gnome # build without gnome
6 %bcond_without xulrunner # build without xulrunner
7 %bcond_without glx # build without glx
8 %bcond_with cairo # build with cairo
10 %define _buildid 200706251500
12 %define _ver_major 3.3
15 %define _ver %{_ver_major}.%{_ver_minor}
18 %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86_64
19 %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86_64
23 %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.ppc
24 %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.ppc
28 %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86
29 %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86
32 %define _eclipse_arch %(echo %{_target_cpu} | sed 's/i.86/x86/;s/athlon/x86/;s/pentium./x86/')
33 %define no_install_post_chrpath 1
35 %define _noautostrip .*\\.so
38 Summary: SWT - a widget toolkit for Java
39 Summary(pl.UTF-8): SWT - zestaw widgetów dla Javy
41 Version: %{_ver_major}
42 #Release: 0.%{_mver}_%{_buildid}.1
46 #Source0: http://download.eclipse.org/downloads/drops/S-%{_ver_major}%{_mver}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{_ver_major}%{_mver}.zip
47 # Source0-md5: 91c688221479986dbdd7d1a0771f04cc
48 Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{_ver_major}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{version}.zip
49 Patch0: %{name}-NULL.patch
50 URL: http://www.eclipse.org/swt
51 %{?with_glx:BuildRequires: OpenGL-devel}
52 BuildRequires: ant >= 1.6.1
53 BuildRequires: atk-devel
54 %{?with_cairo:BuildRequires: cairo-devel}
55 BuildRequires: gtk+2-devel >= 2.0.0
56 BuildRequires: jdk >= 1.4
57 %{?with_gnome:BuildRequires: libgnomeui-devel}
58 %{?with_xulrunner:BuildRequires: libstdc++-devel}
59 BuildRequires: pkgconfig
60 BuildRequires: rpmbuild(macros) >= 1.213
62 %{?with_xulrunner:BuildRequires: xulrunner-devel}
66 ExclusiveArch: %{ix86} %{x8664} ppc
67 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70 SWT is a widget toolkit for Java designed to provide efficient,
71 portable access to the user-interface facilities of the operating
72 systems on which it is implemented.
74 %description -l pl.UTF-8
75 SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny,
76 przenośny dostęp do udogodnień interfejsu użytkownika na tych
77 systemach operacyjnych, na których został zaimplementowany.
81 %ant -f %{_swtsrcdir}/build.xml src.zip
84 %{__unzip} -qq -o ../%{_swtsrcdir}/src.zip
88 %{__make} -f make_linux.mak -C swt \
90 %{?with_glx:make_glx} \
91 %{?with_gnome:make_gnome} \
92 %{?with_cairo:make_cairo} \
93 %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags xulrunner-xpcom)"} \
94 JAVA_HOME="%{java_home}" \
97 XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
100 %ant -f %{_swtsrcdir}/build.xml build.jars
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT%{_javadir}
105 install %{_swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir}
107 dir=%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch}
108 install -d $RPM_BUILD_ROOT$dir
109 for a in swt/libswt-*.so; do
110 install $a $RPM_BUILD_ROOT$dir
112 ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt
116 install swt/libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt
119 install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt
120 cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt
123 rm -rf $RPM_BUILD_ROOT
126 %defattr(644,root,root,755)
128 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*
129 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os
130 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux
131 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}
133 %{_libdir}/swt/about_files
134 %{_libdir}/swt/about.html
135 %{_libdir}/swt/libswt-*-%{_ver_swt}.so
136 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-atk-gtk-*.so
137 %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-glx-gtk-*.so}
138 %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gnome-gtk-*.so}
139 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gtk-*.so
140 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-pi-gtk-*.so
141 %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-xulrunner-gtk-*.so}