Files
qt5-legatus-legacy/specs/lts15.6.spec
2026-08-13 18:33:10 +02:00

390 lines
12 KiB
RPMSpec
Executable File

# $Id: lts15.6.spec 64950 2025-05-22 06:47:27Z karwat $
# $HeadURL: svn://192.168.133.21/TDS/branches/product/devel/trunk/specs/lts15.6.spec $
#
Name: @PROJECT@_@OS_SYSTEM@
Version: @VERSION@
Release: @RELEASE@
Packager: @PACKAGER@
Summary: Live Simulation Training System Software
License: proprietary
Group: Applications/Communications
Source: @SOURCES@
Vendor: Rheinmetall Electronics GmbH
URL: http://www.rheinmetall-electronics.de
Prefix: /shd/CTC
%description
Live Simulation Training System Software
Build information: @JENKINS_BUILD_TAG@
%define _unpackaged_files_terminate_build 0
%debug_package
%prep
%setup -q -n @SOURCE_DIR_REL@
export source_dir=`pwd`
%build
my_builddir=%{_builddir}/%{buildsubdir}-build
rm -fr ${my_builddir}
mkdir -p ${my_builddir}
cd ${my_builddir}
cmake -DBUILD_RPM=ON -DBUILD_ALL=ON -DBUILD_TESTING=OFF @CMAKE_FLAGS@ -DCMAKE_COLOR_MAKEFILE=OFF -DCMAKE_INSTALL_PREFIX=%{prefix} %{_builddir}/%{buildsubdir}
make %{?_smp_mflags}
%install
my_builddir=%{_builddir}/%{buildsubdir}-build
cd ${my_builddir}
DESTDIR=%{buildroot} cmake -DCOMPONENT=Unspecified -P cmake_install.cmake
%clean
%{__rm} -rf '%{buildroot}'
%{__rm} -rf '%{_builddir}'
%changelog
#* date +"%a %b %d %Y" text
* Tue Sep 19 2017 CE
- initial
##############################################################################
#
# LTS Server
#
%package -n @PROJECT@_sv_@OS_SYSTEM@
Summary: LTS Software Server
Group: Applications/Communications
Prefix: /shd/CTC/SV
Requires: libecpg6
Requires: libgdal34
Requires: libpoppler-qt5-1
Requires: libQt5Concurrent5
Requires: libQt5Core5
Requires: libQt5Gui5
Requires: libQt5Network5
Requires: libQt5Sql5-postgresql
Requires: libQt5WebSockets5
Requires: libQt5Xml5
Requires: libQt5Test5
Requires: ctc_GeographicLib
Requires: ctc_Log4Qt
Requires: ctc_rti
Requires: ctc_tmsif
Requires: ctc_schusstafel
# for elevation and new building files
Requires: @PROJECT@_situation_map
Requires: @PROJECT@_dependencies
#Requires: ctc_ngs_tes_uae_apache
BuildRequires: python-xml
BuildRequires: grantlee5-devel
BuildRequires: pkgconfig(gdal)
BuildRequires: pkgconfig(poppler-qt5)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5WebSockets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: postgresql-devel
BuildRequires: ctc_GeographicLib-devel
BuildRequires: ctc_Log4Qt-devel
BuildRequires: ctc_rti-devel
BuildRequires: ctc_tmsif-devel
# no devel version...
BuildRequires: ctc_schusstafel
AutoReqProv: no
%description -n @PROJECT@_sv_@OS_SYSTEM@
Live Simulation Training System Server Software
Build information: @JENKINS_BUILD_TAG@
%files -n @PROJECT@_sv_@OS_SYSTEM@
%defattr(-,ctc_sv,ctc)
# %dir marks a single directory in a file list to be included as being owned by
# a package. By default, if you list a directory name WITHOUT a %dir macro,
# EVERYTHING in that directory is included in the file list and later installed
# as part of that package.
/shd/CTC/SV/
%attr(-, root root) /etc/systemd/system/lts_sv.service
%attr(-, root root) /etc/ld.so.conf.d/lts_sv.conf
%attr(-, root root) /etc/security/limits.d/lts_sv_limits.conf
%pre -n @PROJECT@_sv_@OS_SYSTEM@
logdir="${RPM_INSTALL_PREFIX}/../LOG"
if [ ! -e ${logdir} ]; then
mkdir -p ${logdir}
chown ctc:ctc ${logdir}
chmod 1777 ${logdir}
fi
%post -n @PROJECT@_sv_@OS_SYSTEM@
/sbin/ldconfig
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
loginctl enable-linger ctc_sv
systemctl set-property lts_sv.service CPUShares=1024 MemoryAccounting=yes CPUAccounting=yes
systemctl enable lts_sv.service
fi
%preun -n @PROJECT@_sv_@OS_SYSTEM@
if [ $1 -eq 0 ]; then
systemctl disable lts_sv.service
fi
##############################################################################
#
# LTS Workstation
#
%package -n @PROJECT@_ws_@OS_SYSTEM@
Summary: LTS Software Workstation
Group: Applications/Communications
Prefix: /shd/CTC/WS
Requires: @PROJECT@_situation_map
Requires: @PROJECT@_dependencies
Requires: @PROJECT@_AVS_Workstation
Requires: libecpg6
Requires: libgdal34
Requires: libkdchart1
Requires: libkdreports1_7_1
Requires: libpoppler-qt5-1
Requires: libQt5Concurrent5
Requires: libQt5Core5
Requires: libQt5Gui5
Requires: libQt5Multimedia5
Requires: libQt5Network5
Requires: libQt5Positioning5
Requires: libQt5PrintSupport5
# non-conformant name
Requires: libQtQuick5
Requires: libQt5Sensors5
Requires: libQt5Sql5-postgresql
Requires: libQt5Svg5
# non-conformant name
Requires: libqt5-qtwebengine
Requires: libQt5WebSockets5
Requires: libQt5Widgets5
Requires: libQt5Xml5
Requires: ctc_BuildingViewer
Requires: ctc_GeographicLib
Requires: ctc_Log4Qt
Requires: ctc_rti
# the next two are for remote access to e.g. DBAdministration
Requires: sshpass
Requires: openssh
Requires: rdesktop
Requires: Xerces-c
#Requires: sqlite for thp data
Requires: libQt5Sql5-sqlite
Requires: mate-screenshot
#Requires: new ffmpeq for thp
Requires: ffmpeg
#Requires: ctc_ngs_tes_uae_apache
Requires: sqlite3
BuildRequires: python-xml
BuildRequires: cmake
BuildRequires: kdchart-devel
BuildRequires: qt5-kdreports-devel
BuildRequires: pkgconfig(gdal)
BuildRequires: pkgconfig(poppler-qt5)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Multimedia)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Positioning)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Qml)
BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5QuickWidgets)
BuildRequires: pkgconfig(Qt5Sensors)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5WebEngine)
BuildRequires: pkgconfig(Qt5WebEngineWidgets)
BuildRequires: pkgconfig(Qt5WebSockets)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: @PROJECT@_situation_map-devel
BuildRequires: ctc_BuildingViewer-devel
BuildRequires: ctc_GeographicLib-devel
BuildRequires: ctc_Log4Qt-devel
BuildRequires: ctc_rti-devel
BuildRequires: postgresql-devel
BuildRequires: pkgconfig(xerces-c)
BuildRequires: xsd
AutoReqProv: no
%description -n @PROJECT@_ws_@OS_SYSTEM@
Live Simulation Training System Workstation Software
Build information: @JENKINS_BUILD_TAG@
%files -n @PROJECT@_ws_@OS_SYSTEM@
%defattr(-,ctc_ws,ctc)
# %dir marks a single directory in a file list to be included as being owned by
# a package. By default, if you list a directory name WITHOUT a %dir macro,
# EVERYTHING in that directory is included in the file list and later installed
# as part of that package.
/shd/CTC/WS/
%attr(-, root root) /etc/ld.so.conf.d/lts_ws.conf
#/shd/CTC/WS/.config/systemd/user/usb_mount.service
#/shd/CTC/WS/.config/systemd/user/graphical.target.wants
%pre -n @PROJECT@_ws_@OS_SYSTEM@
logdir="${RPM_INSTALL_PREFIX}/../LOG"
if [ ! -e ${logdir} ]; then
mkdir -p ${logdir}
chown ctc:ctc ${logdir}
chmod 1777 ${logdir}
fi
%post -n @PROJECT@_ws_@OS_SYSTEM@
/sbin/ldconfig
chmod +x /shd/CTC/WS/bin/automount.sh
if su -c "Login moeglich" - ctc_ws > /dev/null 2>&1; then
su - ctc_ws -c 'XDG_RUNTIME_DIR=/run/user/$(id -u) systemctl --user daemon-reload'
su - ctc_ws -c 'XDG_RUNTIME_DIR=/run/user/$(id -u) systemctl --user enable usb_mount.service'
loginctl enable-linger ctc_ws
chown ctc_ws:ctc /shd/CTC/WS/.config/systemd -R
su - ctc_ws -c 'XDG_RUNTIME_DIR=/run/user/$(id -u) systemctl --user start usb_mount.service'
else
ln -s /shd/CTC/WS/.config/systemd/user/usb_mount.service /shd/CTC/WS/.config/systemd/user/graphical.target.wants/usb_mount.service
touch /var/lib/systemd/linger/ctc_ws
chown ctc_ws:ctc /shd/CTC/WS/.config/systemd -R
fi
%preun -n @PROJECT@_ws_@OS_SYSTEM@
if [ $1 -eq 0 ]; then
su - ctc_ws -c 'XDG_RUNTIME_DIR=/run/user/$(id -u) systemctl --user disable usb_mount.service'
fi
##############################################################################
#
# LTS AARApplication
#
%package -n @PROJECT@_aar_@OS_SYSTEM@
Summary: LTS Software AARApplication
Group: Applications/Communications
Prefix: /shd/CTC/AAR
Requires: libecpg6
Requires: libgdal34
Requires: libpoppler-qt5-1
Requires: libQt5Concurrent5
Requires: libQt5Core5
Requires: libQt5Gui5
Requires: libQt5Network5
Requires: libQt5Sql5-postgresql
Requires: libQt5WebSockets5
Requires: libQt5Xml5
Requires: ctc_GeographicLib
Requires: ctc_Log4Qt
Requires: ctc_rti
Requires: ctc_schusstafel
BuildRequires: python-xml
BuildRequires: grantlee5-devel
BuildRequires: pkgconfig(gdal)
BuildRequires: pkgconfig(poppler-qt5)
BuildRequires: pkgconfig(Qt5Concurrent)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Test)
BuildRequires: pkgconfig(Qt5WebSockets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: postgresql-devel
BuildRequires: ctc_GeographicLib-devel
BuildRequires: ctc_Log4Qt-devel
BuildRequires: ctc_rti-devel
# no devel version...
BuildRequires: ctc_schusstafel
AutoReqProv: no
%description -n @PROJECT@_aar_@OS_SYSTEM@
Live Simulation Training System Server Software
Build information: @JENKINS_BUILD_TAG@
%files -n @PROJECT@_aar_@OS_SYSTEM@
%defattr(-,ctc_aar,ctc)
# %dir marks a single directory in a file list to be included as being owned by
# a package. By default, if you list a directory name WITHOUT a %dir macro,
# EVERYTHING in that directory is included in the file list and later installed
# as part of that package.
/shd/CTC/AAR/
%attr(-, root root) /etc/systemd/system/lts_sv.service
%attr(-, root root) /etc/ld.so.conf.d/lts_aar.conf
%attr(-, root root) /etc/security/limits.d/lts_aar_limits.conf
%pre -n @PROJECT@_aar_@OS_SYSTEM@
logdir="${RPM_INSTALL_PREFIX}/../LOG"
if [ ! -e ${logdir} ]; then
mkdir -p ${logdir}
chown ctc:ctc ${logdir}
chmod 1777 ${logdir}
fi
%post -n @PROJECT@_aar_@OS_SYSTEM@
/sbin/ldconfig
##############################################################################
#
# LTS-CC.CONF
#
%package -n @PROJECT@_ltscc_@OS_SYSTEM@
Summary: LTS Software lts-cc.conf
Group: Applications/Communications
Prefix: /shd/CTC/SV
%description -n @PROJECT@_ltscc_@OS_SYSTEM@
Live Simulation Training System Server Software lts-cc.conf
Build information: @JENKINS_BUILD_TAG@
%files -n @PROJECT@_ltscc_@OS_SYSTEM@
#%defattr(-,ctc_aar,ctc)
# %dir marks a single directory in a file list to be included as being owned by
# a package. By default, if you list a directory name WITHOUT a %dir macro,
# EVERYTHING in that directory is included in the file list and later installed
# as part of that package.
%attr(-, root root) /etc/lts-cc.conf
#%pre -n @PROJECT@_ltscc_@OS_SYSTEM@
%post -n @PROJECT@_ltscc_@OS_SYSTEM@
/sbin/ldconfig
##############################################################################
#
# Licence
#
%package -n @PROJECT@_licence_@OS_SYSTEM@
Summary: LTS Software Licence
Group: Applications/Communications
Prefix: /shd/CTC/SV
%description -n @PROJECT@_licence_@OS_SYSTEM@
Live Simulation Training System Server Software Licence
Build information: @JENKINS_BUILD_TAG@
%files -n @PROJECT@_licence_@OS_SYSTEM@
%defattr(-,ctc_sv,ctc)
# %dir marks a single directory in a file list to be included as being owned by
# a package. By default, if you list a directory name WITHOUT a %dir macro,
# EVERYTHING in that directory is included in the file list and later installed
# as part of that package.
/shd/CTC/SV/share/Lts/Licence
#%pre -n @PROJECT@_licence_@OS_SYSTEM@
%post -n @PROJECT@_licence_@OS_SYSTEM@
/sbin/ldconfig