Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWsexy-python.spec
      3 #
      4 # Copyright 2006 Sun Microsystems, Inc.
      5 # This file and all modifications and additions to the pristine
      6 # package are under the same license as the package itself.
      7 #
      8 %define owner erwannc
      9 #
     10 
     11 %define OSR 10058:0.11.1
     12 
     13 ####################################################################
     14 # sexy-python is a set of Python bindings around libsexy
     15 ####################################################################
     16 
     17 %include Solaris.inc
     18 
     19 Name:                    SUNWsexy-python
     20 Summary:                 Python bindings around libsexy
     21 Version:                 0.1.9
     22 Source:			 http://releases.chipx86.com/libsexy/sexy-python/sexy-python-%{version}.tar.gz
     23 Patch1:			 sexy-python-01-solaris-port.diff
     24 URL:			 http://www.chipx86.com/wiki/Libsexy
     25 SUNW_BaseDir:            %{_basedir}
     26 SUNW_Copyright:          %{name}.copyright
     27 
     28 %ifnarch sparc
     29 # these packages are only avavilable on x86
     30 # =========================================
     31 
     32 BuildRoot:               %{_tmppath}/%{name}-%{version}-build
     33 %include default-depend.inc
     34 Requires: SUNWgtk2
     35 Requires: SUNWlibsexy
     36 Requires: SUNWgnome-python-libs
     37 BuildRequires: SUNWgtk2-devel
     38 BuildRequires: SUNWgnome-python-libs-devel
     39 BuildRequires: SUNWlibsexy
     40 BuildRequires: SUNWpython-setuptools
     41 
     42 %define pythonver 2.4
     43 
     44 %prep
     45 %setup -q -n sexy-python-%version
     46 %patch1 -p1
     47 
     48 %build
     49 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     50 if test "x$CPUS" = "x" -o $CPUS = 0; then
     51     CPUS=1
     52 fi
     53 
     54 export CFLAGS="%optflags"
     55 export RPM_OPT_FLAGS="$CFLAGS"
     56 export LDFLAGS="%{_ldflags}"
     57 export MSGFMT="/usr/bin/msgfmt"
     58 
     59 ./configure --prefix=%{_prefix}			\
     60 	    --bindir=%{_bindir}			\
     61 	    --sysconfdir=%{_sysconfdir}		\
     62 	    --includedir=%{_includedir}		\
     63 	    --mandir=%{_mandir}			\
     64             --libdir=%{_libdir}
     65 
     66 make -j$CPUS
     67 
     68 %install
     69 rm -rf $RPM_BUILD_ROOT
     70 make install DESTDIR=$RPM_BUILD_ROOT
     71 rm $RPM_BUILD_ROOT%{_libdir}/python2.4/site-packages/*.la
     72 
     73 # move to vendor-packages
     74 mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages
     75 mv $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages/* \
     76    $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages/
     77 rmdir $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages
     78 
     79 %{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
     80 
     81 %clean
     82 rm -rf $RPM_BUILD_ROOT
     83 
     84 %files
     85 %defattr (-, root, bin)
     86 %dir %attr (0755, root, bin) %{_libdir}
     87 %{_libdir}/python%{pythonver}/vendor-packages/*
     88 %dir %attr (0755, root, sys) %{_datadir}
     89 %{_datadir}/pygtk/*
     90 %doc AUTHORS NEWS README
     91 %doc(bzip2) COPYING ChangeLog
     92 %dir %attr (0755, root, other) %{_datadir}/doc
     93 
     94 # endif for "ifnarch sparc"
     95 %endif
     96 
     97 %changelog
     98 * Wed Sep 17 2008 - matt.keenn@sun.com
     99 - Update copyright
    100 * Wed Mar 26 2008 - dave.lin@sun.com
    101 - change to not build this component on SPARC
    102 * Tue Mar 18 2008 - damien.carbery@sun.com
    103 - Add Build/Requires for SUNWgnome-python-libs.
    104 * Wed Feb 13 2008 - erwann@sun.com
    105 - Moved to SFO
    106 * Sat Sep 08 2007 - trisk@acm.jhu.edu
    107 - Fix rules, update Python library dir
    108 * Fri Aug  24 2007 - erwann@sun.com
    109 - Initial spec
    110 
    111