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

Contents of /trunk/packaging/lenny/builddeb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2294 - (show annotations)
Mon Mar 2 03:44:27 2009 UTC (10 years, 6 months ago) by jfenwick
File size: 2630 byte(s)
Added instructions on how to install debian package to the install guide.
Wrapper script generation now produces two scripts (escript and finleypython).
The two are identical - eventually we will remove finleypython.

Modified the wrapper script so it will print a message and start the python interpreter if you don't specify a script.
1 #!/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 SRCDIR=`pwd`
7 WRAPPERNAME=escript
8 ALTWRAPPERNAME=finleypython
9 OUTPUTROOT=$SRCDIR/build/package/lenny/escript
10 LIBOUT=$OUTPUTROOT/usr/lib/escript
11 BINOUT=$OUTPUTROOT/usr/bin
12 PKGFILES=$SRCDIR/packaging/lenny
13
14 # check to be sure we are running from the project root and that we look like the root user
15
16 if [ `whoami` != 'root' ]
17 then
18 echo "Please execute this script under fakeroot."
19 echo "fakeroot $0"
20 exit 1
21 fi
22
23 if [ ! -d escript/src ]
24 then
25 echo "Please execute this script from the root of the project"
26 exit 3
27 fi
28
29 if [ -d $OUTPUTROOT ]
30 then
31 rm -rf $OUTPUTROOT || (echo "Error could not clean build area";exit 2)
32 fi
33
34 mkdir -p $OUTPUTROOT
35
36 #First copy debian skeleton
37 cp -r $PKGFILES/escript/* $OUTPUTROOT
38
39
40 mkdir -p $OUTPUTROOT/usr/share/man/man1
41
42 #copy the man page
43 cp $SRCDIR/doc/manpage/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1
44 cp $SRCDIR/doc/manpage/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
45 gzip $OUTPUTROOT/usr/share/man/man1/$WRAPPERNAME.1
46 gzip $OUTPUTROOT/usr/share/man/man1/$ALTWRAPPERNAME.1
47
48 mkdir -p $LIBOUT/lib
49 mkdir -p $BINOUT
50 #Should be using install here?
51 cp $SRCDIR/lib/libescript.so $SRCDIR/lib/libfinley.so $LIBOUT/lib
52 cp -r $SRCDIR/esys $LIBOUT
53
54 # content from finley_wrapper_writer.sh
55 # Not calling the original script because it polutes the environment eg explicit python path
56
57 # We should be using the standard python
58 export PYTHON_CMD=python
59 export ESCRIPT_ROOT=/usr/lib/escript
60
61 sed -e "s%@@ESCRIPT_ROOT@@%$ESCRIPT_ROOT%" \
62 -e "s%@@LD_LIBRARY_PATH@@%\$ESCRIPT_ROOT/lib:\$LD_LIBRARY_PATH%" \
63 -e "s%@@PYTHONPATH@@%\$ESCRIPT_ROOT:\$PYTHONPATH%" \
64 -e "s%@@PYTHON_CMD@@%$PYTHON_CMD%" \
65 -e "s%@@PATH@@%\$PATH%" \
66 < $SRCDIR/scripts/finley_wrapper_template > $BINOUT/$WRAPPERNAME
67
68 #end content from finley_wrapper_writer.sh
69
70 cd $BINOUT
71 ln -s $WRAPPERNAME $ALTWRAPPERNAME
72 cd $SRCDIR
73
74 cp release/doc/
75
76 #Nuke any svn stuff that made it in
77 find $OUTPUTROOT -name ".svn" | xargs rm -rf
78
79
80 #Say what version of debian packaging we are using:
81 echo 2.0 > $OUTPUTROOT/../debian-binary
82
83 #Check some permissions
84 chmod og=rx $BINOUT/$WRAPPERNAME
85 if [ -f $LIBOUT/pythonMPI ]
86 then
87 chmod og=rx $LIBOUT/pythonMPI
88 fi
89
90 cd $OUTPUTROOT
91
92 cd usr/share/doc/escript/
93 gzip changelog.Debian
94
95 cd $OUTPUTROOT
96 #Fix directory perms
97 chmod -R og-w .
98
99 cd DEBIAN
100 tar czf control.tar.gz .
101 mv control.tar.gz ../../
102 cd ..
103 tar czf data.tar.gz usr
104 mv data.tar.gz ..
105 cd ..
106
107 ar rcu escript.deb debian-binary control.tar.gz data.tar.gz
108
109
110
111

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26