File: import

package info (click to toggle)
wine-development 2.0-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 187,144 kB
  • ctags: 315,546
  • sloc: ansic: 2,640,448; perl: 18,914; yacc: 15,420; makefile: 8,447; objc: 6,157; lex: 4,268; sh: 886; cpp: 816; awk: 69; xml: 69
file content (50 lines) | stat: -rwxr-xr-x 1,871 bytes parent folder | download | duplicates (2)
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
#!/bin/sh -e
# Copyright: 2013-2015 Michael Gilbert <mgilbert@debian.org>
# License: LGPL-2.1

# check for version argument
if [ "$#" -lt "1" ]; then
  echo "usage: $(basename $0) <upstream version number>"
  exit 1
fi

# terminate if we're not building from a git tree
if [ ! -d ".git" ]; then
  echo "error: importing only supported for git checkouts"
  exit 1
fi

# ignore changes to files that will be automatically generated
git update-index --assume-unchanged configure include/config.h.in

# pull specified tag from upstream repository
version="$1"
debian="https://anonscm.debian.org/git/pkg-wine/wine.git"
upstream_branch="upstream"
winehq="git://source.winehq.org/git/wine.git"
tag="wine-$version"
git checkout ${upstream_branch}
git pull $debian ${upstream_branch}
git pull --no-edit $winehq tag "$tag" || echo "unable to fetch tag $tag"

# merge upstream into master (favoring "their" changes)
git checkout master
git merge --strategy-option=theirs upstream

# format the "New upstream release" message
tag_time=`git cat-file tag "$tag" | sed -n 's/tagger .*<.*> \([0-9]*\) .*/\1/p'`
release_date=`LC_ALL=C date -u -d "@$tag_time" +"%b %-d, %Y"`

# create the initial changelog entry
dch -v "$(echo $version|sed "s/-/~/")-1" "New upstream release $version, released $release_date."
sed -n 's/^  - \(.*\)/- \1/p' ANNOUNCE | while read line; do
  dch $line
done

# set upstream's SERVER_PROTOCOL_VERSION in request.patch
# this is usually stored in include/wine/server_protocol.h, but we clean that file because it is generated
proto_version=$(expr $(grep "#define SERVER_PROTOCOL_VERSION" include/wine/server_protocol.h | cut -d\  -f 3) - 1)
[ "$proto_version" -lt 32767 ] || {
    echo "error: proto_version $proto_version is not valid."
    exit 1;}
sed -i "s|\(+    my \$protocol = \)[[:digit:]]*;|\1${proto_version};|" debian/patches/generate/request.patch