2015-02-03 05:21:36 +00:00
|
|
|
# make package
|
|
|
|
if(APPLE)
|
|
|
|
add_custom_target(
|
|
|
|
packages
|
|
|
|
"${CMAKE_SOURCE_DIR}/tools/deployment/make_osx_package.sh"
|
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
COMMENT "Building default OS X package (no custom config)" VERBATIM
|
2015-05-04 21:15:19 +00:00
|
|
|
DEPENDS daemon shell
|
2015-02-03 05:21:36 +00:00
|
|
|
)
|
|
|
|
elseif(LINUX)
|
|
|
|
if(UBUNTU)
|
|
|
|
set(PACKAGE_TYPE "deb")
|
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"libc6 (>=2.15)"
|
|
|
|
"zlib1g"
|
|
|
|
"libbz2-1.0"
|
|
|
|
"libapt-pkg4.12"
|
|
|
|
"libreadline6"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
if(OSQUERY_BUILD_DISTRO STREQUAL "precise")
|
2015-03-29 18:28:10 +00:00
|
|
|
set(PACKAGE_ITERATION "1.ubuntu12.04")
|
2015-02-03 05:21:36 +00:00
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
|
|
|
"libstdc++6"
|
|
|
|
"libudev0"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
elseif(OSQUERY_BUILD_DISTRO STREQUAL "trusty")
|
2015-03-29 18:28:10 +00:00
|
|
|
set(PACKAGE_ITERATION "1.ubuntu14.04")
|
2015-02-03 05:21:36 +00:00
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
|
|
|
"libstdc++6 (>= 4.8)"
|
|
|
|
"libudev1"
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
elseif(CENTOS)
|
|
|
|
set(PACKAGE_TYPE "rpm")
|
2015-03-28 02:19:55 +00:00
|
|
|
set(PACKAGE_ITERATION "1.el")
|
2015-02-13 10:45:43 +00:00
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"glibc >= 2.12"
|
|
|
|
"openssl >= 1.0"
|
|
|
|
"bzip2-libs"
|
|
|
|
"readline"
|
|
|
|
"zlib"
|
|
|
|
"rpm-libs"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
if(OSQUERY_BUILD_DISTRO STREQUAL "centos6")
|
2015-03-28 02:19:55 +00:00
|
|
|
set(PACKAGE_ITERATION "1.el6_6.5")
|
2015-02-13 01:01:10 +00:00
|
|
|
set(PACKAGE_DEPENDENCIES
|
2015-02-13 10:45:43 +00:00
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
2015-05-11 09:53:48 +00:00
|
|
|
"cryptsetup-luks-libs"
|
2015-02-13 01:01:10 +00:00
|
|
|
"libudev"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
elseif(OSQUERY_BUILD_DISTRO STREQUAL "centos7")
|
2015-03-28 02:19:55 +00:00
|
|
|
set(PACKAGE_ITERATION "1.el7_7.0")
|
2015-02-13 01:01:10 +00:00
|
|
|
set(PACKAGE_DEPENDENCIES
|
2015-02-13 10:45:43 +00:00
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
2015-05-11 09:53:48 +00:00
|
|
|
"cryptsetup-libs"
|
2015-02-13 01:01:10 +00:00
|
|
|
)
|
|
|
|
endif()
|
2015-04-03 23:53:02 +00:00
|
|
|
elseif(RHEL)
|
|
|
|
set(PACKAGE_TYPE "rpm")
|
|
|
|
set(PACKAGE_ITERATION "1.el")
|
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"glibc >= 2.12"
|
|
|
|
"openssl >= 1.0"
|
|
|
|
"bzip2-libs"
|
|
|
|
"readline"
|
|
|
|
"zlib"
|
|
|
|
"rpm-libs"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
if(OSQUERY_BUILD_DISTRO STREQUAL "rhel6")
|
2015-04-03 23:53:02 +00:00
|
|
|
set(PACKAGE_ITERATION "1.el6_6.5")
|
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
2015-05-11 09:53:48 +00:00
|
|
|
"cryptsetup-luks-libs"
|
2015-04-03 23:53:02 +00:00
|
|
|
"libudev"
|
|
|
|
)
|
2015-04-19 02:51:00 +00:00
|
|
|
elseif(OSQUERY_BUILD_DISTRO STREQUAL "rhel7")
|
2015-04-03 23:53:02 +00:00
|
|
|
set(PACKAGE_ITERATION "1.el7_7.0")
|
|
|
|
set(PACKAGE_DEPENDENCIES
|
|
|
|
"${PACKAGE_DEPENDENCIES}"
|
2015-05-11 09:53:48 +00:00
|
|
|
"cryptsetup-libs"
|
2015-04-03 23:53:02 +00:00
|
|
|
)
|
|
|
|
endif()
|
2015-02-03 05:21:36 +00:00
|
|
|
endif()
|
|
|
|
JOIN("${PACKAGE_DEPENDENCIES}" ", " PACKAGE_DEPENDENCIES)
|
|
|
|
|
|
|
|
add_custom_target(
|
|
|
|
packages
|
|
|
|
"${CMAKE_SOURCE_DIR}/tools/deployment/make_linux_package.sh"
|
2015-03-28 02:19:55 +00:00
|
|
|
-t ${PACKAGE_TYPE} -i "${PACKAGE_ITERATION}"
|
|
|
|
-d "${PACKAGE_DEPENDENCIES}"
|
2015-02-03 05:21:36 +00:00
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
COMMENT "Building linux packages (no custom config)" VERBATIM
|
2015-05-04 21:15:19 +00:00
|
|
|
DEPENDS daemon shell
|
2015-02-03 05:21:36 +00:00
|
|
|
)
|
|
|
|
endif()
|