mirror of https://gitee.com/bigwinds/arangodb
Add make target that copies the produced packages into a provided destination folder.
This commit is contained in:
parent
1bdf414de2
commit
8989103533
|
@ -293,6 +293,7 @@ while [ $# -gt 0 ]; do
|
|||
--targetDir)
|
||||
shift
|
||||
TARGET_DIR=$1
|
||||
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DPACKAGE_TARGET_DIR=$1"
|
||||
shift
|
||||
;;
|
||||
|
||||
|
@ -472,53 +473,58 @@ if [ -n "$CPACK" -a -n "${TARGET_DIR}" ]; then
|
|||
fi
|
||||
# and install
|
||||
|
||||
|
||||
if test -n "${TARGET_DIR}"; then
|
||||
echo "building distribution tarball"
|
||||
mkdir -p "${TARGET_DIR}"
|
||||
dir="${TARGET_DIR}"
|
||||
TARFILE=arangodb-`uname`${TAR_SUFFIX}.tar.gz
|
||||
TARFILE_TMP=`pwd`/arangodb.tar.$$
|
||||
if [ -n "$CPACK" -a -n "${TARGET_DIR}" ]; then
|
||||
${PACKAGE_MAKE} copy_packages
|
||||
else
|
||||
TARFILE=arangodb-`uname`${TAR_SUFFIX}.tar.gz
|
||||
TARFILE_TMP=`pwd`/arangodb.tar.$$
|
||||
|
||||
mkdir -p ${dir}
|
||||
trap "rm -rf ${TARFILE_TMP}" EXIT
|
||||
|
||||
(cd ${SOURCE_DIR}
|
||||
|
||||
touch 3rdParty/.keepme
|
||||
touch arangod/.keepme
|
||||
touch arangosh/.keepme
|
||||
|
||||
tar -c -f ${TARFILE_TMP} \
|
||||
VERSION utils scripts etc/relative UnitTests Documentation js \
|
||||
lib/Basics/errors.dat \
|
||||
3rdParty/.keepme \
|
||||
arangod/.keepme \
|
||||
arangosh/.keepme
|
||||
)
|
||||
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
bin etc tests
|
||||
|
||||
find . -name *.gcno > files.$$
|
||||
|
||||
if [ -s files.$$ ]; then
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
--files-from files.$$
|
||||
mkdir -p ${dir}
|
||||
trap "rm -rf ${TARFILE_TMP}" EXIT
|
||||
|
||||
(cd ${SOURCE_DIR}
|
||||
|
||||
find . \
|
||||
\( -name *.cpp -o -name *.h -o -name *.c -o -name *.hpp -o -name *.ll -o -name *.y \) > files.$$
|
||||
touch 3rdParty/.keepme
|
||||
touch arangod/.keepme
|
||||
touch arangosh/.keepme
|
||||
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
--files-from files.$$
|
||||
|
||||
rm files.$$
|
||||
tar -c -f ${TARFILE_TMP} \
|
||||
VERSION utils scripts etc/relative UnitTests Documentation js \
|
||||
lib/Basics/errors.dat \
|
||||
3rdParty/.keepme \
|
||||
arangod/.keepme \
|
||||
arangosh/.keepme
|
||||
)
|
||||
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
bin etc tests
|
||||
|
||||
rm files.$$
|
||||
find . -name *.gcno > files.$$
|
||||
|
||||
if [ -s files.$$ ]; then
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
--files-from files.$$
|
||||
|
||||
(cd ${SOURCE_DIR}
|
||||
|
||||
find . \
|
||||
\( -name *.cpp -o -name *.h -o -name *.c -o -name *.hpp -o -name *.ll -o -name *.y \) > files.$$
|
||||
|
||||
tar -u -f ${TARFILE_TMP} \
|
||||
--files-from files.$$
|
||||
|
||||
rm files.$$
|
||||
)
|
||||
|
||||
rm files.$$
|
||||
fi
|
||||
|
||||
gzip < ${TARFILE_TMP} > ${dir}/${TARFILE}
|
||||
${MD5} < ${dir}/${TARFILE} |sed "s; .*;;" > ${dir}/${TARFILE}.md5
|
||||
fi
|
||||
|
||||
gzip < ${TARFILE_TMP} > ${dir}/${TARFILE}
|
||||
${MD5} < ${dir}/${TARFILE} |sed "s; .*;;" > ${dir}/${TARFILE}.md5
|
||||
fi
|
||||
|
|
|
@ -5,3 +5,6 @@ set(CPACK_BUNDLE_PLIST "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
|||
set(CPACK_BUNDLE_ICON "${PROJECT_SOURCE_DIR}/Installation/MacOSX/Bundle/icon.icns")
|
||||
set(CPACK_BUNDLE_STARTUP_COMMAND "${PROJECT_SOURCE_DIR}/Installation/MacOSX/Bundle/arangodb-cli.sh")
|
||||
configure_file("${PROJECT_SOURCE_DIR}/Installation/MacOSX/Bundle/Info.plist.in" "${CMAKE_CURRENT_BINARY_DIR}/Info.plist")
|
||||
|
||||
add_custom_target(copy_packages
|
||||
COMMAND cp *.dmg ${PACKAGE_TARGET_DIR})
|
||||
|
|
|
@ -63,4 +63,9 @@ add_custom_target(package-arongodb-client
|
|||
WORKING_DIRECTORY ${CLIENT_BUILD_DIR})
|
||||
|
||||
|
||||
|
||||
list(APPEND PACKAGES_LIST package-arongodb-client)
|
||||
|
||||
|
||||
add_custom_target(copy_packages
|
||||
COMMAND cp *.deb ${PACKAGE_TARGET_DIR})
|
||||
|
|
|
@ -102,3 +102,6 @@ add_custom_target(package-arongodb-client-nsis
|
|||
|
||||
|
||||
list(APPEND PACKAGES_LIST package-arongodb-client-nsis)
|
||||
|
||||
add_custom_target(copy_packages
|
||||
COMMAND cp *.exe ${PACKAGE_TARGET_DIR})
|
||||
|
|
|
@ -52,3 +52,6 @@ list(APPEND PACKAGES_LIST package-arongodb-server)
|
|||
#
|
||||
#
|
||||
#list(APPEND PACKAGES_LIST package-arongodb-client)
|
||||
|
||||
add_custom_target(copy_packages
|
||||
COMMAND cp *.rpm ${PACKAGE_TARGET_DIR})
|
||||
|
|
Loading…
Reference in New Issue