Commit 9cae7bf8fc82cfff6841f3e7bf13d6df3938bc8d
1 parent
5a1e7228
Include unique distro version in deb builds
This is required to be able to put them all in the repo with reprepro.
Showing
2 changed files
with
26 additions
and
0 deletions
.get-os-codename-and-stamp.sh
0 → 100755
| 1 | +#!/bin/bash | ||
| 2 | + | ||
| 3 | +stamp=$(date +%s) | ||
| 4 | +MY_CODENAME="" | ||
| 5 | + | ||
| 6 | +if [[ -e "/etc/os-release" ]]; then | ||
| 7 | + eval "$(cat "/etc/os-release")" | ||
| 8 | + MY_CODENAME="$VERSION_CODENAME" | ||
| 9 | +elif [[ -e "/etc/lsb-release" ]]; then | ||
| 10 | + eval "$(cat "/etc/lsb-release")" | ||
| 11 | + MY_CODENAME="$DISTRIB_CODENAME" | ||
| 12 | +else | ||
| 13 | + echo "Error in determing os codename" | ||
| 14 | + exit 1 | ||
| 15 | +fi | ||
| 16 | + | ||
| 17 | +if [[ -z "$MY_CODENAME" ]]; then | ||
| 18 | + echo "ERROR in determining OS codename" | ||
| 19 | + exit 1 | ||
| 20 | +fi | ||
| 21 | + | ||
| 22 | +echo -n "${stamp}+${MY_CODENAME}" |
CMakeLists.txt
| @@ -106,6 +106,8 @@ add_executable(FlashMQ | @@ -106,6 +106,8 @@ add_executable(FlashMQ | ||
| 106 | 106 | ||
| 107 | target_link_libraries(FlashMQ pthread dl ssl crypto) | 107 | target_link_libraries(FlashMQ pthread dl ssl crypto) |
| 108 | 108 | ||
| 109 | +execute_process(COMMAND ../.get-os-codename-and-stamp.sh OUTPUT_VARIABLE OS_CODENAME) | ||
| 110 | + | ||
| 109 | install(TARGETS FlashMQ | 111 | install(TARGETS FlashMQ |
| 110 | RUNTIME DESTINATION "/usr/bin/") | 112 | RUNTIME DESTINATION "/usr/bin/") |
| 111 | 113 | ||
| @@ -121,6 +123,8 @@ SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Wiebe Cazemier <wiebe@halfgaar.net>") | @@ -121,6 +123,8 @@ SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Wiebe Cazemier <wiebe@halfgaar.net>") | ||
| 121 | SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Light-weight, high performance MQTT server capable of million+ messages per second.") | 123 | SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "Light-weight, high performance MQTT server capable of million+ messages per second.") |
| 122 | SET(CPACK_PACKAGE_HOMEPAGE_URL "https://www.flashmq.org/") | 124 | SET(CPACK_PACKAGE_HOMEPAGE_URL "https://www.flashmq.org/") |
| 123 | SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.1 (>= 1.1.0)") | 125 | SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.1 (>= 1.1.0)") |
| 126 | +SET(CPACK_DEBIAN_FILE_NAME "DEB-DEFAULT") | ||
| 127 | +SET(CPACK_DEBIAN_PACKAGE_RELEASE ${OS_CODENAME}) | ||
| 124 | SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) | 128 | SET(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR}) |
| 125 | SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) | 129 | SET(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR}) |
| 126 | SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) | 130 | SET(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH}) |