mirror of
https://github.com/triqs/dft_tools
synced 2024-08-31 00:03:43 +02:00
[cmake] Add deb packaging rules
This commit is contained in:
parent
d0ea51a1f5
commit
4ae6571a17
@ -65,3 +65,19 @@ if(${Build_Documentation})
|
|||||||
endif()
|
endif()
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#--------------------------------------------------------
|
||||||
|
# Packaging
|
||||||
|
#--------------------------------------------------------
|
||||||
|
option(BUILD_DEBIAN_PACKAGE "Build a deb package" OFF)
|
||||||
|
if(BUILD_DEBIAN_PACKAGE)
|
||||||
|
if(NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr")
|
||||||
|
message(FATAL_ERROR "CMAKE_INSTALL_PREFIX must be /usr for packaging")
|
||||||
|
endif()
|
||||||
|
SET(CPACK_GENERATOR "DEB")
|
||||||
|
SET(CPACK_PACKAGE_VERSION ${DFT_TOOLS_VERSION})
|
||||||
|
SET(CPACK_PACKAGE_CONTACT "https://github.com/TRIQS/dft_tools")
|
||||||
|
EXECUTE_PROCESS(COMMAND dpkg --print-architecture OUTPUT_VARIABLE CMAKE_DEBIAN_PACKAGE_ARCHITECTURE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.23), libgcc1 (>= 1:8), libstdc++6, python, libpython2.7, libopenmpi1.10, libhdf5-10, libgmp10, libfftw3-double3, libibverbs1, libgfortran3, zlib1g, libsz2, libhwloc5, libquadmath0, libaec0, libnuma1, libltdl7, libblas3, liblapack3, python-numpy, python-h5py, python-jinja2, python-mako, python-mpi4py, python-matplotlib, python-scipy, cpp2py (= ${DFT_TOOLS_VERSION}), triqs (= ${DFT_TOOLS_VERSION})")
|
||||||
|
INCLUDE(CPack)
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user