File: import_upstream.sh

package info (click to toggle)
avr-libc 1:2.0.0+Atmel3.6.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 90,212 kB
  • sloc: ansic: 387,807; asm: 8,489; sh: 6,012; makefile: 1,231; python: 976; perl: 509; pascal: 460; cpp: 11
file content (47 lines) | stat: -rw-r--r-- 1,126 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
#!/bin/bash

if [ $# -ne 3 ]; then 
    echo Usage: $0 '<tar archive>' '<zip archive>' '<version>'
    echo Exmpl: $0 avr-libc.tar.bz2 avr8-headers.zip 2.0.0+Atmel3.6.0
    exit -1
fi

VER=$3

set -x
set -e

git checkout upstream
rm -Rf libc avr
tar xf $1
unzip $2
git add libc avr
git commit -m "Import upstream version $VER"
git tag upstream/$VER
git push
git push --tags

git checkout master
git merge --no-commit upstream || true
#sed -i -s 's/^MAN_EXTENSION.*/MAN_EXTENSION = .3avr/' libc/avr-libc/doc/api/doxygen.config.in
#echo 'MAN_SUBDIR = man3' >> libc/avr-libc/doc/api/doxygen.config.in
#sed -i -s 's/man\/man3\/\*.3/man\/man3\/\*.3avr/' libc/avr-libc/doc/api/Makefile.am
mv avr/*.h libc/avr-libc/include/avr/
git add libc
git rm -r avr
git commit -m "Merge patched upstream version $VER"

dch -v 1:$VER-1 New upstream release
dch -r ok
git add debian/changelog

vim debian/control
git add debian/control

git commit -m 'Release message in changelog and new versioned deps'

git tag "debian/$VER-1"
git push
git push --tags

gbp buildpackage --git-pbuilder --git-upstream-tree=branch --git-upstream-branch=upstream