#!/bin/sh -e

# called by uscan with '--upstream-version' <version> <file>
DIR=OpenBLAS-$2
TAR=../openblas_$2.orig.tar.xz

# clean up the upstream tarball
tar xaf $3
rm -f $3
rm -rf $DIR/lapack-netlib/*
echo "clean:" > $DIR/lapack-netlib/Makefile
tar caf $TAR $DIR
rm -rf $DIR

echo "openblas: Repackaged tarball as $TAR (after stripping embedded LAPACK)"

exit 0
