mirror of
https://github.com/triqs/dft_tools
synced 2024-09-16 17:35:31 +02:00
[cmake] Add BUILD_DEBIAN_PACKAGE option and rules
This commit is contained in:
parent
6be41fb47a
commit
51345aff2d
@ -55,3 +55,16 @@ if(${Build_Documentation})
|
|||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
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 ${APP4TRIQS_VERSION})
|
||||||
|
SET(CPACK_PACKAGE_CONTACT "https://github.com/TRIQS/app4triqs")
|
||||||
|
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 (= ${APP4TRIQS_VERSION}), triqs (= ${APP4TRIQS_VERSION})")
|
||||||
|
INCLUDE(CPack)
|
||||||
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user