#!/bin/sh -x

# Repack tarball to strip duplicate stuff.

PACKAGE=`dpkg-parsechangelog | sed -n 's/^Source: //p'`
VERSION=`dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p' | sed -e 's/\+.*//'`

# uscan --verbose --force-download --no-symlink

mk-origtargz --package $PACKAGE \
 --version $VERSION \
 --repack-suffix +dfsg1 \
 --compression bzip2 \
 --directory .. \
 --copyright-file debian/copyright \
 ../FlightGear-2018.1.1-data.tar.bz2
