]> git.pld-linux.org Git - packages/eclipse-swt.git/blob - eclipse-swt.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/eclipse-swt.git] / eclipse-swt.spec
1 # NOTE
2 # - build instructions: http://www.eclipse.org/swt/faq.php#howbuilddll
3 #
4 # TODO
5 # - check if any patches are needed
6 #
7 # Conditional build:
8 %bcond_without  gnome           # build without GNOME
9 %bcond_without  xulrunner       # build without xulrunner
10 %bcond_without  glx             # build without GLX
11 %bcond_without  cairo           # build without cairo
12
13 %define buildid         201102101200
14
15 %ifarch %{x8664}
16 %define swtsrcdir       src/plugins/org.eclipse.swt.gtk.linux.x86_64
17 %define swtgtkdir       plugins/org.eclipse.swt.gtk.linux.x86_64
18 %endif
19
20 %ifarch ppc
21 %define swtsrcdir       src/plugins/org.eclipse.swt.gtk.linux.ppc
22 %define swtgtkdir       plugins/org.eclipse.swt.gtk.linux.ppc
23 %endif
24
25 %ifarch %{ix86}
26 %define swtsrcdir       src/plugins/org.eclipse.swt.gtk.linux.x86
27 %define swtgtkdir       plugins/org.eclipse.swt.gtk.linux.x86
28 %endif
29
30 %define eclipse_arch    %(echo %{_target_cpu} | sed 's/i.86/x86/;s/athlon/x86/;s/pentium./x86/')
31
32 Summary:        SWT - a widget toolkit for Java
33 Summary(pl.UTF-8):      SWT - zestaw widgetów dla Javy
34 Name:           eclipse-swt
35 Version:        3.6.2
36 Release:        1
37 License:        CPL v1.0
38 Group:          Libraries
39 Source0:        http://download.eclipse.org/eclipse/downloads/drops/R-%{version}-%{buildid}/eclipse-sourceBuild-srcIncluded-%{version}.zip
40 # Source0-md5:  33a298ea33c6f24462aa0a02b9cda3d4
41 Patch0:         eclipse-xpcom-h.patch
42 URL:            http://www.eclipse.org/swt/
43 %{?with_glx:BuildRequires:      OpenGL-devel}
44 BuildRequires:  ant >= 1.6.1
45 BuildRequires:  atk-devel
46 %{?with_cairo:BuildRequires:  cairo-devel}
47 BuildRequires:  gtk+2-devel >= 2.0.0
48 BuildRequires:  jdk >= 1.4
49 %{?with_gnome:BuildRequires:  libgnomeui-devel}
50 %{?with_xulrunner:BuildRequires:        libstdc++-devel}
51 BuildRequires:  pkgconfig
52 BuildRequires:  rpm-javaprov
53 BuildRequires:  rpmbuild(macros) >= 1.300
54 BuildRequires:  unzip
55 BuildRequires:  xorg-lib-libXtst-devel
56 %{?with_xulrunner:BuildRequires:        xulrunner-devel >= 1.9}
57 BuildRequires:  zip
58 Requires:       jdk >= 1.4
59 Requires:       jpackage-utils
60 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61
62 %description
63 SWT is a widget toolkit for Java designed to provide efficient,
64 portable access to the user-interface facilities of the operating
65 systems on which it is implemented.
66
67 %description -l pl.UTF-8
68 SWT to zestaw widgetów dla Javy zaprojektowany aby dostarczyć wydajny,
69 przenośny dostęp do udogodnień interfejsu użytkownika na tych
70 systemach operacyjnych, na których został zaimplementowany.
71
72 %prep
73 %setup -q -c
74 %ant -f %{swtsrcdir}/build.xml src.zip
75 mkdir swt
76 cd swt
77 %{__unzip} -qq -o ../%{swtsrcdir}/src.zip
78 %patch0 -p0
79
80 %build
81 %{__make} -f make_linux.mak -C swt \
82         make_swt make_atk \
83         %{?with_glx:make_glx} \
84         %{?with_gnome:make_gnome} \
85         %{?with_cairo:make_cairo} \
86         %{?with_xulrunner:make_xulrunner XULRUNNER_INCLUDES="$(pkg-config --cflags libxul-embedding)"} \
87         JAVA_HOME="%{java_home}" \
88         CC="%{__cc}" \
89         CXX="%{__cxx}" \
90         XTEST_LIB_PATH=%{_prefix}/X11R6/%{_lib} \
91         OPT="%{rpmcflags}"
92
93 %ant -f %{swtsrcdir}/build.xml build.jars
94
95 %install
96 rm -rf $RPM_BUILD_ROOT
97 install -d $RPM_BUILD_ROOT%{_javadir}
98 install %{swtsrcdir}/swt.jar $RPM_BUILD_ROOT%{_javadir}
99
100 dir=%{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}
101 install -d $RPM_BUILD_ROOT$dir
102 for a in swt/libswt-*.so; do
103         install $a $RPM_BUILD_ROOT$dir
104         lib=${a##*/}
105         ln -sf ${dir#%{_libdir}/swt/}/$lib $RPM_BUILD_ROOT%{_libdir}/swt
106 done
107
108 install swt/*.html $RPM_BUILD_ROOT%{_libdir}/swt
109 cp -a swt/about_files $RPM_BUILD_ROOT%{_libdir}/swt
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %dir %{_libdir}/swt
117 %dir %{_libdir}/swt/plugins
118 %dir %{_libdir}/swt/%{swtgtkdir}_%{version}
119 %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os
120 %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux
121 %dir %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}
122 %{_javadir}/swt.jar
123 %{_libdir}/swt/about_files
124 %{_libdir}/swt/about.html
125 %{_libdir}/swt/libswt-*-*.so
126 %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-atk-gtk-*.so
127 %{?with_cairo:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-cairo-gtk-*.so}
128 %{?with_glx:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-glx-gtk-*.so}
129 %{?with_gnome:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gnome-gtk-*.so}
130 %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-gtk-*.so
131 %attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-pi-gtk-*.so
132 %{?with_xulrunner:%attr(755,root,root) %{_libdir}/swt/%{swtgtkdir}_%{version}/os/linux/%{eclipse_arch}/libswt-xulrunner-gtk-*.so}
This page took 0.094457 seconds and 4 git commands to generate.