File: _build_debian~

package info (click to toggle)
unixcw 3.0.2-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 2,056 kB
  • sloc: ansic: 7,579; cpp: 1,477; sh: 549; makefile: 416; awk: 224
file content (68 lines) | stat: -rwxr-xr-x 999 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash

PACKAGE="unixcw"
VERSION="3.0.1"


# setup
REPO=`pwd`
cd ../../build
BUILD=`pwd`


echo "REPO = " $REPO
echo "BUILD = " $BUILD

if [ "$REPO" == x"" ]; then
    echo "REPO is empty"
    exit
elif [ "$REPO" == x"/" ]; then
    echo "REPO is root directory"
    exit
fi

if [ "$BUILD" == x"" ]; then
    echo "BUILD is empty"
    exit
elif [ "$BUILD" == x"/" ]; then
    echo "BUILD is root directory"
    exit
fi



# clean up old files, prepare brand new, empty dir
rm -rf $BUILD/*




# prepare $PACKAGE_X.Y.Z.debian.tar.gz
cd $REPO
cp -rp debian $BUILD/
cd $BUILD
tar cvfz $PACKAGE\_$VERSION.debian.tar.gz debian
rm -rf debian




cd $REPO
cp -rp ../$PACKAGE $BUILD
cd $BUILD/$PACKAGE/
./_clean_up distclean
rm -rf _build_debian _clean_up
rm -rf .git



cd $BUILD
mv $PACKAGE $PACKAGE-$VERSION
tar cvfz $PACKAGE\_$VERSION.orig.tar.gz $PACKAGE-$VERSION --exclude=debian


# go to final build dir and start building Debian package
cd $PACKAGE-$VERSION
echo ""
echo `pwd`
debuild -us -uc