Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 1 | |
| 2 | MACRO(GENERATE_PACKAGING PACKAGE VERSION) |
| 3 | |
| 4 | # The following components are regex's to match anywhere (unless anchored) |
| 5 | # in absolute path + filename to find files or directories to be excluded |
| 6 | # from source tarball. |
| 7 | SET (CPACK_SOURCE_IGNORE_FILES |
| 8 | #svn files |
| 9 | "\\\\.svn/" |
| 10 | "\\\\.cvsignore$" |
| 11 | # temporary files |
| 12 | "\\\\.swp$" |
| 13 | # backup files |
| 14 | "~$" |
| 15 | # eclipse files |
| 16 | "\\\\.cdtproject$" |
| 17 | "\\\\.cproject$" |
| 18 | "\\\\.project$" |
| 19 | "\\\\.settings/" |
| 20 | "\\\\.kdev4/" |
| 21 | "\\\\.kdev4$" |
| 22 | "\\\\.kdev4_include_paths$" |
| 23 | # others |
| 24 | "\\\\.#" |
| 25 | "/#" |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 26 | "/build*" |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 27 | "/autom4te\\\\.cache/" |
| 28 | "/_build/" |
| 29 | "/doc/html/" |
| 30 | "/\\\\.git/" |
| 31 | # used before |
| 32 | "/CVS/" |
| 33 | "/\\\\.libs/" |
| 34 | "/\\\\.deps/" |
| 35 | "\\\\.o$" |
| 36 | "\\\\.lo$" |
| 37 | "\\\\.la$" |
| 38 | "\\\\.sh$" |
| 39 | "Makefile\\\\.in$" |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 40 | "\\\\.directory$" |
| 41 | "\\\\._.DS_Store$" |
| 42 | "\\\\._buildmac$" |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 43 | ) |
| 44 | |
| 45 | SET(CPACK_PACKAGE_VENDOR "Werner Dittmann") |
| 46 | #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt") |
| 47 | #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") |
| 48 | #SET(CPACK_PACKAGE_VERSION_MAJOR ${version_major}) |
| 49 | #SET(CPACK_PACKAGE_VERSION_MINOR ${version_minor}) |
| 50 | #SET(CPACK_PACKAGE_VERSION_PATCH ${version_patch}) |
| 51 | SET( CPACK_GENERATOR "TBZ2") |
| 52 | SET( CPACK_SOURCE_GENERATOR "TBZ2") |
| 53 | SET( CPACK_SOURCE_PACKAGE_FILE_NAME "${PACKAGE}-${VERSION}" ) |
| 54 | INCLUDE(CPack) |
| 55 | |
| 56 | # SPECFILE() |
| 57 | |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 58 | ADD_CUSTOM_TARGET(svncheck |
| 59 | COMMAND cd $(CMAKE_SOURCE_DIR) && LC_ALL=C git status | grep -q "nothing to commit .working directory clean.") |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 60 | |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 61 | SET(AUTOBUILD_COMMAND |
| 62 | COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/*.tar.bz2 |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 63 | COMMAND ${CMAKE_MAKE_PROGRAM} package_source |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 64 | # COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/package/${PACKAGE}.changes" "${CMAKE_BINARY_DIR}/package/${PACKAGE}.changes" |
| 65 | ) |
| 66 | |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 67 | ADD_CUSTOM_TARGET(srcpackage_local |
| 68 | ${AUTOBUILD_COMMAND}) |
Alexandre Lision | 51140e1 | 2013-12-02 10:54:09 -0500 | [diff] [blame] | 69 | |
Alexandre Lision | 7fd5d3d | 2013-12-04 13:06:40 -0500 | [diff] [blame] | 70 | ADD_CUSTOM_TARGET(srcpackage |
| 71 | COMMAND ${CMAKE_MAKE_PROGRAM} svncheck |
| 72 | ${AUTOBUILD_COMMAND}) |
| 73 | |
| 74 | ENDMACRO(GENERATE_PACKAGING) |