]>
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 | |
2b5498b8 | 29 | Summary: SWT - a widget toolkit for Java |
9ca1e996 | 30 | Summary(pl.UTF-8): SWT - zestaw widgetów dla Javy |
cbfc3907 | 31 | Name: eclipse-swt |
6cc799b7 | 32 | Version: 3.3.1.1 |
65cba587 | 33 | Release: 1 |
2b5498b8 JB |
34 | License: CPL v1.0 |
35 | Group: Libraries | |
6cc799b7 ER |
36 | Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{buildid}/eclipse-sourceBuild-srcIncluded-%{version}.zip |
37 | # Source0-md5: 593b56fce7d1f1f799e87365cafefbef | |
2b5498b8 | 38 | Patch0: %{name}-NULL.patch |
623fc602 | 39 | URL: http://www.eclipse.org/swt/ |
87a4a2ad ER |
40 | %{?with_glx:BuildRequires: OpenGL-devel} |
41 | BuildRequires: ant >= 1.6.1 | |
2b5498b8 | 42 | BuildRequires: atk-devel |
cbfc3907 | 43 | %{?with_cairo:BuildRequires: cairo-devel} |
87a4a2ad | 44 | BuildRequires: gtk+2-devel >= 2.0.0 |
2b5498b8 JB |
45 | BuildRequires: jdk >= 1.4 |
46 | %{?with_gnome:BuildRequires: libgnomeui-devel} | |
87a4a2ad | 47 | %{?with_xulrunner:BuildRequires: libstdc++-devel} |
2b5498b8 JB |
48 | BuildRequires: pkgconfig |
49 | BuildRequires: rpmbuild(macros) >= 1.213 | |
50 | BuildRequires: unzip | |
87a4a2ad | 51 | %{?with_xulrunner:BuildRequires: xulrunner-devel} |
2b5498b8 | 52 | BuildRequires: zip |
54f28083 | 53 | Requires: ant |
2b5498b8 JB |
54 | Requires: jdk >= 1.4 |
55 | ExclusiveArch: %{ix86} %{x8664} ppc | |
cbfc3907 | 56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
58 | %description | |
2b5498b8 JB |
59 | SWT is a widget toolkit for Java designed to provide efficient, |
60 | portable access to the user-interface facilities of the operating | |
61 | systems on which it is implemented. | |
62 | ||
d712490c JR |
63 | %description -l pl.UTF-8 |
64 | SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny, | |
65 | przenośny dostęp do udogodnień interfejsu użytkownika na tych | |
66 | systemach operacyjnych, na których został zaimplementowany. | |
cbfc3907 | 67 | |
68 | %prep | |
69 | %setup -q -c | |
623fc602 | 70 | %ant -f %{swtsrcdir}/build.xml src.zip |
87a4a2ad | 71 | mkdir swt |
cbfc3907 | 72 | cd swt |
623fc602 | 73 | %{__unzip} -qq -o ../%{swtsrcdir}/src.zip |
87a4a2ad | 74 | %patch0 -p0 |
cbfc3907 | 75 | |
87a4a2ad ER |
76 | %build |
77 | %{__make} -f make_linux.mak -C swt \ | |
78 | make_swt make_atk \ | |
79 | %{?with_glx:make_glx} \ | |
80 | %{?with_gnome:make_gnome} \ | |
81 | %{?with_cairo:make_cairo} \ | |
82 | %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags xulrunner-xpcom)"} \ | |
87a4a2ad ER |
83 | JAVA_HOME="%{java_home}" \ |
84 | CC="%{__cc}" \ | |
85 | CXX="%{__cxx}" \ | |
86 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
87 | OPT="%{rpmcflags}" | |
88 | ||
623fc602 | 89 | %ant -f %{swtsrcdir}/build.xml build.jars |
d6978db2 | 90 | |
cbfc3907 | 91 | %install |
92 | rm -rf $RPM_BUILD_ROOT | |
87a4a2ad | 93 | install -d $RPM_BUILD_ROOT%{_javadir} |
623fc602 | 94 | install %{swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir} |
d6978db2 | 95 | |
6cc799b7 | 96 | dir=%{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch} |
87a4a2ad ER |
97 | install -d $RPM_BUILD_ROOT$dir |
98 | for a in swt/libswt-*.so; do | |
99 | install $a $RPM_BUILD_ROOT$dir | |
100 | lib=${a##*/} | |
65cba587 | 101 | ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt |
87a4a2ad | 102 | done |
cbfc3907 | 103 | |
104 | %if %{with cairo} | |
87a4a2ad | 105 | install swt/libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt |
cbfc3907 | 106 | %endif |
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 |
623fc602 JB |
118 | %dir %{_libdir}/swt/%{swtgtkdir}_*.*.* |
119 | %dir %{_libdir}/swt/%{swtgtkdir}_*.*.*/os | |
120 | %dir %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux | |
121 | %dir %{_libdir}/swt/%{swtgtkdir}_*.*.*/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 |
623fc602 JB |
126 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-atk-gtk-*.so |
127 | %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-glx-gtk-*.so} | |
128 | %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-gnome-gtk-*.so} | |
129 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-gtk-*.so | |
130 | %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-pi-gtk-*.so | |
131 | %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_*.*.*/os/linux/%{eclipse_arch}/libswt-xulrunner-gtk-*.so} |