summaryrefslogtreecommitdiffstats
path: root/cmakemodules/makedist.sh.in
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-15 17:32:48 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-15 17:32:48 +0000
commite2f541c98dfa4081fa3ab3d28f08ea2309281884 (patch)
treecb721a55bc88753ddeb9754dc98ef45e2850ce30 /cmakemodules/makedist.sh.in
downloadtdesvn-e2f541c98dfa4081fa3ab3d28f08ea2309281884.tar.gz
tdesvn-e2f541c98dfa4081fa3ab3d28f08ea2309281884.zip
Added KDE3 version of kdesvn
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1103685 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'cmakemodules/makedist.sh.in')
-rwxr-xr-xcmakemodules/makedist.sh.in37
1 files changed, 37 insertions, 0 deletions
diff --git a/cmakemodules/makedist.sh.in b/cmakemodules/makedist.sh.in
new file mode 100755
index 0000000..6df00a5
--- /dev/null
+++ b/cmakemodules/makedist.sh.in
@@ -0,0 +1,37 @@
+#!/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