1#! /bin/sh
2#
3set -e
4
5VERSION=1.4.7
6PREV_VERSION=1.4.6
7TMPDIR=/tmp/ipt-release
8IPTDIR="$TMPDIR/iptables-$VERSION"
9
10PATCH="patch-iptables-$PREV_VERSION-$VERSION.bz2";
11TARBALL="iptables-$VERSION.tar.bz2";
12CHANGELOG="changes-iptables-$PREV_VERSION-$VERSION.txt";
13
14mkdir -p "$TMPDIR"
15git shortlog "v$PREV_VERSION..v$VERSION" > "$TMPDIR/$CHANGELOG"
16git diff "v$PREV_VERSION..v$VERSION" | bzip2 > "$TMPDIR/$PATCH"
17git archive --prefix="iptables-$VERSION/" "v$VERSION" | tar -xC "$TMPDIR/"
18
19cd "$IPTDIR" && {
20	sh autogen.sh
21	cd ..
22}
23
24tar -cjf "$TARBALL" "iptables-$VERSION";
25gpg -u "Netfilter Core Team" -sb "$TARBALL";
26md5sum "$TARBALL" >"$TARBALL.md5sum";
27sha1sum "$TARBALL" >"$TARBALL.sha1sum";
28
29gpg -u "Netfilter Core Team" -sb "$PATCH";
30md5sum "$PATCH" >"$PATCH.md5sum";
31sha1sum "$PATCH" >"$PATCH.sha1sum";
32