tun/tun.spec

changeset 525
bf1e61b0917c
parent 387
33ae2d61c751
child 667
9dacbd1d1aa2
     1.1 --- a/tun/tun.spec	Tue Aug 28 18:28:20 2012 +0200
     1.2 +++ b/tun/tun.spec	Tue Aug 28 18:28:30 2012 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  ##
     1.5  ##  tun.spec -- OpenPKG RPM Specification
     1.6 -##  Copyright (c) 2009 Michael Schloh von Bennewitz <michael@schloh.com>
     1.7 +##  Copyright (c) 2012 Michael Schloh von Bennewitz <michael@schloh.com>
     1.8  ##
     1.9  ##  Permission to use, copy, modify, and distribute this software for
    1.10  ##  any purpose with or without fee is hereby granted, provided that
    1.11 @@ -36,19 +36,15 @@
    1.12  Group:        Driver
    1.13  License:      GPL
    1.14  Version:      1.1
    1.15 -Release:      20090106
    1.16 +Release:      20120800
    1.17  
    1.18  #   list of sources
    1.19  Source0:      http://vtun.sourceforge.net/tun/tun-%{version}.tar.gz
    1.20  Patch0:       tun.patch
    1.21  
    1.22  #   build information
    1.23 -Prefix:       %{l_prefix}
    1.24 -BuildRoot:    %{l_buildroot}
    1.25 -BuildPreReq:  OpenPKG, openpkg >= 20050726, make
    1.26 -PreReq:       OpenPKG, openpkg >= 20050726
    1.27 -AutoReq:      no
    1.28 -AutoReqProv:  no
    1.29 +BuildPreReq:  OpenPKG, openpkg >= 20100101, make
    1.30 +PreReq:       OpenPKG, openpkg >= 20100101
    1.31  
    1.32  %description
    1.33      Tun provides packet reception and transmission for user space       
    1.34 @@ -67,6 +63,14 @@
    1.35  %prep
    1.36      %setup -q -n tun-%{version}
    1.37      %patch -p0
    1.38 +    case "%{l_platform -t}" in
    1.39 +        *-sunos5.11 )
    1.40 +            %{l_shtool} subst \
    1.41 +                -e 's;ddi_power\([ \t]*/\* devo_power \*/\);NULL\1;' \
    1.42 +                -e 's;\(else if( (cmd == DDI_SUSPEND)\) || (cmd == DDI_PM_SUSPEND) );\1);' \
    1.43 +                solaris/tun.c
    1.44 +            ;;
    1.45 +    esac
    1.46  
    1.47  %build
    1.48      CC="%{l_cc}" \
    1.49 @@ -79,7 +83,6 @@
    1.50      ) || exit $?
    1.51  
    1.52  %install
    1.53 -    rm -rf $RPM_BUILD_ROOT
    1.54      %{l_shtool} mkdir -f -p -m 755 \
    1.55          $RPM_BUILD_ROOT%{l_prefix}/lib/tun
    1.56      locplat=`grep 'OS_DIR *=' Makefile | sed -e 's;OS_DIR[^=][^=]*= *\([^ ][^ ]*\);\1;'`
    1.57 @@ -92,7 +95,6 @@
    1.58  %files -f files
    1.59  
    1.60  %clean
    1.61 -    rm -rf $RPM_BUILD_ROOT
    1.62  
    1.63  %post
    1.64      if [ $1 -eq 1 -o $1 -eq 2 ]; then

mercurial