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 Patch1: %{name}-makefile.patch
51 Patch2: %{name}-nognome.patch
52 URL: http://www.eclipse.org/swt
53 %{?with_glx:BuildRequires: OpenGL-devel}
54 BuildRequires: ant >= 1.6.1
55 BuildRequires: atk-devel
56 %{?with_cairo:BuildRequires: cairo-devel}
57 BuildRequires: gtk+2-devel >= 2.0.0
58 BuildRequires: jdk >= 1.4
59 %{?with_gnome:BuildRequires: libgnomeui-devel}
60 %{?with_xulrunner:BuildRequires: libstdc++-devel}
61 BuildRequires: pkgconfig
62 BuildRequires: rpmbuild(macros) >= 1.213
64 %{?with_xulrunner:BuildRequires: xulrunner-devel}
68 ExclusiveArch: %{ix86} %{x8664} ppc
69 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
72 SWT is a widget toolkit for Java designed to provide efficient,
73 portable access to the user-interface facilities of the operating
74 systems on which it is implemented.
76 %description -l pl.UTF-8
77 SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny,
78 przenośny dostęp do udogodnień interfejsu użytkownika na tych
79 systemach operacyjnych, na których został zaimplementowany.
83 %ant -f %{_swtsrcdir}/build.xml src.zip
86 %{__unzip} -qq -o ../%{_swtsrcdir}/src.zip
91 %{__make} -f make_linux.mak -C swt \
93 %{?with_glx:make_glx} \
94 %{?with_gnome:make_gnome} \
95 %{?with_cairo:make_cairo} \
96 %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags xulrunner-xpcom)"} \
98 JAVA_HOME="%{java_home}" \
101 XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
104 %ant -f %{_swtsrcdir}/build.xml build.jars
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_javadir}
109 install %{_swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir}
111 dir=%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch}
112 install -d $RPM_BUILD_ROOT$dir
113 for a in swt/libswt-*.so; do
114 install $a $RPM_BUILD_ROOT$dir
116 ln -sf $dir/$lib $RPM_BUILD_ROOT%{_libdir}/swt
120 install swt/libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt
123 install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt
124 cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt
127 rm -rf $RPM_BUILD_ROOT
130 %defattr(644,root,root,755)
132 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*
133 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os
134 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux
135 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}
137 %{_libdir}/swt/about_files
138 %{_libdir}/swt/about.html
139 %{_libdir}/swt/libswt-*-%{_ver_swt}.so
140 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-atk-gtk-*.so
141 %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-glx-gtk-*.so}
142 %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gnome-gtk-*.so}
143 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gtk-*.so
144 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-pi-gtk-*.so
145 %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-xulrunner-gtk-*.so}