File: courier-debuild

package info (click to toggle)
maildrop 3.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,896 kB
  • sloc: ansic: 29,827; cpp: 18,027; sh: 5,993; makefile: 882; perl: 94
file content (60 lines) | stat: -rwxr-xr-x 988 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
#! /bin/bash
#
# Wrapper script for running debuild to build this package.
#
# export DEBGCC=10
#
# Set DEBGCC to use a non-default version of gcc

set -e
shopt -s extglob

eval `courierauthconfig --configfiles`
f=`cd .. && ls maildrop-3.2.1.tar* | sed -n 1p`

rm -rf deb
mkdir deb
cp ../$f deb/`echo $f | sed 's/maildrop-/maildrop_/;s/.tar./.orig.tar./'`
cd deb
tar xf *
cd maildrop-3.2.1
cp -pr packaging/debian .

if test "$DEBGCC" = ""
then
	DEBGCC=`readlink /usr/bin/gcc | sed 's/gcc-//'`

	case "$DEBGCC" in
	[1-9]*([0-9]))
		      ;;
	*)
	    echo "Cannot determine gcc version"
	    exit 1
	    ;;
	esac
fi

if test "$DEBGCC" = "default"
then
    DEBGCC=""
else
    DEBGCC="-$DEBGCC"
fi

for f in debian/rules debian/control
do
	sed "
s/%SOVERSION%/0/g
s~%DEBGCC%~$DEBGCC~g
s/%MAILUSER%/$mailuser/g
s/%MAILGROUP%/$mailgroup/g
" <packaging/$f >$f.tmp
mv $f.tmp $f
done

chmod +x debian/rules

debuild "$@"
cd ..
rm -rf maildrop-3.2.1
echo "Built packages in the deb subdirectory."