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

Annotation of /trunk/packaging/debuntu/builddeb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2546 - (hide annotations)
Mon Jul 20 05:35:08 2009 UTC (10 years, 1 month ago) by jfenwick
Original Path: trunk/packaging/lenny/builddeb
File size: 3019 byte(s)
Updated builddeb script to include the architecture in the package filename.
(the architecture is also written into the control file).
Modified dependencies to not include VTK.
Added python-matplotlib as a "Recomends" dependency.

This means we can build 64bit debs now.
1 jfenwick 2291 #!/bin/bash
2    
3     #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
5    
6 jfenwick 2546
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 jfenwick 2291 SRCDIR=`pwd`
10 jfenwick 2294 WRAPPERNAME=escript
11 jfenwick 2409 #ALTWRAPPERNAME=finleypython
12 jfenwick 2291 OUTPUTROOT=$SRCDIR/build/package/lenny/escript
13     LIBOUT=$OUTPUTROOT/usr/lib/escript
14     BINOUT=$OUTPUTROOT/usr/bin
15     PKGFILES=$SRCDIR/packaging/lenny
16    
17     # check to be sure we are running from the project root and that we look like the root user
18    
19     if [ `whoami` != 'root' ]
20     then
21     echo "Please execute this script under fakeroot."
22     echo "fakeroot $0"
23     exit 1
24     fi
25    
26     if [ ! -d escript/src ]
27     then
28     echo "Please execute this script from the root of the project"
29     exit 3
30     fi
31    
32     if [ -d $OUTPUTROOT ]
33     then
34     rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)
35     fi
36    
37 jfenwick 2546 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 jfenwick 2291 mkdir -p $OUTPUTROOT
47    
48     #First copy debian skeleton
49     cp -r $PKGFILES/escript/* $OUTPUTROOT
50    
51    
52     mkdir -p $OUTPUTROOT/usr/share/man/man1
53    
54     #copy the man page
55 jfenwick 2359 cp $SRCDIR/doc/manpage/man1/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1
56 jfenwick 2409 #cp $SRCDIR/doc/manpage/man1/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
57 jfenwick 2294 gzip $OUTPUTROOT/usr/share/man/man1/$WRAPPERNAME.1
58 jfenwick 2409 #gzip $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
59 jfenwick 2291
60 jfenwick 2302 #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 jfenwick 2291 mkdir -p $LIBOUT/lib
67     mkdir -p $BINOUT
68     #Should be using install here?
69 jfenwick 2359 cp $SRCDIR/lib/* $LIBOUT/lib
70 jfenwick 2291 cp -r $SRCDIR/esys $LIBOUT
71    
72     # We should be using the standard python
73     export ESCRIPT_ROOT=/usr/lib/escript
74    
75 jfenwick 2546 sed -e "s%STDLOCATION=0%STDLOCATION=1%" \
76     < $SRCDIR/bin/escript > $BINOUT/$WRAPPERNAME
77 jfenwick 2291
78     #end content from finley_wrapper_writer.sh
79    
80 jfenwick 2294 cd $BINOUT
81 jfenwick 2409 #ln -s $WRAPPERNAME $ALTWRAPPERNAME
82 jfenwick 2294 cd $SRCDIR
83    
84 jfenwick 2291 #Nuke any svn stuff that made it in
85     find $OUTPUTROOT -name ".svn" | xargs rm -rf
86    
87    
88 jfenwick 2546 #Say what version of the debian packaging format we are using:
89     #This is NOT the package version
90 jfenwick 2291 echo 2.0 > $OUTPUTROOT/../debian-binary
91    
92     #Check some permissions
93     chmod og=rx $BINOUT/$WRAPPERNAME
94     if [ -f $LIBOUT/pythonMPI ]
95     then
96     chmod og=rx $LIBOUT/pythonMPI
97     fi
98    
99     cd $OUTPUTROOT
100    
101     cd usr/share/doc/escript/
102     gzip changelog.Debian
103    
104     cd $OUTPUTROOT
105     #Fix directory perms
106     chmod -R og-w .
107    
108     cd DEBIAN
109 jfenwick 2546
110     #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 jfenwick 2291 cd ..
117 jfenwick 2546 tar czf ../data.tar.gz usr
118 jfenwick 2291 cd ..
119    
120 jfenwick 2546 ar rcu escript-$VERSION\_$ARCH.deb debian-binary control.tar.gz data.tar.gz
121 jfenwick 2291
122    
123    
124    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26