~ubuntu-branches/debian/sid/clamav/sid

« back to all changes in this revision

Viewing changes to debian/get_orig.sh

  • Committer: Package Import Robot
  • Author(s): Andreas Cadhalpun, Andreas Cadhalpun, Sebastian Andrzej Siewior, Frans Spiesschaert
  • Date: 2014-10-15 06:50:20 UTC
  • mfrom: (1.3.13) (42.1.4 experimental)
  • Revision ID: package-import@ubuntu.com-20141015065020-0cpy1hdueggaw35s
Tags: 0.98.5~rc1+dfsg-1
[ Andreas Cadhalpun ]
* Import new upstream release candidate.
* Drop patches included upstream and update the others.
* Add 4 new symbols to libclamav6.symbols.
* Fix debian/copyright.
* Update lintian overrides.
* Update Standards-Version to 3.9.6 (no changes needed).
* Add Breaks and Replaces for old clamd package to clamdscan.
* Remove unnecessary shlibs:Depends from clamav-dbg.
* Add patches to support LLVM 3.5.

[ Sebastian Andrzej Siewior ]
* Add embedded copy of libmspack to be used as fallback, when libmspack-dev
  is not available.

[ Frans Spiesschaert ]
* Updated Dutch Debconf template translation (Closes: #763634)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
DEBIAN_DIR=$(dirname $0)
 
4
CUR_DIR=$PWD
 
5
 
 
6
read_dom () {
 
7
        local IFS=\>
 
8
        read -d \< ENTITY CONTENT
 
9
        local RET=$?
 
10
        TAG_NAME=${ENTITY%% *}
 
11
        ATTRIBUTES=${ENTITY#* }
 
12
        return $RET
 
13
}
 
14
 
 
15
UPS_VER=""
 
16
UPS_FILE=""
 
17
DEB_VER=""
 
18
TAG_NAME=""
 
19
ATTRIBUTE=""
 
20
 
 
21
echo "Checking…"
 
22
cd "$DEBIAN_DIR"/../
 
23
while read_dom
 
24
do
 
25
        if [ "$TAG_NAME" = "upstream-version" ]
 
26
        then
 
27
                UPS_VER="$CONTENT"
 
28
        fi
 
29
        if [ "$TAG_NAME" = "debian-mangled-uversion" ]
 
30
        then
 
31
                DEB_VER="$CONTENT"
 
32
        fi
 
33
        if [ "$TAG_NAME" = "upstream-url" ]
 
34
        then
 
35
                UPS_FILE="${CONTENT##*/}"
 
36
        fi
 
37
done < <(uscan --dehs --report)
 
38
 
 
39
echo "Debian: $DEB_VER, upstream $UPS_VER"
 
40
 
 
41
if [ "$DEB_VER" = "$UPS_VER" ]
 
42
then
 
43
        echo "same version, no action"
 
44
fi
 
45
 
 
46
echo upstream looks newer, fetching $UPS_VER
 
47
uscan --force-download --destdir "$CUR_DIR"
 
48
RET=$?
 
49
cd "$CUR_DIR"
 
50
if [ ! -f "$UPS_FILE" ]
 
51
then    
 
52
        echo "uscan should download ${UPS_FILE} but it did not."
 
53
        exit 1
 
54
fi
 
55
if [ ! -f clamav_${UPS_VER}.orig.tar.gz ]
 
56
then
 
57
        echo "repacking…"
 
58
        mk-origtargz --copy --copyright $DEBIAN_DIR/copyright --package clamav -v ${UPS_VER} ${UPS_FILE}
 
59
        if [ ! -f clamav_${UPS_VER}.orig.tar.gz ]
 
60
        then
 
61
                echo "Repacked and I am still missing"
 
62
                echo "clamav_${UPS_VER}.orig.tar.gz."
 
63
                exit 1
 
64
        fi
 
65
fi
 
66
 
 
67
if [ $RET -eq 1 ]
 
68
then
 
69
        echo "Seems that you are up-to-date"
 
70
        exit 0
 
71
fi
 
72
 
 
73
if [ $RET -ne 0 ]
 
74
then
 
75
        echo "uscan terminated with non-zero exit code $RET."
 
76
        exit 1
 
77
fi
 
78
 
 
79
tmpdir="$(mktemp -d repack_dir_XXXXXX)"
 
80
 
 
81
mv clamav_${UPS_VER}.orig.tar.gz $tmpdir/clamav-${UPS_VER}.tar.gz
 
82
echo "Running split-tarball.sh $tmpdir ${UPS_VER}"
 
83
$DEBIAN_DIR/split-tarball.sh $tmpdir ${UPS_VER}
 
84
rm -r $tmpdir