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

Contents of /trunk/packaging/lenny/builddeb

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2359 - (show annotations)
Thu Apr 2 03:50:33 2009 UTC (11 years, 4 months ago) by jfenwick
File size: 2961 byte(s)
Moved man page for easier testing.
Modified the wrapper script to take into account debian packaging.
This setting is recorded in the escript wrapper automatically by the package building 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/man1/$WRAPPERNAME.1 $OUTPUTROOT/usr/share/man/man1
44 cp $SRCDIR/doc/manpage/man1/$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 #copy the documentation
49 cp $SRCDIR/release/doc/escript_examples.tar.gz $OUTPUTROOT/usr/share/doc/escript/
50 cp $SRCDIR/release/doc/install/install.pdf $OUTPUTROOT/usr/share/doc/escript
51 cp $SRCDIR/release/doc/user/guide.pdf $OUTPUTROOT/usr/share/doc/escript
52 cp -r $SRCDIR/release/doc/epydoc $OUTPUTROOT/usr/share/doc/escript/python_html
53
54 mkdir -p $LIBOUT/lib
55 mkdir -p $BINOUT
56 #Should be using install here?
57 cp $SRCDIR/lib/* $LIBOUT/lib
58 cp -r $SRCDIR/esys $LIBOUT
59
60 # content from finley_wrapper_writer.sh
61 # Not calling the original script because it polutes the environment eg explicit python path
62
63 # We should be using the standard python
64 export PYTHON_CMD=python
65 export ESCRIPT_ROOT=/usr/lib/escript
66
67 sed -e "s%@@ESCRIPT_ROOT@@%$ESCRIPT_ROOT%" \
68 -e "s%@@LD_LIBRARY_PATH@@%\$ESCRIPT_ROOT/lib:\$LD_LIBRARY_PATH%" \
69 -e "s%@@PYTHONPATH@@%\$ESCRIPT_ROOT:\$PYTHONPATH%" \
70 -e "s%@@PYTHON_CMD@@%$PYTHON_CMD%" \
71 -e "s%@@PATH@@%\$PATH%" \
72 -e "s%STDLOCATION=0%STDLOCATION=1%" \
73 < $SRCDIR/scripts/finley_wrapper_template > $BINOUT/$WRAPPERNAME
74
75 #end content from finley_wrapper_writer.sh
76
77 cd $BINOUT
78 ln -s $WRAPPERNAME $ALTWRAPPERNAME
79 cd $SRCDIR
80
81 #Nuke any svn stuff that made it in
82 find $OUTPUTROOT -name ".svn" | xargs rm -rf
83
84
85 #Say what version of debian packaging we are using:
86 echo 2.0 > $OUTPUTROOT/../debian-binary
87
88 #Check some permissions
89 chmod og=rx $BINOUT/$WRAPPERNAME
90 if [ -f $LIBOUT/pythonMPI ]
91 then
92 chmod og=rx $LIBOUT/pythonMPI
93 fi
94
95 cd $OUTPUTROOT
96
97 cd usr/share/doc/escript/
98 gzip changelog.Debian
99
100 cd $OUTPUTROOT
101 #Fix directory perms
102 chmod -R og-w .
103
104 cd DEBIAN
105 tar czf control.tar.gz .
106 mv control.tar.gz ../../
107 cd ..
108 tar czf data.tar.gz usr
109 mv data.tar.gz ..
110 cd ..
111
112 ar rcu escript.deb debian-binary control.tar.gz data.tar.gz
113
114
115
116

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26