1
0
mirror of https://github.com/altlinux/admc.git synced 2025-02-10 05:57:24 +03:00

update files to support debian

This commit is contained in:
august-alt 2021-06-02 17:21:28 +04:00
parent f41ca71d85
commit 2a14822282
5 changed files with 26 additions and 8 deletions

View File

@ -27,6 +27,21 @@ enable_testing()
include(GNUInstallDirs)
option(ADMC_BUILD_DEB "Build the deb package of ADMC." OFF)
add_subdirectory(src)
add_subdirectory(tests)
if(NOT ADMC_BUILD_DEB)
add_subdirectory(tests)
endif(NOT ADMC_BUILD_DEB)
add_subdirectory(doc)
if (ADMC_BUILD_DEB)
SET(CPACK_GENERATOR "DEB")
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Kees van Vloten")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "i386")
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Samba domain management console.")
SET(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/altlinux/admc")
INCLUDE(CPack)
endif(ADMC_BUILD_DEB)

View File

@ -4,7 +4,7 @@ set(ADMC_COMPRESSED_HELP ${CMAKE_CURRENT_BINARY_DIR}/admc.qch)
add_custom_command(
OUTPUT ${ADMC_COMPRESSED_HELP}
COMMAND qhelpgenerator-qt5 ${ADMC_HELP_PROJECT} -o ${ADMC_COMPRESSED_HELP}
COMMAND qhelpgenerator ${ADMC_HELP_PROJECT} -o ${ADMC_COMPRESSED_HELP}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/*
)
@ -15,7 +15,7 @@ add_custom_target(doc
install(
FILES ${ADMC_COMPRESSED_HELP}
TYPE DATA
DESTINATION ${CMAKE_INSTALL_DOCDIR}
)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/admc.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
INSTALL(FILES ${PROJECT_SOURCE_DIR}/doc/admc.1 DESTINATION ${CMAKE_INSTALL_MANDIR}/man1/)

View File

@ -61,6 +61,10 @@ add_custom_target(adldap_ts
COMMAND ${Qt5_LUPDATE_EXECUTABLE} -recursive ${CMAKE_CURRENT_SOURCE_DIR} -ts ${TS_FILES} -noobsolete
)
if(NOT ADMC_BUILD_DEB)
target_compile_definitions(adldap PRIVATE SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH=1)
endif(NOT ADMC_BUILD_DEB)
# Generate translation binaries (.qm) from sources (.ts)
set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRENT_SOURCE_DIR})
qt5_add_translation(QM_FILES ${TS_FILES})

View File

@ -31,9 +31,6 @@
#define N_ELEMENTS(arr) (sizeof(arr) / sizeof(arr[0]))
#endif
// TODO: figure out how to define this
#define SMB_HAS_NEW_NDR_PULL_STEAL_SWITCH
static enum ndr_err_code
ndr_pull_GUID(struct ndr_pull *ndr,
int ndr_flags,

View File

@ -179,4 +179,6 @@ set_source_files_properties(${TS_FILES} PROPERTIES OUTPUT_LOCATION ${CMAKE_CURRE
qt5_add_translation(QM_FILES ${TS_FILES})
install(TARGETS admc DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS admctest DESTINATION ${CMAKE_INSTALL_LIBDIR})
if(NOT ADMC_BUILD_DEB)
install(TARGETS admctest DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif(NOT ADMC_BUILD_DEB)