diff --git a/CMakeLists.txt b/CMakeLists.txt index bb1bf6ff9..765d48286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,6 +231,9 @@ endif() include_directories(src) add_subdirectory(src) +# Release configuration +add_subdirectory(release) + enable_testing() add_subdirectory(tests) @@ -241,59 +244,3 @@ endif() if(QUERY_MODULES) add_subdirectory(query_modules) endif() - -# ----------------------------------------------------------------------------- - -# ---- Setup CPack -------- -# General setup -set(CPACK_PACKAGE_NAME memgraph) -set(CPACK_PACKAGE_VENDOR "Memgraph Ltd.") -set(CPACK_PACKAGE_DESCRIPTION_SUMMARY - "High performance, in-memory, transactional graph database") -set(CPACK_PACKAGE_VERSION_MAJOR ${memgraph_VERSION_MAJOR}) -set(CPACK_PACKAGE_VERSION_MINOR ${memgraph_VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${memgraph_VERSION_PATCH}) -set(CPACK_PACKAGE_VERSION_TWEAK ${memgraph_VERSION_TWEAK}) -set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${memgraph_VERSION}-${COMMIT_HASH}${CPACK_SYSTEM_NAME}) - -# DEB specific -# Instead of using "name " format, we use "email (name)" to prevent -# errors due to full stop, '.' at the end of "Ltd". (See: RFC 822) -set(CPACK_DEBIAN_PACKAGE_MAINTAINER "tech@memgraph.com (Memgraph Ltd.)") -set(CPACK_DEBIAN_PACKAGE_SECTION non-free/database) -set(CPACK_DEBIAN_PACKAGE_HOMEPAGE https://memgraph.com) -set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA - "${CMAKE_SOURCE_DIR}/release/debian/conffiles;" - "${CMAKE_SOURCE_DIR}/release/debian/copyright;" - "${CMAKE_SOURCE_DIR}/release/debian/prerm;" - "${CMAKE_SOURCE_DIR}/release/debian/postrm;" - "${CMAKE_SOURCE_DIR}/release/debian/postinst;") -set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) -# Description formatting is important, summary must be followed with a newline and 1 space. -set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY} - Contains Memgraph, the graph database. It aims to deliver developers the - speed, simplicity and scale required to build the next generation of - applications driver by real-time connected data.") -# Add `openssl` package to dependencies list. Used to generate SSL certificates. -set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl (>= 1.1.0)") - -# RPM specific -set(CPACK_RPM_PACKAGE_URL https://memgraph.com) -set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION - /var /var/lib /var/log /etc/logrotate.d - /lib /lib/systemd /lib/systemd/system /lib/systemd/system/memgraph.service) -set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils") -# NOTE: user specfile has a bug in cmake 3.7.2, this needs to be patched -# manually in: ~/cmake/share/cmake-3.7/Modules/CPackRPM.cmake line 2273 -# Or newer cmake version used -set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/release/rpm/memgraph.spec.in") -# Description formatting is important, no line must be greater than 80 characters. -set(CPACK_RPM_PACKAGE_DESCRIPTION "Contains Memgraph, the graph database. -It aims to deliver developers the speed, simplicity and scale required to build -the next generation of applications driver by real-time connected data.") -# Add `openssl` package to dependencies list. Used to generate SSL certificates. -set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.0.0, curl >= 7.29.0") - -# All variables must be set before including. -include(CPack) -# ---- End Setup CPack ---- diff --git a/release/CMakeLists.txt b/release/CMakeLists.txt new file mode 100644 index 000000000..917cf5c1c --- /dev/null +++ b/release/CMakeLists.txt @@ -0,0 +1,50 @@ +# ---- Setup CPack -------- + +# General setup +set(CPACK_PACKAGE_NAME memgraph) +set(CPACK_PACKAGE_VENDOR "Memgraph Ltd.") +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY + "High performance, in-memory, transactional graph database") +set(CPACK_PACKAGE_VERSION_MAJOR ${memgraph_VERSION_MAJOR}) +set(CPACK_PACKAGE_VERSION_MINOR ${memgraph_VERSION_MINOR}) +set(CPACK_PACKAGE_VERSION_PATCH ${memgraph_VERSION_PATCH}) +set(CPACK_PACKAGE_VERSION_TWEAK ${memgraph_VERSION_TWEAK}) +set(CPACK_PACKAGE_FILE_NAME ${CPACK_PACKAGE_NAME}-${memgraph_VERSION}-${COMMIT_HASH}${CPACK_SYSTEM_NAME}) + +# DEB specific +# Instead of using "name " format, we use "email (name)" to prevent +# errors due to full stop, '.' at the end of "Ltd". (See: RFC 822) +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "tech@memgraph.com (Memgraph Ltd.)") +set(CPACK_DEBIAN_PACKAGE_SECTION non-free/database) +set(CPACK_DEBIAN_PACKAGE_HOMEPAGE https://memgraph.com) +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA + "${CMAKE_CURRENT_SOURCE_DIR}/debian/conffiles;" + "${CMAKE_CURRENT_SOURCE_DIR}/debian/copyright;" + "${CMAKE_CURRENT_SOURCE_DIR}/debian/prerm;" + "${CMAKE_CURRENT_SOURCE_DIR}/debian/postrm;" + "${CMAKE_CURRENT_SOURCE_DIR}/debian/postinst;") +set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) +# Description formatting is important, summary must be followed with a newline and 1 space. +set(CPACK_DEBIAN_PACKAGE_DESCRIPTION "${CPACK_PACKAGE_DESCRIPTION_SUMMARY} + Contains Memgraph, the graph database. It aims to deliver developers the + speed, simplicity and scale required to build the next generation of + applications driver by real-time connected data.") +# Add `openssl` package to dependencies list. Used to generate SSL certificates. +set(CPACK_DEBIAN_PACKAGE_DEPENDS "openssl (>= 1.1.0)") + +# RPM specific +set(CPACK_RPM_PACKAGE_URL https://memgraph.com) +set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION + /var /var/lib /var/log /etc/logrotate.d + /lib /lib/systemd /lib/systemd/system /lib/systemd/system/memgraph.service) +set(CPACK_RPM_PACKAGE_REQUIRES_PRE "shadow-utils") +set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_CURRENT_SOURCE_DIR}/rpm/memgraph.spec.in") +# Description formatting is important, no line must be greater than 80 characters. +set(CPACK_RPM_PACKAGE_DESCRIPTION "Contains Memgraph, the graph database. +It aims to deliver developers the speed, simplicity and scale required to build +the next generation of applications driver by real-time connected data.") +# Add `openssl` package to dependencies list. Used to generate SSL certificates. +set(CPACK_RPM_PACKAGE_REQUIRES "openssl >= 1.0.0, curl >= 7.29.0") + +# All variables must be set before including. +include(CPack) diff --git a/release/README.md b/release/README.md index d600acdb5..1f7c7ff4b 100644 --- a/release/README.md +++ b/release/README.md @@ -10,5 +10,6 @@ Currently we support distributing Memgraph binary through the following packages. * Debian package + * RPM package * Docker image * ArchLinux package