/[escript]/trunk/packaging/debuntu/builddeb
ViewVC logotype

Diff of /trunk/packaging/debuntu/builddeb

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/packaging/lenny/builddeb revision 2923 by jfenwick, Thu Feb 4 04:05:36 2010 UTC trunk/packaging/debuntu/builddeb revision 3322 by jfenwick, Thu Oct 28 05:26:37 2010 UTC
# Line 8  Line 8 
8  SRCDIR=`pwd`  SRCDIR=`pwd`
9  WRAPPERNAME=run-escript  WRAPPERNAME=run-escript
10  #ALTWRAPPERNAME=finleypython  #ALTWRAPPERNAME=finleypython
11  OUTPUTROOT=$SRCDIR/build/package/lenny/escript  OUTPUTROOT=$SRCDIR/build/package/debuntu/escript
12  LIBOUT=$OUTPUTROOT/usr/lib/escript  LIBOUT=$OUTPUTROOT/usr/lib/escript
13  BINOUT=$OUTPUTROOT/usr/bin  BINOUT=$OUTPUTROOT/usr/bin
14  PKGFILES=$SRCDIR/packaging/lenny  PKGFILES=$SRCDIR/packaging/debuntu
15    
16  # check to be sure we are running from the project root and that we look like the root user  # check to be sure we are running from the project root and that we look like the root user
17    
# Line 36  fi Line 36  fi
36    
37  distro=$1  distro=$1
38    
39  case "$distro" in  # case "$distro" in
40    "lenny" ) ;;  #   "lenny" ) ;;
41    "jaunty" ) needpy26=yes;;  #   "jaunty" ) needpy26=yes;;
42    "karmic" ) needalt=yes;;  #   "karmic" ) needalt=yes;;
43    *) echo "Unknown distro $distro"; exit 4;;  #   "lucid" ) needalt=yes;;
44  esac  #   "maverick" ) needalt=yes;;
45    #   *) echo "Unknown distro $distro"; exit 4;;
46    # esac
47    
48  if [ -d $OUTPUTROOT ]  if [ -d $OUTPUTROOT ]
49  then  then
# Line 69  then Line 71  then
71     exit 6     exit 6
72  fi  fi
73    
74    #Now try to identify versions we are using
75    PYPKG=`dpkg --get-selections 'python?*' | grep install | grep -v '-' | cut -f1`
76    if [ `echo $PYPKG | wc -w ` != "1" ]
77    then
78        echo "Can't determine the version of python"
79        exit 8
80    fi
81    
82    echo "Python package is $PYPKG."
83    
84    BOOSTPKG=`dpkg --get-selections 'libboost-python?????*' | grep -v 'de' | grep 'install' | cut -f1`
85    if [ `echo $BOOSTPKG | wc -w` != "1" ]
86    then
87        echo "Can't determine the version of boost"
88        exit 9
89    fi
90    
91    echo "Boost package is $BOOSTPKG"
92    
93  echo "Reading package version from  $PKGFILES/escript/DEBIAN/control"  echo "Reading package version from  $PKGFILES/escript/DEBIAN/control"
94  #Now get the package version  #Now get the package version
95  VERSION=`grep "Version:" $PKGFILES/escript/DEBIAN/control | cut -f2 -d\ `  VERSION=`grep "Version:" $PKGFILES/escript/DEBIAN/control | cut -f2 -d\ `
# Line 89  find $OUTPUTROOT -name ".svn" | xargs rm Line 110  find $OUTPUTROOT -name ".svn" | xargs rm
110    
111  pkgname=escript  pkgname=escript
112    
 #If we are building transitional package we may need replacement files  
 if [ -n "$needalt" ]  
 then  
   echo "Switching to alternative package"  
   cp -r $PKGFILES/escript-noalias/* $OUTPUTROOT  
   pkgname=escript-noalias  
   find $OUTPUTROOT -name ".svn" | xargs rm -rf  
 fi  
   
113  mkdir -p $OUTPUTROOT/usr/share/man/man1  mkdir -p $OUTPUTROOT/usr/share/man/man1
114    
115  #copy the man page  #copy the man page
# Line 131  export ESCRIPT_ROOT=/usr/lib/escript Line 143  export ESCRIPT_ROOT=/usr/lib/escript
143    
144  sed -e "s%STDLOCATION=0%STDLOCATION=1%" < $SRCDIR/bin/$WRAPPERNAME > $BINOUT/$WRAPPERNAME  sed -e "s%STDLOCATION=0%STDLOCATION=1%" < $SRCDIR/bin/$WRAPPERNAME > $BINOUT/$WRAPPERNAME
145    
146  if [ -z "$needalt" ]  sed -ie "s%PYPKG%$PYPKG%" $OUTPUTROOT/DEBIAN/control
147  then  sed -ie "s%BOOSTPKG%$BOOSTPKG%" $OUTPUTROOT/DEBIAN/control
148      pushd $BINOUT > /dev/null || (echo "A directory has disappeared" ; exit 8)  
149      ln -s $WRAPPERNAME escript  
150      popd > /dev/null  # if [ -z "$needalt" ]
151  fi  # then
152    #   pushd $BINOUT > /dev/null || (echo "A directory has disappeared" ; exit 8)
153    #   ln -s $WRAPPERNAME escript
154    #   popd > /dev/null
155    # fi
156    
157  #end content from finley_wrapper_writer.sh  #end content from finley_wrapper_writer.sh
158    
# Line 171  cd DEBIAN Line 187  cd DEBIAN
187    
188  #Now we need to update the architecture  #Now we need to update the architecture
189  sed -i -e "s%Architecture: i386%Architecture: $ARCH%" control  sed -i -e "s%Architecture: i386%Architecture: $ARCH%" control
190  if [ -n "$needpy26" ]  # if [ -n "$needpy26" ]
191  then  # then
192    echo "Replacing python2.5 dependency with python2.6 for jaunty"  #   echo "Replacing python2.5 dependency with python2.6 for jaunty"
193    sed -i -e "s%Depends: python2.5%Depends: python2.6%" control  #   sed -i -e "s%Depends: python2.5%Depends: python2.6%" control
194  fi  # fi
195    
196  tar czf ../../control.tar.gz .  tar czf ../../control.tar.gz .
197  cd ..  cd ..
# Line 190  mkdir -p $SRCDIR/release/pkg Line 206  mkdir -p $SRCDIR/release/pkg
206  cp $pkgname-$VERSION-$distro\_$ARCH.deb $SRCDIR/release/pkg  cp $pkgname-$VERSION-$distro\_$ARCH.deb $SRCDIR/release/pkg
207    
208    
209    echo "Control file is:"
210    cat $OUTPUTROOT/DEBIAN/control

Legend:
Removed from v.2923  
changed lines
  Added in v.3322

  ViewVC Help
Powered by ViewVC 1.1.26