Create Debian and RPM packages from CMakeLists

Packages must have a name, a version, a section, an architecture, a maintainer, a description (long and summary), dependencies
Shared libraries must be stripped, have soversion, version (debug symbols are found in separate packages), since MODULE is used instead of SHARED it works as a plugin library which is opened using dlopen-like functionality, see:  https://cmake.org/cmake/help/latest/command/add_library.html
Packages must have postin and postun scripts
Since it is not recommended to modify CMAKE_EXE_LINKER_FLAGS, cmake's path variables are used : https://discourse.cmake.org/t/how-do-i-replace-the-compiler-options-for-one-target/7815/5
This commit is contained in:
calvin_peyron
2026-01-28 11:36:34 +01:00
parent 8496e88a10
commit 26d24dbd0b
13 changed files with 620 additions and 5 deletions
@@ -0,0 +1,13 @@
[Unit]
Description=lte-softmodem
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/lte-softmodem -O /etc/openairinterface/lte/enb.band7.tm1.50PRB.usrpb210.conf --device.name oai_usrpdevif
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,13 @@
[Unit]
Description=nr-cuup
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/nr-cuup -O /etc/openairinterface/nr/gnb-cuup.sa.f1.conf
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target
@@ -0,0 +1,14 @@
[Unit]
Description=nr-softmodem
[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/nr-softmodem -O /etc/openairinterface/nr/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E --continuous-tx -A -2 --device.name oai_usrpdevif
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=multi-user.target