~epii/+junk/librungekutta-java

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
#!/bin/sh

set -e
set -x

WORK=target/deb
REVNO=`bzr revno`
VERSION="1.0-rev${REVNO}"
DEBIAN="${WORK}/librungekutta-java_${VERSION}"

# Clean
rm -rf ${WORK}
mkdir -p ${DEBIAN}
# Export branch and make .tar.gz
for i in `bzr ls -RV --kind=directory`; do
	mkdir -p ${DEBIAN}/$i
done
for i in `bzr ls -RV --kind=file`; do
	cp $i ${DEBIAN}/$i
done
tar cfz ${DEBIAN}.orig.tar.gz -C ${WORK} librungekutta-java_${VERSION}
# Copy untracked files
###
mkdir -p ${DEBIAN}/debian
cp debian/* ${DEBIAN}/debian
###
cp debian/changelog ${DEBIAN}/debian/changelog
# Build
cd ${DEBIAN}
debuild -S
debuild