Skip to content

Commit

Permalink
refactor(build): Remove UA_PACK_DEBIAN - use the tools/prepare_packag…
Browse files Browse the repository at this point in the history
…ing script instead
  • Loading branch information
jpfr committed Jun 4, 2024
1 parent 33b45d6 commit f455d0f
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
17 changes: 0 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -468,23 +468,6 @@ mark_as_advanced(UA_BUILD_OSS_FUZZ)
# Advanced Build Targets #
##########################

# Build packages - invoke via `make package`
option(UA_PACK_DEBIAN "Special build switch used in .deb packaging" OFF)
mark_as_advanced(UA_PACK_DEBIAN)
if(UA_PACK_DEBIAN)
set(CPACK_GENERATOR "TGZ;DEB")
set(CPACK_PACKAGE_VENDOR "open62541 team")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OPC UA implementation")
set(CPACK_PACKAGE_DESCRIPTION "open62541 (<http://open62541.org>) is an open source implementation of OPC UA (OPC Unified Architecture / IEC 62541) written in the C language. The library is usable with all major compilers and provides the necessary tools to implement dedicated OPC UA clients and servers, or to integrate OPC UA-based communication into existing applications.")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_VERSION_MAJOR "${OPEN62541_VER_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${OPEN62541_VER_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${OPEN62541_VER_PATCH}${OPEN62541_VER_LABEL}")
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "open62541 team") # required
include(CPack)
endif()

# Building shared libs (dll, so). This option is written into ua_config.h.
set(UA_DYNAMIC_LINKING OFF)
if(BUILD_SHARED_LIBS)
Expand Down
4 changes: 0 additions & 4 deletions plugins/ua_config_default.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,7 @@ setDefaultConfig(UA_ServerConfig *conf, UA_UInt16 portNumber) {
conf->buildInfo.softwareVersion =
UA_STRING_ALLOC(VERSION(UA_OPEN62541_VER_MAJOR, UA_OPEN62541_VER_MINOR,
UA_OPEN62541_VER_PATCH, UA_OPEN62541_VER_LABEL));
#ifdef UA_PACK_DEBIAN
conf->buildInfo.buildNumber = UA_STRING_ALLOC("deb");
#else
conf->buildInfo.buildNumber = UA_STRING_ALLOC(__DATE__ " " __TIME__);
#endif
conf->buildInfo.buildDate = UA_DateTime_now();

UA_ApplicationDescription_clear(&conf->applicationDescription);
Expand Down
2 changes: 1 addition & 1 deletion tools/packaging/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

override_dh_auto_configure:
dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=REDUCED -DUA_ENABLE_DATATYPES_ALL=ON -DUA_ENABLE_ENCRYPTION="MBEDTLS" -DUA_ENABLE_PUBSUB=ON -DUA_ENABLE_PUBSUB_ENCRYPTION=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON -DUA_ENABLE_AMALGAMATION=OFF -DUA_PACK_DEBIAN=ON -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"
dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=REDUCED -DUA_ENABLE_DATATYPES_ALL=ON -DUA_ENABLE_ENCRYPTION="MBEDTLS" -DUA_ENABLE_PUBSUB=ON -DUA_ENABLE_PUBSUB_ENCRYPTION=ON -DUA_ENABLE_PUBSUB_INFORMATIONMODEL=ON -DUA_ENABLE_AMALGAMATION=OFF -DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"

override_dh_auto_test:
dh_auto_test -- ARGS+=--output-on-failure
Expand Down

0 comments on commit f455d0f

Please sign in to comment.