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

199 lines
5.4 KiB
RPMSpec
Executable File

# $Id$
# $HeadURL$
#
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: libgdal20
Requires: libpoppler-qt5-1
Requires: libQt5Concurrent5
Requires: libQt5Core5
Requires: libQt5Gui5
Requires: libQt5Network5
Requires: libQt5Sql5-postgresql
Requires: libQt5Sql5-sqlite
Requires: libQt5WebSockets5
Requires: libQt5Xml5
Requires: libQt5Test5
Requires: ctc_GeographicLib
Requires: ctc_Log4Qt
Requires: ctc_rti
%if "@BUILDONLYHLA@" == "false"
Requires: ctc_schusstafel
%endif
#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
# no devel version...
%if "@BUILDONLYHLA@" == "false"
BuildRequires: ctc_schusstafel
%endif
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/
%exclude /shd/CTC/SV/share/Lts/Licence
%if "@BUILDONLYHLA@" == "false"
%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
%endif
%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 "@BUILDONLYHLA@" == "false"
if [ $1 -eq 1 ] || [ $1 -eq 2 ]; then
systemctl enable lts_sv.service
fi
# create link for effect_config.xml:
ln -sf /shd/CTC/SV/share/Lts/Buildings/effect_config.xml /tmp/
%endif
%preun -n @PROJECT@_sv_@OS_SYSTEM@
if [ $1 -eq 0 ]; then
systemctl disable lts_sv.service
fi
##############################################################################
#
# 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
%if "@BUILDLIC@" == "true"
##############################################################################
#
# 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
%endif