Home | History | Annotate | Download | only in core
      1 #
      2 # Copyright (c) 2008 Sun Microsystems, Inc.
      3 # This file and all modifications and additions to the pristine
      4 # package are under the same license as the package itself.
      5 
      6 %define owner Herch
      7 
      8 %include Solaris.inc
      9 
     10 %define OSR 9526:3.3.2
     11 
     12 Name:                SUNWswt
     13 Summary:             Standard Widget Toolkit
     14 Version:             3.3.2
     15 Source:              http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/eclipse/downloads/drops/R-%{version}-200802211800/swt-%{version}-gtk-solaris-sparc.zip
     16 
     17 SUNW_BaseDir:        %{_basedir}
     18 BuildRoot:           %{_tmppath}/%{name}-%{version}-build
     19 SUNW_Copyright:      %{name}.copyright
     20 %include default-depend.inc
     21 
     22 Requires: SUNWgtk2
     23 Requires: SUNWgnome-libs
     24 Requires: SUNWgnome-vfs 
     25 Requires: SUNWxwrtl
     26 Requires: SUNWpng
     27 BuildRequires: SUNWgtk2-devel
     28 BuildRequires: SUNWpng-devel
     29 BuildRequires: SUNWcairomm        
     30 BuildRequires: SUNWxwinc
     31 BuildRequires: SUNWgnome-common-devel
     32 
     33 %prep
     34 
     35 %setup -q -c -n swt-%version
     36 unzip -o src.zip
     37 
     38 %build
     39 
     40 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     41 if test "x$CPUS" = "x" -o $CPUS = 0; then
     42      CPUS=1
     43 fi
     44 
     45 export CFLAGS="%optflags"
     46 export LDFLAGS="%{_ldflags}"
     47 export CXXFLAGS="%cxx_optflags"
     48 
     49 make -j$CPUS -f make_solaris.mak JAVA_HOME=/usr/java make_swt make_atk make_awt  make_cairo make_gnome
     50 
     51 %install
     52 rm -rf $RPM_BUILD_ROOT
     53 
     54 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/swt
     55 mkdir -p $RPM_BUILD_ROOT/%{_datadir}/lib/java
     56 cp *.so $RPM_BUILD_ROOT/%{_libdir}/swt
     57 cp *.jar $RPM_BUILD_ROOT/%{_datadir}/lib/java
     58 
     59 %clean
     60 rm -rf $RPM_BUILD_ROOT
     61 
     62 %files
     63 %defattr (-, root, bin)
     64 %dir %attr (0755, root, bin) %{_libdir}
     65 %dir %attr (0755, root, sys) %{_libdir}/swt
     66 %dir %attr (0755, root, sys) %{_datadir}
     67 %dir %attr (0755, root, sys) %{_datadir}/lib
     68 %dir %attr (0755, root, sys) %{_datadir}/lib/java
     69 %{_libdir}/swt/*
     70 %{_datadir}/lib/java/*
     71 %doc(bzip2) about.html
     72 %doc(bzip2) about_files/IJG_README
     73 %doc(bzip2) about_files/lgpl-v21.txt
     74 %doc(bzip2) about_files/mpl-v11.txt
     75 %dir %attr (0755, root, other) %{_datadir}/doc
     76 
     77 %changelog
     78 * Mon Oct 06 2008 - dermot.mccluskey@sun.com
     79 - Add copyright files
     80 * Fri Oct 03 2008 - christian.kelly@sun.com
     81 - Add empty copyright to allow spec to build.
     82 * Fri Jun 25 2008 - harshal.patil@sun.com
     83 - rename SFEswt to SUNWswt
     84 - add BuildRequires section
     85 - removed Dt dependacy from make 
     86 - add Requires section
     87 - add %{_datadir}/lib/java in %files
     88 * Fri Jun 20 2008 - river@wikimedia.org
     89 - Initial spec.
     90 
     91