File: build-final

package info (click to toggle)
wine 1.4.1-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 156,772 kB
  • sloc: ansic: 2,124,295; perl: 17,673; yacc: 12,202; makefile: 7,447; sh: 3,981; lex: 3,913; cpp: 812; awk: 69; xml: 21; sed: 3
file content (36 lines) | stat: -rw-r--r-- 1,200 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
#!/bin/sh
set -e
version=`dpkg-parsechangelog|sed -n 's/Version: \(.*\)/\1/p'`
distribution=`dpkg-parsechangelog|sed -n 's/Distribution: \(.*\)/\1/p'`
# see if the version in the changelog is tagged (already built)
obj_type="`git cat-file -t "wine-$version" 2>/dev/null`" || true
if [ -n "$obj_type" ]
then
  # it is, so only grab changes since then
  last_version="$version"
else
  # it's not, this must be the dummy changelog from import-done,
  # so grab changes since version before that
  last_version=`dpkg-parsechangelog -o1 -c1|sed -n 's/Version: \(.*\)/\1/p'`
fi
# build changelog
if [ "$distribution" = "UNRELEASED" ]; then
  sed -i "1,6d" debian/changelog # delete dummy entry (6 lines)
  version_arg="--new-version=\"$version\""
fi
git-dch --release --auto --full --meta \
 --debian-tag="wine-$last_version" \
 --git-log="--first-parent" \
 --ignore-branch \
 $version_arg
# commit changelog
version=`dpkg-parsechangelog|sed -n 's/Version: \(.*\)/\1/p'`
git add debian/changelog
git commit -m "Release $version"
# build package
git-buildpackage --git-pristine-tar \
 --git-upstream-tag="wine-%(version)s" \
 --git-debian-tag="wine-%(version)s" \
 --git-ignore-branch \
 --git-tag \
 "$@"