From: Vsevolod Stakhov Date: Fri, 5 Sep 2014 10:21:42 +0000 (+0100) Subject: Add 'dist' target. X-Git-Tag: 0.7.0~37 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e48534950a62f569aafd892b2cb810c9a6725e7b;p=rspamd.git Add 'dist' target. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 889debe88..8091bb802 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -925,4 +925,9 @@ INSTALL(FILES "doc/rspamc.1" DESTINATION ${MANDIR}/man1) # Install webui IF(INSTALL_WEBUI MATCHES "ON") INSTALL(DIRECTORY "interface/" DESTINATION ${WWWDIR} PATTERN ".git" EXCLUDE) -ENDIF(INSTALL_WEBUI MATCHES "ON") \ No newline at end of file +ENDIF(INSTALL_WEBUI MATCHES "ON") + +ADD_CUSTOM_TARGET(dist ${CMAKE_SOURCE_DIR}/dist.sh + "${CMAKE_BINARY_DIR}/rspamd-${RSPAMD_VERSION}.tar.xz" + COMMENT "Create source distribution" + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}) \ No newline at end of file diff --git a/dist.sh b/dist.sh index c8b201e3d..af4e14e9e 100755 --- a/dist.sh +++ b/dist.sh @@ -5,7 +5,7 @@ if [ $# -ne 1 ] ; then exit 1 fi -FNAME=shift +FNAME=$1 PREFIX=`basename $FNAME | sed -e 's/\.tar.*$//'` OUT="" @@ -21,5 +21,5 @@ for sub in $SUBMODULES ; do (cd $sub && git ls-files | sed -e "s|^|$sub/|" >> $OUT) done -tar -c --no-recursion --transform "s|^|$PREFIX/|" -a -T $OUT -v -f $FNAME +tar -c --exclude='.[^/]*' --exclude='*.xz' --exclude='*.gz' --no-recursion --transform "s|^|$PREFIX/|" -a -T $OUT -v -f $FNAME rm -f $OUT