File generate-tarball.sh of Package skychart
#!/bin/sh
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 VERSION SVN_REV"
exit 1
fi
VERSION=$1
SVN=$2
PKG_VER=$VERSION~svn.${SVN}
tar -xJvf skychart-$VERSION-$SVN-src.tar.xz
mv skychart-$VERSION-$SVN-src skychart-$PKG_VER-src
#Remove pre-built software
rm -rf skychart-$PKG_VER-src/tools/data/iridflar
rm -rf skychart-$PKG_VER-src/tools/data/quicksat
rm -rf skychart-$PKG_VER-src/skychart/sample_client/astrolabe/*.dll
rm -rf skychart-$PKG_VER-src/skychart/sample_client/ds2cdc/*.dll.zip
#Remove Mac and Windows unneeded stuff
rm -rf skychart-$PKG_VER-src/system_integration/Windows
rm -rf skychart-$PKG_VER-src/system_integration/MacOSX
#Remove libraries provided by separate package libpasastro
#they are here only for building the Win version
rm -rf skychart-$PKG_VER-src/skychart/library/getdss
rm -rf skychart-$PKG_VER-src/skychart/library/plan404
rm -rf skychart-$PKG_VER-src/skychart/library/wcs
#Remove NGC2000 catalog with license problem and no more used
rm -rf skychart-$PKG_VER-src/tools/cat/ngc2000
tar -cJvf skychart-$PKG_VER-src-nopatents.tar.xz skychart-$PKG_VER-src
#Remove temporary directory
rm -rf skychart-$PKG_VER-src