Home | History | Annotate | Download | only in core
      1 #
      2 # spec file for package SUNWnet6
      3 #
      4 # Copyright (c) 2008 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 kevmca
      9 #
     10 
     11 %include Solaris.inc
     12 
     13 %define OSR 9813:1.3
     14 
     15 Name:           SUNWnet6
     16 License:        GPLv2.1
     17 Version:        1.3.9
     18 Summary:        A library which eases the development of network-based applications
     19 Source:         http://releases.0x539.de/net6/net6-%{version}.tar.gz
     20 %if %build_l10n
     21 Source1:        l10n-configure.sh
     22 %endif
     23 Patch1:         net6-01-close-prototype.diff
     24 Patch2:         net6-02-gnutls.diff
     25 SUNW_Basedir:   %{_basedir}
     26 SUNW_Copyright: %{name}.copyright
     27 URL:            http://gobby.0x539.de/
     28 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
     29 
     30 %include default-depend.inc
     31 Requires:       SUNWsigcpp
     32 Requires:       SUNWgnutls
     33 Requires:       SUNWlibgpg-error
     34 BuildRequires:  SUNWsigcpp-devel
     35 BuildRequires:  SUNWgnutls-devel
     36 
     37 %package devel
     38 Summary:        %{summary} - development files
     39 SUNW_BaseDir:   %{_basedir}
     40 %include default-depend.inc
     41 Requires:       %name
     42 
     43 %if %build_l10n
     44 %package l10n
     45 Summary:        %{summary} - l10n files
     46 SUNW_BaseDir:   %{_basedir}
     47 %include default-depend.inc
     48 Requires:       %{name}
     49 %endif
     50 
     51 %description
     52 net6 is a library which eases the development of network-based applications
     53 as it provides a TCP protocol abstraction for C++. It is portable to both
     54 the Windows and Unix-like platforms.
     55 
     56 %prep
     57 %setup -q -n net6-%{version}
     58 %patch1 -p1
     59 %patch2 -p1
     60 
     61 %build
     62 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
     63 if test "x$CPUS" = "x" -o $CPUS = 0; then
     64     CPUS=1
     65 fi
     66 
     67 %if %cc_is_gcc
     68 %else
     69 export CXX="${CXX} -norunpath"
     70 %endif
     71 export CXXFLAGS="%cxx_optflags"
     72 
     73 %if %build_l10n
     74 sh %SOURCE1 --enable-copyright
     75 %endif
     76 autoconf
     77 ./configure --prefix=%{_prefix} --mandir=%{_mandir} \
     78             --libdir=%{_libdir}              \
     79             --libexecdir=%{_libexecdir}      \
     80             --sysconfdir=%{_sysconfdir} --disable-python
     81 
     82 make -j$CPUS 
     83 
     84 %install
     85 rm -rf $RPM_BUILD_ROOT
     86 make install DESTDIR=$RPM_BUILD_ROOT
     87 
     88 %if %build_l10n
     89 %else
     90 # REMOVE l10n FILES
     91 rm -rf $RPM_BUILD_ROOT%{_datadir}
     92 %endif
     93 
     94 rm -f $RPM_BUILD_ROOT%{_libdir}/lib*a
     95 
     96 %clean
     97 rm -rf $RPM_BUILD_ROOT
     98 
     99 %files
    100 %doc COPYING AUTHORS NEWS ChangeLog README
    101 %dir %attr (0755, root, sys) %{_datadir}
    102 %dir %attr (0755, root, other) %{_datadir}/doc
    103 %defattr (-, root, bin)
    104 %dir %attr (0755, root, bin) %{_libdir}
    105 %{_libdir}/lib*
    106 
    107 %files devel
    108 %defattr (-, root, bin)
    109 %dir %attr (0755, root, bin) %{_libdir}
    110 %dir %attr (0755, root, other) %{_libdir}/pkgconfig
    111 %{_libdir}/pkgconfig/*
    112 %dir %attr (0755, root, bin) %{_includedir}
    113 %{_includedir}/*
    114 
    115 %if %build_l10n
    116 %files l10n
    117 %defattr (-, root, bin)
    118 %dir %attr (0755, root, sys) %{_datadir}
    119 %attr (-, root, other) %{_datadir}/locale
    120 %endif
    121 
    122 %changelog
    123 * Thu Jul 23 2009 - christian.kelly@sun.com
    124 - Add patch to allow build with gnutls.
    125 * Tue Apr 20 2009 - kevin.mcareavey@sun.com
    126 - Bump to 1.3.9
    127 * Thu Sep 11 2008 - kevin.mcareavey@sun.com
    128 - Add %doc to %files for copyright
    129 * Tue Aug 26 2008 - kevin.mcareavey@sun.com
    130 - Cleanup for spec-files-other integration
    131 - Bump to 1.3.6
    132 * Fri Aug 17 2007 - trisk@acm.jhu.edu
    133 - Bump to 1.3.5
    134 - Add URL
    135 * Fri Jul  7 2006 - laca@sun.com
    136 - rename to SFEnet6
    137 - bump to 1.3.0rc2
    138 - fix version number
    139 - update file attributes
    140 - remove upstream patch enum_opts.diff
    141 * Mon May 08 2006 - damien.carbery@sun.com
    142 - Add patch, 02-enum_opts, to fix build.
    143 * Fri May 05 2006 - damien.carbery@sun.com
    144 - Bump to 1.3.0rc1
    145 * Wed Nov 16 2005 - laca@sun.com
    146 - create
    147