]> git.pld-linux.org Git - packages/eclipse-swt.git/blob - eclipse-swt.spec
- pl, missing dir, some cleanups
[packages/eclipse-swt.git] / eclipse-swt.spec
1 #
2 # Conditional build:
3 %bcond_without  gnome           # build without gnome
4 %bcond_without  cairo           # build without cairo
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 - a widget toolkit for Java
34 Summary(pl):    SWT - zestaw widgetów dla Javy
35 Name:           eclipse-swt
36 Version:        %{_ver_major}
37 #Release:       0.%{_mver}_%{_buildid}.1
38 Release:        0.1
39 License:        CPL v1.0
40 Group:          Libraries
41 #Source0:       http://download.eclipse.org/downloads/drops/S-%{_ver_major}%{_mver}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{_ver_major}%{_mver}.zip
42 Source0:        http://download.eclipse.org/eclipse/downloads/drops/R-%{_ver_major}-%{_buildid}/eclipse-sourceBuild-srcIncluded-%{_ver_major}.zip
43 # Source0-md5:  19ad65d52005da5eaa1d3687b3a50de2
44 Patch0:         %{name}-NULL.patch
45 Patch1:         %{name}-makefile.patch
46 Patch2:         %{name}-nognome.patch
47 URL:            http://www.eclipse.org/swt
48 BuildRequires:  atk-devel
49 %{?with_cairo:BuildRequires:  cairo-devel}
50 BuildRequires:  gtk+2-devel >= 2.0.0
51 BuildRequires:  jakarta-ant >= 1.6.1
52 BuildRequires:  jdk >= 1.4
53 %{?with_gnome:BuildRequires:  libgnomeui-devel}
54 BuildRequires:  mozilla-devel
55 BuildRequires:  pkgconfig
56 BuildRequires:  rpmbuild(macros) >= 1.213
57 BuildRequires:  unzip
58 BuildRequires:  zip
59 Requires:       jakarta-ant
60 Requires:       jdk >= 1.4
61 ExclusiveArch:  %{ix86} %{x8664} ppc
62 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63
64 %description
65 SWT is a widget toolkit for Java designed to provide efficient,
66 portable access to the user-interface facilities of the operating
67 systems on which it is implemented.
68
69 %description -l pl
70 SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyæ wydajny,
71 przeno¶ny dostêp do udogodnieñ interfejsu u¿ytkownika na tych
72 systemach operacyjnych, na których zosta³ zaimplementowany.
73
74 %prep
75 %setup -q -c
76 JAVA_HOME=%{_libdir}/java
77 export JAVA_HOME
78 cd %{_swtsrcdir}
79 ant src.zip
80
81 %build
82 %if 0
83 rm -rf swt
84 mkdir swt 
85 cd swt
86
87 unzip -x %{_builddir}/%{name}-%{version}/%{_swtsrcdir}/src.zip
88
89 patch -p0 < %{PATCH0}
90 patch -p0 < %{PATCH1}
91 %if %{without gnome}
92 patch -p0 < %{PATCH2}
93 %endif
94 %endif 
95 JAVA_HOME=%{_libdir}/java
96 export JAVA_HOME
97 export JAVA_INC="-I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
98 cd swt
99 %{__make} -f make_linux.mak all \
100     CC="%{__cc}" \
101     CXX="%{__cxx}" \
102     XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
103     OPT="%{rpmcflags}"
104
105 %if %{with cairo}
106 %{__make} -f make_linux.mak make_cairo \
107     CC="%{__cc}" \
108     CXX="%{__cxx}" \
109     XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
110     OPT="%{rpmcflags}"
111 %endif
112
113 %{__make} -f make_linux.mak make_mozilla \
114     CC="%{__cc}" \
115     CXX="%{__cxx}" \
116     XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
117     OPT="%{rpmcflags}"
118
119 #cp library/* .
120 #{__make} -f make_linux.mak make_mozilla \
121 #    OPT="%{rpmcflags}"
122 cd ..
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126 install -d $RPM_BUILD_ROOT%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch}
127 cd swt
128 install libswt-*.so \
129     $RPM_BUILD_ROOT%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch}
130
131 %if %{with cairo}
132 install libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt
133 %endif
134
135 install *.html $RPM_BUILD_ROOT%{_libdir}/swt
136 cp -rf about_files $RPM_BUILD_ROOT%{_libdir}/swt
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %files
142 %defattr(644,root,root,755)
143 %dir %{_libdir}/swt
144 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*
145 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os
146 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux
147 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}
148 %{_libdir}/swt/about_files
149 %{_libdir}/swt/about.html
150 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-atk-gtk-*.so
151 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-awt-gtk-*.so
152 %if %{with gnome}
153 %attr(755,root,root) %{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gnome-gtk-*.so
154 %endif
155 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gtk-*.so
156 #%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-kde-gtk*.so
157 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-mozilla-gtk-*.so
158 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-pi-gtk-*.so
This page took 0.070878 seconds and 4 git commands to generate.