# $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: LifeMaps GmbH URL: http://www.life-maps.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 Requires: ctc_schusstafel #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... 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/ %exclude /shd/CTC/SV/share/Lts/Licence %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 systemctl enable lts_sv.service fi # create link for effect_config.xml: ln -sf /shd/CTC/SV/share/Lts/Buildings/effect_config.xml /tmp/ %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: libgdal20 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: libQt5DBus5 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 #Requires: libbotan-2 #BuildRequires: libbotan-devel 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: pkgconfig(Qt5DBus) 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,775) # %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 %pre -n @PROJECT@_ws_@OS_SYSTEM@ logdir="${RPM_INSTALL_PREFIX}/../LOG" chmod +x /shd/CTC/WS/bin/automount.sh 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 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' %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: libgdal20 Requires: libpoppler-qt5-1 Requires: libQt5Concurrent5 Requires: libQt5Core5 Requires: libQt5Gui5 Requires: libQt5Network5 Requires: libQt5Sql5-postgresql Requires: libQt5Sql5-sqlite 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,775) # %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