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

Diff of /trunk/packaging/debuntu/builddeb

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

revision 2546 by jfenwick, Mon Jul 20 05:35:08 2009 UTC revision 2602 by jfenwick, Tue Aug 11 00:38:42 2009 UTC
# Line 5  Line 5 
5    
6    
7  #A ~ in front of the version number indicates a pre-release and will sort earlier than versions without ~  #A ~ in front of the version number indicates a pre-release and will sort earlier than versions without ~
 VERSION=~3.0-1  
8  SRCDIR=`pwd`  SRCDIR=`pwd`
9  WRAPPERNAME=escript  WRAPPERNAME=escript
10  #ALTWRAPPERNAME=finleypython  #ALTWRAPPERNAME=finleypython
# Line 29  then Line 28  then
28    exit 3    exit 3
29  fi  fi
30    
31    if [ $# -lt 1 ]
32    then
33      echo "Usage: builddeb distro"
34      exit 4
35    fi
36    
37    distro=$1
38    
39    case "$distro" in
40      "lenny" ) echo "" ;;
41      "jaunty" ) echo "";;
42      *) echo "Unknown distro $distro"; exit 4;;
43    esac
44    
45  if [ -d $OUTPUTROOT ]  if [ -d $OUTPUTROOT ]
46  then  then
47    rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)    rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)
# Line 38  ARCHV=`uname -m` Line 51  ARCHV=`uname -m`
51    
52    
53  case "$ARCHV" in  case "$ARCHV" in
54     "i686" ) ARCH="i686";;     "i686" ) ARCH="i386";;
55     "x86_64" ) ARCH="amd64";;     "x86_64" ) ARCH="amd64";;
56     *) echo "Unknown architecture $ARCHV. Unable to build package";exit 3;;     *) echo "Unknown architecture $ARCHV. Unable to build package";exit 3;;
57  esac  esac
58    
59    #Check to ensure people are only building from clean checkouts
60    #(Or at least a single consistent version).
61    SVNREV=`svnversion` || (echo "Error - can't determine svn version"; exit 5)
62    SVNERR=`echo $SVNREV | grep '[^[:digit:]]'`
63    
64    if [ -n "$SVNERR" ]
65    then
66       echo "Please build packages using a clean checkout."
67       echo "Your version string shows $SVNREV"
68       exit 6
69    fi
70    
71    echo "Reading package version from  $PKGFILES/escript/DEBIAN/control"
72    #Now get the package version
73    VERSION=`grep "Version:" $PKGFILES/escript/DEBIAN/control | cut -f2 -d\ `
74    
75    read -p "Build package with version $VERSION?(Y/N)" DOBUILD
76    
77    if [ "$DOBUILD" != 'Y' ]
78    then
79       echo "Aborting"
80       exit 7
81    fi
82    
83  mkdir -p $OUTPUTROOT  mkdir -p $OUTPUTROOT
84    
85  #First copy debian skeleton  #First copy debian skeleton
# Line 110  cd DEBIAN Line 147  cd DEBIAN
147  #Now we need to update the architecture  #Now we need to update the architecture
148  mv control control.old  mv control control.old
149  sed -e "s%Architecture: i386%Architecture: $ARCH%" < control.old > control  sed -e "s%Architecture: i386%Architecture: $ARCH%" < control.old > control
150    if [ $distro == "jaunty" ]
151    then
152      echo "Replacing python2.5 dependency with python2.6 for jaunty"
153      rm control.old
154      mv control control.old
155      sed -e "s%Depends: python2.5%Depends: python2.6%" < control.old > control
156    fi
157  rm control.old  rm control.old
158    
159  tar czf ../../control.tar.gz .  tar czf ../../control.tar.gz .
# Line 117  cd .. Line 161  cd ..
161  tar czf ../data.tar.gz usr  tar czf ../data.tar.gz usr
162  cd ..  cd ..
163    
164  ar rcu escript-$VERSION\_$ARCH.deb debian-binary control.tar.gz data.tar.gz  ar rcu escript-$VERSION-$distro\_$ARCH.deb debian-binary control.tar.gz data.tar.gz
165    
166    
167    

Legend:
Removed from v.2546  
changed lines
  Added in v.2602

  ViewVC Help
Powered by ViewVC 1.1.26