Only copy samples/exifprint to package + Create source package from build.sh

This commit is contained in:
Robin Mills 2018-10-22 11:04:55 +01:00 committed by Luis Díaz Más
parent cbb42b25e3
commit b953af18ea
2 changed files with 15 additions and 5 deletions

View File

@ -3,7 +3,7 @@ set(CPACK_PACKAGE_CONTACT "Luis Díaz Más <piponazo@gmail.com>")
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
set(CPACK_SOURCE_GENERATOR TGZ)
set(CPACK_SOURCE_IGNORE_FILES "build.*;\.git/;\.DS_Store/;test;third-party;")
set(CPACK_SOURCE_IGNORE_FILES "build.*;\.git/;\.DS_Store/;")
## -----------------------------------------------
## TODO: Luis will rewrite this -----------------
@ -33,8 +33,8 @@ endif()
set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${PACKNAME})
# https://stackoverflow.com/questions/17495906/copying-files-and-including-them-in-a-cpack-archive
install(DIRECTORY "${PROJECT_SOURCE_DIR}/samples/" DESTINATION "samples")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/contrib/" DESTINATION "contrib")
install(FILES "${PROJECT_SOURCE_DIR}/samples/exifprint.cpp" DESTINATION "samples")
install(DIRECTORY "${PROJECT_SOURCE_DIR}/contrib/" DESTINATION "contrib")
# Copy top level documents (eg README.md)
# https://stackoverflow.com/questions/21541707/cpack-embed-text-files

View File

@ -72,8 +72,18 @@ cd build
cmake .. -G "Unix Makefiles"
make
if [ "$test" == "1" ]; then make tests ; fi
make package
if [ $(uname) == 'Darwin' ]; then make package_source ; fi
make package
if [ $(uname) == 'Darwin' ]; then
# make package_source
source=$(ls -1 *.tar.gz|sed -E -e 's#Darwin#Source#g')
git clone --branch $branch https://github.com/exiv2/exiv2 package
cd package
rm -rf .git test/data
tar czf $source *
cd ..
mv package/$source .
rm -rf package
fi
ls -alt *.tar.gz | sed -E -e 's/\+ / /g'
EOF
writeTag $1 $command ${cd}buildserver/build/tag