You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdesvn/cmakemodules/makedist.sh.in

38 lines
854 B

#!/bin/sh
VERSION=@VERSION@
SRCROOT=@CMAKE_SOURCE_DIR@
BUILDDIR=@CMAKE_BINARY_DIR@
PROJECT=@PROJECT_NAME@
KDESVN_VERSION=@KDESVN_VERSION@
EXCLUDE="@DIST_EXCLUDE@"
EXPORT_DIR="${PROJECT}-${VERSION}"
if [ ! -d ${SRCROOT}/.svn ]; then
echo "This script must run for a svn dir!"
exit 1
fi
echo "Exporting source tree"
svn export "${SRCROOT}" ${EXPORT_DIR}
echo "Copy required files to export"
cp ${BUILDDIR}/${PROJECT}.spec ${EXPORT_DIR}
cp ${SRCROOT}/doc/*.cache.bz2 ${EXPORT_DIR}/doc
echo "Removing not needed stuff"
for i in $EXCLUDE ; do
echo " $i"
rm -rf $EXPORT_DIR/$i
done
echo "Generating archive"
tar cjf ${BUILDDIR}/${PROJECT}-${VERSION}.tar.bz2 ${EXPORT_DIR}
echo "Cleaning up"
rm -rf ${EXPORT_DIR}
if [ "x$1" = "xrpm" ]; then
KDESVN_VERSION=${KDESVN_VERSION} rpmbuild -tb ${BUILDDIR}/${PROJECT}-${VERSION}.tar.bz2
fi