blob: 506b22430ada05fb897ab8d2391d48d7f01778ef [file] [log] [blame]
Alexandre Lision51140e12013-12-02 10:54:09 -05001
2MACRO(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 Lision7fd5d3d2013-12-04 13:06:40 -050026 "/build*"
Alexandre Lision51140e12013-12-02 10:54:09 -050027 "/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 Lision7fd5d3d2013-12-04 13:06:40 -050040 "\\\\.directory$"
41 "\\\\._.DS_Store$"
42 "\\\\._buildmac$"
Alexandre Lision51140e12013-12-02 10:54:09 -050043 )
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 Lision7fd5d3d2013-12-04 13:06:40 -050058 ADD_CUSTOM_TARGET(svncheck
59 COMMAND cd $(CMAKE_SOURCE_DIR) && LC_ALL=C git status | grep -q "nothing to commit .working directory clean.")
Alexandre Lision51140e12013-12-02 10:54:09 -050060
Alexandre Lision7fd5d3d2013-12-04 13:06:40 -050061 SET(AUTOBUILD_COMMAND
62 COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/*.tar.bz2
Alexandre Lision51140e12013-12-02 10:54:09 -050063 COMMAND ${CMAKE_MAKE_PROGRAM} package_source
Alexandre Lision51140e12013-12-02 10:54:09 -050064# COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/package/${PACKAGE}.changes" "${CMAKE_BINARY_DIR}/package/${PACKAGE}.changes"
65 )
66
Alexandre Lision7fd5d3d2013-12-04 13:06:40 -050067 ADD_CUSTOM_TARGET(srcpackage_local
68 ${AUTOBUILD_COMMAND})
Alexandre Lision51140e12013-12-02 10:54:09 -050069
Alexandre Lision7fd5d3d2013-12-04 13:06:40 -050070 ADD_CUSTOM_TARGET(srcpackage
71 COMMAND ${CMAKE_MAKE_PROGRAM} svncheck
72 ${AUTOBUILD_COMMAND})
73
74 ENDMACRO(GENERATE_PACKAGING)