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