]>
Commit | Line | Data |
---|---|---|
cbfc3907 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without gnome # build without gnome | |
309758a7 | 4 | %bcond_without cairo # build without cairo |
cbfc3907 | 5 | # |
6 | %define _buildid 200506271435 | |
7 | #define _mver M6 | |
8 | %define _ver_major 3.1 | |
9 | %define _ver_minor 0 | |
10 | %define _ver %{_ver_major}.%{_ver_minor} | |
11 | ||
12 | %ifarch %{x8664} | |
13 | %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86_64 | |
14 | %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86_64 | |
15 | %endif | |
16 | ||
17 | %ifarch ppc | |
18 | %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.ppc | |
19 | %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.ppc | |
20 | %endif | |
21 | ||
22 | %ifarch %{ix86} | |
23 | %define _swtsrcdir plugins/org.eclipse.swt.gtk.linux.x86 | |
24 | %define _swtgtkdir plugins/org.eclipse.swt.gtk.linux.x86 | |
25 | %endif | |
26 | ||
27 | %define _eclipse_arch %(echo %{_target_cpu} | sed 's/i.86/x86/;s/athlon/x86/;s/pentium./x86/') | |
28 | %define no_install_post_chrpath 1 | |
29 | %ifarch %{x8664} | |
30 | %define _noautostrip .*\\.so | |
31 | %endif | |
32 | ||
33 | Summary: SWT is a widget toolkit for Java | |
34 | Name: eclipse-swt | |
35 | Version: %{_ver_major} | |
36 | #Release: 0.%{_mver}_%{_buildid}.1 | |
37 | Release: 0.1 | |
38 | License: CPL v1.0 | |
39 | Group: Libraries | |
40 | #Source0: http://download.eclipse.org/downloads/drops/S-%{_ver_major}%{_mver}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{_ver_major}%{_mver}.zip | |
41 | Source0: http://download.eclipse.org/eclipse/downloads/drops/R-%{_ver_major}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{_ver_major}.zip | |
42 | # Source0-md5: 19ad65d52005da5eaa1d3687b3a50de2 | |
43 | Patch0: %{name}-NULL.patch | |
44 | Patch1: %{name}-makefile.patch | |
45 | Patch2: %{name}-nognome.patch | |
46 | URL: http://www.eclipse.org/swt | |
47 | BuildRequires: jakarta-ant >= 1.6.1 | |
48 | BuildRequires: jdk >= 1.4 | |
49 | BuildRequires: pkgconfig | |
50 | BuildRequires: rpmbuild(macros) >= 1.213 | |
51 | BuildRequires: unzip | |
52 | BuildRequires: zip | |
53 | BuildRequires: mozilla-devel | |
54 | BuildRequires: atk-devel | |
55 | %{?with_gnome:BuildRequires: libgnomeui-devel} | |
56 | BuildRequires: gtk+2-devel | |
57 | %{?with_cairo:BuildRequires: cairo-devel} | |
58 | Requires: jakarta-ant | |
59 | Requires: jdk >= 1.4 | |
60 | ExclusiveArch: %{ix86} %{x8664} ppc | |
61 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
62 | ||
63 | %description | |
64 | SWT is a widget toolkit for Java designed to provide efficient, portable access to the user-interface facilities of the operating systems on which it is implemented. | |
65 | ||
66 | %prep | |
67 | %setup -q -c | |
68 | JAVA_HOME=%{_libdir}/java | |
69 | export JAVA_HOME | |
70 | cd %{_swtsrcdir} | |
71 | ant src.zip | |
72 | ||
73 | %build | |
74 | %if 0 | |
75 | rm -rf swt | |
76 | mkdir swt | |
77 | cd swt | |
78 | ||
79 | unzip -x %{_builddir}/%{name}-%{version}/%{_swtsrcdir}/src.zip | |
80 | ||
81 | patch -p0 < %{PATCH0} | |
82 | patch -p0 < %{PATCH1} | |
83 | %if %{without gnome} | |
84 | patch -p0 < %{PATCH2} | |
85 | %endif | |
86 | %endif | |
87 | JAVA_HOME=%{_libdir}/java | |
88 | export JAVA_HOME | |
89 | export JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux" | |
90 | cd swt | |
91 | %{__make} -f make_linux.mak all \ | |
92 | CC="%{__cc}" \ | |
93 | CXX="%{__cxx}" \ | |
94 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
95 | OPT="%{rpmcflags}" | |
96 | ||
97 | %if %{with cairo} | |
98 | %{__make} -f make_linux.mak make_cairo \ | |
99 | CC="%{__cc}" \ | |
100 | CXX="%{__cxx}" \ | |
101 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
102 | OPT="%{rpmcflags}" | |
103 | %endif | |
104 | ||
105 | %{__make} -f make_linux.mak make_mozilla \ | |
106 | CC="%{__cc}" \ | |
107 | CXX="%{__cxx}" \ | |
108 | XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \ | |
109 | OPT="%{rpmcflags}" | |
110 | ||
111 | #cp library/* . | |
112 | #{__make} -f make_linux.mak make_mozilla \ | |
113 | # OPT="%{rpmcflags}" | |
114 | cd .. | |
115 | ||
116 | ||
117 | ||
118 | %install | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | install -d $RPM_BUILD_ROOT%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch} | |
121 | cd swt | |
122 | install libswt-*.so \ | |
123 | $RPM_BUILD_ROOT%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch} | |
124 | ||
125 | %if %{with cairo} | |
126 | install libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt | |
127 | %endif | |
128 | ||
129 | install *.html $RPM_BUILD_ROOT%{_libdir}/swt | |
130 | cp -rf about_files $RPM_BUILD_ROOT%{_libdir}/swt | |
131 | ||
132 | ||
133 | %clean | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | ||
137 | %files | |
138 | %defattr(644,root,root,755) | |
139 | %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.* | |
140 | %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os | |
141 | %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux | |
142 | %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch} | |
143 | %{_libdir}/swt/about_files | |
144 | %{_libdir}/swt/about.html | |
145 | %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-atk-gtk-*.so | |
146 | %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-awt-gtk-*.so | |
147 | %if %{with gnome} | |
148 | %attr(755,root,root) %{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gnome-gtk-*.so | |
149 | %endif | |
150 | %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gtk-*.so | |
151 | #%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-kde-gtk*.so | |
152 | %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-mozilla-gtk-*.so | |
153 | %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-pi-gtk-*.so |