~allsymes/vineyard/fixes

« back to all changes in this revision

Viewing changes to tools/package_vineyard.sh

  • Committer: Christian Dannie Storgaard
  • Date: 2010-02-09 19:49:10 UTC
  • Revision ID: cybolic@smallgrey-20100209194910-us1wopax78s9v25j
Added man page for vineyard-preferences. Fixed some file attributes and removed most (all?) lintian warnings for the build packages. Fixed package build script to work on other computers than my own.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
3
name="vineyard"
4
 
dir="trunk"
 
4
#dir="trunk"
 
5
dir="$(basename "$(readlink -f "$(dirname "$0")/../")")"
5
6
 
6
7
path="$(readlink -f "$(dirname "$0")/../../")"
7
8
version="$(head "$path/$dir/debian/changelog" -n 1 | cut -d\( -f2 | cut -d\) -f1)"
 
9
sourceversion="$(echo $version | cut -d- -f1)"
 
10
 
 
11
sourcedir="$name"-"$sourceversion"
 
12
sourcetar="$name"_"$sourceversion.orig.tar.gz"
8
13
 
9
14
cd "$path"
10
15
 
11
16
echo -n "Copying the $name directory to /tmp..."
12
 
if [ -d "/tmp/$name" ]; then
13
 
        rm -R "/tmp/$name"-"$version"
 
17
if [ -d "/tmp/$sourcedir" ]; then
 
18
        rm -R "/tmp/$sourcedir"
14
19
fi
15
 
cp -R "$dir" "/tmp/$name"-"$version"
16
 
rm -R "/tmp/$name"-"$version/.bzr" "/tmp/$name"-"$version/tools" "/tmp/$name"-"$version/python-wine"
 
20
cp -R "$dir" "/tmp/$sourcedir"
 
21
rm -R "/tmp/$sourcedir/.bzr" "/tmp/$sourcedir/tools" "/tmp/$sourcedir/python-wine"
 
22
echo " done."
 
23
 
 
24
echo -n "Compiling MAN page..."
 
25
pod2man --section=1 --release=$sourceversion --center="Windows On Unix" "/tmp/$sourcedir/data/vineyard-preferences.pod" > "/tmp/$sourcedir/data/vineyard-preferences.1"
 
26
gzip -9 "/tmp/$sourcedir/data/vineyard-preferences.1"
17
27
echo " done."
18
28
 
19
29
cd /tmp
20
30
 
21
 
echo -n "Creating TAR.GZ archive of $name version $version..."
22
 
tar --exclude "$name"-"$version/.bzr" --exclude "$name"-"$version/.bzrignore" --exclude "$name"-"$version/debian" --exclude "$name"-"$version/python-wine" --exclude "$name"-"$version/tools" --exclude "$name"-"$version/data/cache.pyc" -czf "$name"_"$version.orig.tar.gz" "$name"-"$version"
 
31
echo -n "Creating TAR.GZ archive of $name version $sourceversion..."
 
32
tar --exclude "$sourcedir/.bzr" --exclude "$sourcedir/.bzrignore" --exclude "$sourcedir/debian" --exclude "$sourcedir/python-wine" --exclude "$sourcedir/tools" --exclude "$sourcedir/data/cache.pyc" -czf "$sourcetar" "$sourcedir"
23
33
echo " done."
24
34
 
25
 
echo -n "Creating binary package of $name..."
26
 
cd "$name"-"$version"
 
35
echo -n "Creating binary package of $name version $version..."
 
36
cd "$sourcedir"
27
37
debuild -sa
28
38
cd ..
29
39
echo " done."
30
40
 
31
 
echo -n "Creating source package of $name..."
32
 
cd "$name"-"$version"
 
41
echo -n "Creating source package of $name version $version..."
 
42
cd "$sourcedir"
33
43
debuild -S -sa
34
44
cd ..
35
45
echo " done."