File: pbuilderscript

package info (click to toggle)
xsnow 1:3.1.1-1
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 2,524 kB
  • sloc: ansic: 9,248; xml: 5,034; sh: 1,659; cpp: 118; pascal: 105; makefile: 70
file content (63 lines) | stat: -rwxr-xr-x 2,004 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
#!/bin/bash
# script for pbuilder to create upload directory
workdir=$1
oldversion=$2
newversion=$3
if [ -z "$3" ] ; then
   echo usage: pbuilderscript workdir oldversion newversion
   exit 1
fi
cd "$workdir" || exit 1
echo "working in `pwd`"
export DEBEMAIL=wvermin@gmail.com
export DEBFULLNAME="Willem Vermin"
sed -i 's/^#//' /etc/apt/sources.list   # uncomment 2de regel
apt update
apt -y install apt-utils || exit 1
apt -y install quilt devscripts debhelper autotools-dev equivs || exit 1
apt source xsnow || exit 1
cd xsnow-$oldversion || exit 1
uupdate -v $newversion ../xsnow-$newversion.tar.gz || exit 1
cd ../xsnow-$newversion
rm -rf debian
cp -r $workdir/debian . || exit 1
#if [ -d debian.upstream ] ; then       
#   rm -r debian
#   mv debian.upstream debian || exit 1
#fi
echo quilt ...
while quilt push; do quilt refresh; done
#dch
echo "---------- mk-build-deps -----------------"
echo | mk-build-deps --install --remove debian/control || exit 1
# got dpkg-source: error: aborting due to unexpected upstream changes
# caused by the files *-build-deps*.buildinfo and *-build-deps*.changes
# created by mk-build-deps
# hence the following:
if true ; then
   if false ; then
      # this seems to be the recommended way
      mkdir -p debian/source
      (
      echo "Description: to remedy this"
      echo "  dpkg-source: error: aborting due to unexpected upstream changes"
      echo "Forwarded: not-needed"
      ) > debian/source/local-patch-header
      EDITOR=/bin/true dpkg-source --commit . buildinfo-changes
      while quilt push; do quilt refresh; done
      #
   else
      # simple remove the offending files
      rm -f *-build-deps*.buildinfo *-build-deps*.changes
   fi
fi
echo "-------------- dpkg-buildpackage ------------"
debuild -us -uc || exit 1
if false ; then
   # debuild already runs lintian
   cd ..
   echo "running lintian ..."
   lintian -F -i -I --show-overrides --no-tag-display-limit xsnow_$newversion-1_amd64.changes
   echo "end lintian"
fi
echo $0 done