Name: ctp3-mon Version: 0.3.0 Release: 2%{?dist} Summary: CTP3 mon - Monitoring tools for ALICE ctp3 Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz BuildRequires: cmake, doxygen BuildRequires: spdlog-devel, jsoncpp-devel, czmq-devel BuildRequires: rxcpp-devel obmon-devel, dim-devel %global debug_package %{nil} Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: systemd %description CTP3 monitoring tool %prep %setup -q %build mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_DOCUMENTATION=on make %{?_smp_mflags} cd ../ %install rm -rf %{buildroot} cd build make install DESTDIR=%{buildroot} cd ../ %if 0%{?rhel} == 6 || 0%{?el6} == 1 rm -f %{buildroot}/usr/lib/systemd/system/%{name}-sensor.service rm -f %{buildroot}/usr/lib/systemd/system/%{name}-broker.service %else rm -f %{buildroot}/%{_sysconfdir}/init.d/%{name}-sensor rm -f %{buildroot}/%{_sysconfdir}/init.d/%{name}-broker %endif %if 0%{?rhel} == 6 || 0%{?el6} == 1 rm -f %{buildroot}/usr/lib/systemd/system/%{name}.service %else rm -f %{buildroot}/%{_sysconfdir}/init.d/%{name} %endif %post %systemd_post ctp3-dim-redirector.service %preun %systemd_preun ctp3-dim-redirector # Restarting %{name}.service (maybe we don't want it) %postun %systemd_postun_with_restart ctp3-dim-redirector %files %{_bindir}/* %{_libdir}/* %doc /usr/share/doc/%{name}/ %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_unitdir}/ctp3-dim-redirector.service %changelog