]> git.pld-linux.org Git - packages/eclipse-swt.git/blob - eclipse-swt.spec
- updated to 3.3, awt dropped, mozilla replaced with xulrunner, glx is new
[packages/eclipse-swt.git] / eclipse-swt.spec
1 # NOTE
2 # - build instructions: http://www.eclipse.org/swt/faq.php#howbuilddll
3 #
4 # Conditional build:
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
9 #
10 %define   _buildid  200706251500
11 #define   _mver   M6
12 %define   _ver_major  3.3
13 %define   _ver_minor  0
14 %define   _ver_swt    3346
15 %define   _ver    %{_ver_major}.%{_ver_minor}
16
17 %ifarch %{x8664}
18 %define _swtsrcdir  plugins/org.eclipse.swt.gtk.linux.x86_64
19 %define _swtgtkdir  plugins/org.eclipse.swt.gtk.linux.x86_64
20 %endif
21
22 %ifarch ppc
23 %define _swtsrcdir  plugins/org.eclipse.swt.gtk.linux.ppc
24 %define _swtgtkdir  plugins/org.eclipse.swt.gtk.linux.ppc
25 %endif
26
27 %ifarch %{ix86}
28 %define _swtsrcdir  plugins/org.eclipse.swt.gtk.linux.x86
29 %define _swtgtkdir  plugins/org.eclipse.swt.gtk.linux.x86
30 %endif
31
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
34 %ifarch %{x8664}
35 %define         _noautostrip  .*\\.so
36 %endif
37
38 Summary:        SWT - a widget toolkit for Java
39 Summary(pl.UTF-8):      SWT - zestaw widgetów dla Javy
40 Name:           eclipse-swt
41 Version:        %{_ver_major}
42 #Release:       0.%{_mver}_%{_buildid}.1
43 Release:        0.1
44 License:        CPL v1.0
45 Group:          Libraries
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
63 BuildRequires:  unzip
64 %{?with_xulrunner:BuildRequires:        xulrunner-devel}
65 BuildRequires:  zip
66 Requires:       ant
67 Requires:       jdk >= 1.4
68 ExclusiveArch:  %{ix86} %{x8664} ppc
69 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
70
71 %description
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.
75
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.
80
81 %prep
82 %setup -q -c
83 %ant -f %{_swtsrcdir}/build.xml src.zip
84 mkdir swt
85 cd swt
86 %{__unzip} -qq -o ../%{_swtsrcdir}/src.zip
87 %patch0 -p0
88 %patch2 -p0
89
90 %build
91 %{__make} -f make_linux.mak -C swt \
92         make_swt make_atk \
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)"} \
97         all \
98         JAVA_HOME="%{java_home}" \
99         CC="%{__cc}" \
100         CXX="%{__cxx}" \
101         XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
102         OPT="%{rpmcflags}"
103
104 %ant -f %{_swtsrcdir}/build.xml build.jars
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT%{_javadir}
109 install %{_swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir}
110
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
115         lib=${a##*/}
116         ln -sf $dir/$lib $RPM_BUILD_ROOT%{_libdir}/swt
117 done
118
119 %if %{with cairo}
120 install swt/libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt
121 %endif
122
123 install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt
124 cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt
125
126 %clean
127 rm -rf $RPM_BUILD_ROOT
128
129 %files
130 %defattr(644,root,root,755)
131 %dir %{_libdir}/swt
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}
136 %{_javadir}/swt.jar
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}
This page took 0.270259 seconds and 4 git commands to generate.