/[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 2293 by jfenwick, Fri Feb 27 05:34:51 2009 UTC revision 2546 by jfenwick, Mon Jul 20 05:35:08 2009 UTC
# Line 3  Line 3 
3  #This script produced with the aid of "The Debian System concepts and techniques" By Martin F. Krafft  #This script produced with the aid of "The Debian System concepts and techniques" By Martin F. Krafft
4  # Its purpose is to produce a .deb for escript  # Its purpose is to produce a .deb for escript
5    
6    
7    #A ~ in front of the version number indicates a pre-release and will sort earlier than versions without ~
8    VERSION=~3.0-1
9  SRCDIR=`pwd`  SRCDIR=`pwd`
10  WRAPPERNAME=finleypython  WRAPPERNAME=escript
11    #ALTWRAPPERNAME=finleypython
12  OUTPUTROOT=$SRCDIR/build/package/lenny/escript  OUTPUTROOT=$SRCDIR/build/package/lenny/escript
13  LIBOUT=$OUTPUTROOT/usr/lib/escript  LIBOUT=$OUTPUTROOT/usr/lib/escript
14  BINOUT=$OUTPUTROOT/usr/bin  BINOUT=$OUTPUTROOT/usr/bin
# Line 30  then Line 34  then
34    rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)    rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)
35  fi  fi
36    
37    ARCHV=`uname -m`
38    
39    
40    case "$ARCHV" in
41       "i686" ) ARCH="i686";;
42       "x86_64" ) ARCH="amd64";;
43       *) echo "Unknown architecture $ARCHV. Unable to build package";exit 3;;
44    esac
45    
46  mkdir -p $OUTPUTROOT  mkdir -p $OUTPUTROOT
47    
# Line 41  cp -r $PKGFILES/escript/* $OUTPUTROOT Line 52  cp -r $PKGFILES/escript/* $OUTPUTROOT
52  mkdir -p $OUTPUTROOT/usr/share/man/man1  mkdir -p $OUTPUTROOT/usr/share/man/man1
53    
54  #copy the man page  #copy the man page
55  cp $SRCDIR/doc/manpage/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1  cp $SRCDIR/doc/manpage/man1/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1
56    #cp $SRCDIR/doc/manpage/man1/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
57    gzip $OUTPUTROOT/usr/share/man/man1/$WRAPPERNAME.1
58    #gzip $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
59    
60    #copy the documentation
61    cp $SRCDIR/release/doc/escript_examples.tar.gz $OUTPUTROOT/usr/share/doc/escript/
62    cp $SRCDIR/release/doc/install/install.pdf $OUTPUTROOT/usr/share/doc/escript
63    cp $SRCDIR/release/doc/user/guide.pdf $OUTPUTROOT/usr/share/doc/escript
64    cp -r $SRCDIR/release/doc/epydoc $OUTPUTROOT/usr/share/doc/escript/python_html
65    
66  mkdir -p $LIBOUT/lib  mkdir -p $LIBOUT/lib
67  mkdir -p $BINOUT  mkdir -p $BINOUT
68  #Should be using install here?  #Should be using install here?
69  cp $SRCDIR/lib/libescript.so $SRCDIR/lib/libfinley.so $LIBOUT/lib  cp $SRCDIR/lib/* $LIBOUT/lib
70  cp -r $SRCDIR/esys $LIBOUT  cp -r $SRCDIR/esys $LIBOUT
71    
 # content from finley_wrapper_writer.sh  
 # Not calling the original script because it polutes the environment eg explicit python path  
   
72  # We should be using the standard python  # We should be using the standard python
 export PYTHON_CMD=python  
73  export ESCRIPT_ROOT=/usr/lib/escript  export ESCRIPT_ROOT=/usr/lib/escript
74    
75  sed -e "s%@@ESCRIPT_ROOT@@%$ESCRIPT_ROOT%"      \  sed -e "s%STDLOCATION=0%STDLOCATION=1%" \
76    -e "s%@@LD_LIBRARY_PATH@@%\$ESCRIPT_ROOT/lib:\$LD_LIBRARY_PATH%"      \  < $SRCDIR/bin/escript > $BINOUT/$WRAPPERNAME
   -e "s%@@PYTHONPATH@@%\$ESCRIPT_ROOT:\$PYTHONPATH%"            \  
   -e "s%@@PYTHON_CMD@@%$PYTHON_CMD%"            \  
   -e "s%@@PATH@@%\$PATH%"               \  
 < $SRCDIR/scripts/finley_wrapper_template > $BINOUT/$WRAPPERNAME  
77    
78  #end content from finley_wrapper_writer.sh  #end content from finley_wrapper_writer.sh
79    
80    cd $BINOUT
81    #ln -s $WRAPPERNAME $ALTWRAPPERNAME
82    cd $SRCDIR
83    
84  #Nuke any svn stuff that made it in  #Nuke any svn stuff that made it in
85  find $OUTPUTROOT -name ".svn" | xargs rm -rf  find $OUTPUTROOT -name ".svn" | xargs rm -rf
86    
87    
88  #Say what version of debian packaging we are using:  #Say what version of the debian packaging format we are using:
89    #This is NOT the package version
90  echo 2.0 > $OUTPUTROOT/../debian-binary  echo 2.0 > $OUTPUTROOT/../debian-binary
91    
92  #Check some permissions  #Check some permissions
# Line 89  cd $OUTPUTROOT Line 106  cd $OUTPUTROOT
106  chmod -R og-w .  chmod -R og-w .
107    
108  cd DEBIAN  cd DEBIAN
109  tar czf control.tar.gz .  
110  mv control.tar.gz ../../  #Now we need to update the architecture
111    mv control control.old
112    sed -e "s%Architecture: i386%Architecture: $ARCH%" < control.old > control
113    rm control.old
114    
115    tar czf ../../control.tar.gz .
116  cd ..  cd ..
117  tar czf data.tar.gz usr  tar czf ../data.tar.gz usr
 mv data.tar.gz ..  
118  cd ..  cd ..
119    
120  ar rcu escript.deb debian-binary control.tar.gz data.tar.gz  ar rcu escript-$VERSION\_$ARCH.deb debian-binary control.tar.gz data.tar.gz
121    
122    
123    

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

  ViewVC Help
Powered by ViewVC 1.1.26