]> git.pld-linux.org Git - packages/eclipse-swt.git/blob - eclipse-swt.spec
- relative symlinks; rel 1
[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:        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 URL:            http://www.eclipse.org/swt
51 %{?with_glx:BuildRequires:      OpenGL-devel}
52 BuildRequires:  ant >= 1.6.1
53 BuildRequires:  atk-devel
54 %{?with_cairo:BuildRequires:  cairo-devel}
55 BuildRequires:  gtk+2-devel >= 2.0.0
56 BuildRequires:  jdk >= 1.4
57 %{?with_gnome:BuildRequires:  libgnomeui-devel}
58 %{?with_xulrunner:BuildRequires:        libstdc++-devel}
59 BuildRequires:  pkgconfig
60 BuildRequires:  rpmbuild(macros) >= 1.213
61 BuildRequires:  unzip
62 %{?with_xulrunner:BuildRequires:        xulrunner-devel}
63 BuildRequires:  zip
64 Requires:       ant
65 Requires:       jdk >= 1.4
66 ExclusiveArch:  %{ix86} %{x8664} ppc
67 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68
69 %description
70 SWT is a widget toolkit for Java designed to provide efficient,
71 portable access to the user-interface facilities of the operating
72 systems on which it is implemented.
73
74 %description -l pl.UTF-8
75 SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny,
76 przenośny dostęp do udogodnień interfejsu użytkownika na tych
77 systemach operacyjnych, na których został zaimplementowany.
78
79 %prep
80 %setup -q -c
81 %ant -f %{_swtsrcdir}/build.xml src.zip
82 mkdir swt
83 cd swt
84 %{__unzip} -qq -o ../%{_swtsrcdir}/src.zip
85 %patch0 -p0
86
87 %build
88 %{__make} -f make_linux.mak -C swt \
89         make_swt make_atk \
90         %{?with_glx:make_glx} \
91         %{?with_gnome:make_gnome} \
92         %{?with_cairo:make_cairo} \
93         %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags xulrunner-xpcom)"} \
94         JAVA_HOME="%{java_home}" \
95         CC="%{__cc}" \
96         CXX="%{__cxx}" \
97         XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
98         OPT="%{rpmcflags}"
99
100 %ant -f %{_swtsrcdir}/build.xml build.jars
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104 install -d $RPM_BUILD_ROOT%{_javadir}
105 install %{_swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir}
106
107 dir=%{_libdir}/swt/%{_swtgtkdir}_%{_ver_major}.%{_ver_minor}/os/linux/%{_eclipse_arch}
108 install -d $RPM_BUILD_ROOT$dir
109 for a in swt/libswt-*.so; do
110         install $a $RPM_BUILD_ROOT$dir
111         lib=${a##*/}
112         ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt
113 done
114
115 %if %{with cairo}
116 install swt/libcairo.so* $RPM_BUILD_ROOT%{_libdir}/swt
117 %endif
118
119 install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt
120 cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %files
126 %defattr(644,root,root,755)
127 %dir %{_libdir}/swt
128 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*
129 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os
130 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux
131 %dir %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}
132 %{_javadir}/swt.jar
133 %{_libdir}/swt/about_files
134 %{_libdir}/swt/about.html
135 %{_libdir}/swt/libswt-*-%{_ver_swt}.so
136 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-atk-gtk-*.so
137 %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-glx-gtk-*.so}
138 %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gnome-gtk-*.so}
139 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-gtk-*.so
140 %attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-pi-gtk-*.so
141 %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{_swtgtkdir}_*.*.*/os/linux/%{_eclipse_arch}/libswt-xulrunner-gtk-*.so}
This page took 0.474983 seconds and 4 git commands to generate.