From ae49dab6e72fc743d4a393e10f2e2558e11b76e0 Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 22:08:54 +0000 Subject: [PATCH 1/2] Create deb and rpm packages using cpack --- CMakeLists.txt | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f783af..e9c283c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,5 +169,38 @@ if (BUILD_SAMPLE_CODE) # no INSTALL of this 'local' sample endif () + +########################################################## +### Create deb and RPM +########################################################## +IF(WIN32) + set(CPACK_GENERATOR "NSIS;ZIP") +else(WIN32) + set(CPACK_GENERATOR "DEB;RPM") +endif(WIN32) + +set(CPACK_PACKAGE_VENDOR "HTML Tidy Advocacy Community Group") +set(CPACK_PACKAGE_CONTACT "maintainer@htacg.org") + +set(CPACK_PACKAGE_VERSION ${LIBTIDY_VERSION}) +set(CPACK_PACKAGE_VERSION_MAJOR "${TIDY_MAJOR_VERSION}") +set(CPACK_PACKAGE_VERSION_MINOR "${TIDY_MINOR_VERSION}") +set(CPACK_PACKAGE_VERSION_PATCH "${TIDY_POINT_VERSION}") + +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE.md") + +## debian config +set(CPACK_DEBIAN_PACKAGE_MAINTAINER ${CPACK_PACKAGE_CONTACT}) +set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.html-tidy.org/") +#set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc") +set(CPACK_DEBIAN_PACKAGE_SECTION "Libraries") + +set(BITNESS 32) +if(CMAKE_SIZEOF_VOID_P EQUAL 8) + set(BITNESS 64) +endif() +set( CPACK_PACKAGE_FILE_NAME "tidy5-${CPACK_PACKAGE_VERSION}-${BITNESS}bit" ) + +INCLUDE(CPack) # eof From 648b20e622808c3fcd0c830716d41b3ed3dd96fd Mon Sep 17 00:00:00 2001 From: Pedro Date: Thu, 5 Mar 2015 22:20:46 +0000 Subject: [PATCH 2/2] Create zips and tarballs --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e9c283c..a30da09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,9 +174,9 @@ endif () ### Create deb and RPM ########################################################## IF(WIN32) - set(CPACK_GENERATOR "NSIS;ZIP") + set(CPACK_GENERATOR "ZIP;NSIS") else(WIN32) - set(CPACK_GENERATOR "DEB;RPM") + set(CPACK_GENERATOR "TGZ;DEB;RPM") endif(WIN32) set(CPACK_PACKAGE_VENDOR "HTML Tidy Advocacy Community Group")