mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-25 05:59:21 +02:00
debian/rules: add target to build source tarball
Document how to use ‘git archive’ to build a tarball from the usbboot subdirectory of the source repository. Repeated invocations of the get-orig-source target to fetch the same commit will produce byte-for-byte identical results. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
This commit is contained in:
parent
a2a9d90ef9
commit
3d74b6ace7
@ -1,6 +1,8 @@
|
||||
This Debian package is developed in a Git repository (see the Vcs-Git field
|
||||
of debian/control). To build from a git checkout:
|
||||
|
||||
debian/rules get-orig-source REPO=.. BRANCH=remotes/origin/master
|
||||
mv xburst-tools_*.tar.gz ..
|
||||
debian/autogen.sh
|
||||
debuild
|
||||
|
||||
@ -18,4 +20,4 @@ To build a released version of this package, no special instructions apply.
|
||||
“dpkg-buildpackage” or “apt-get -b source xburst-tools” should work as
|
||||
usual.
|
||||
|
||||
-- Jonathan Nieder <jrnieder@gmail.com> Sun, 04 Apr 2010 22:08:28 -0500
|
||||
-- Jonathan Nieder <jrnieder@gmail.com> Mon, 05 Apr 2010 06:21:12 -0500
|
||||
|
@ -1,18 +1,20 @@
|
||||
xburst-tools (0.0+201002-1.1) local; urgency=low
|
||||
|
||||
* debian/rules: rewrite as a minimal rules file using dh
|
||||
+ Build-Depends: debhelper (>= 7.4.10), for the --parallel option.
|
||||
* Standards-Version: 3.8.4
|
||||
* Build-Conflicts: automake1.4
|
||||
* add a Vcs-Git field to debian/control and remove the outdated watch
|
||||
file
|
||||
* debian/rules:
|
||||
- rewrite as a minimal rules file using dh
|
||||
- add a get-orig-source target
|
||||
- install firmware built at packaging time to avoid requiring a
|
||||
mipsel cross-compiler on buildds
|
||||
* debian/README.source: add instructions for re-building the firmware
|
||||
* debian/autogen.sh: new script
|
||||
* debian/rules: install firmware built at packaging time, to avoid
|
||||
requiring a mipsel cross-compiler on buildds
|
||||
* Build-Depends: debhelper (>= 7.4.10), for the --parallel option.
|
||||
* Build-Conflicts: automake1.4
|
||||
* debian/control: add information about the source repository
|
||||
* remove the outdated watch file
|
||||
* Standards-Version: 3.8.4
|
||||
* use dpkg source format 3.0 (quilt)
|
||||
|
||||
-- Jonathan Nieder <jrnieder@gmail.com> Mon, 05 Apr 2010 05:27:05 -0500
|
||||
-- Jonathan Nieder <jrnieder@gmail.com> Mon, 05 Apr 2010 06:24:04 -0500
|
||||
|
||||
xburst-tools (0.0+201002-1) unstable; urgency=low
|
||||
|
||||
|
30
usbboot/debian/get-orig-source.sh
Normal file
30
usbboot/debian/get-orig-source.sh
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/sh
|
||||
# Build a tarball from the latest upstream version, with a nice
|
||||
# version number.
|
||||
#
|
||||
# Requires git 1.6.6 or later, GNU date, and gzip.
|
||||
|
||||
set -e
|
||||
|
||||
: ${REPO=$(git rev-parse --git-dir)}
|
||||
: ${BRANCH=remotes/origin/master}
|
||||
|
||||
mkdir debian-orig-source
|
||||
trap 'rm -fr debian-orig-source || exit 1' EXIT
|
||||
|
||||
git init -q debian-orig-source
|
||||
GIT_DIR=$(pwd)/debian-orig-source/.git
|
||||
export GIT_DIR
|
||||
|
||||
# Fetch latest upstream version.
|
||||
git fetch -q "$REPO" "$BRANCH"
|
||||
|
||||
# Determine version number.
|
||||
release=0.0
|
||||
date=$(date --utc --date="$(git log -1 --pretty=format:%cD FETCH_HEAD)" "+%Y%m")
|
||||
upstream_version="${release}+${date}"
|
||||
|
||||
# Generate tarball.
|
||||
echo "packaging $(git rev-parse --short FETCH_HEAD)"
|
||||
git archive FETCH_HEAD -- usbboot |
|
||||
gzip -n -9 > "xburst-tools_$upstream_version.orig.tar.gz"
|
@ -47,3 +47,10 @@ firmware: configure
|
||||
./configure --enable-firmware
|
||||
$(MAKE) -C src ../xburst_stage1/xburst_stage1.bin \
|
||||
../xburst_stage2/xburst_stage2.bin
|
||||
|
||||
REPO = git://projects.qi-hardware.com/xburst-tools.git
|
||||
BRANCH = master
|
||||
debiandir_SQ = $(subst ','\'',$(dir $(lastword $(MAKEFILE_LIST))))
|
||||
get-orig-source:
|
||||
REPO='$(REPO)' BRANCH='$(BRANCH)' \
|
||||
sh '$(debiandir_SQ)'get-orig-source.sh
|
||||
|
Loading…
Reference in New Issue
Block a user