Name: hlit-mon Version: 0.5.2 Release: 0%{?dist} Summary: Hubrilit monitoring tool Group: System Environment/Libraries License: LGPL v3+ Source0: %{name}-%{version}.tar.gz BuildRequires: cmake, libgtop2-devel, czmq-devel, doxygen BuildRequires: jsoncpp-devel %if 0%{?rhel} == 6 || 0%{?el6} == 1 BuildRequires: mysql-devel %else Requires(post): systemd Requires(preun): systemd Requires(postun): systemd BuildRequires: systemd BuildRequires: mariadb-devel %endif %description Hubrilit monitoring tool. %prep %setup -q %build mkdir build cd build cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=RelWithDebInfo make %{?_smp_mflags} make doc 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/hlit-mon-sensor.service rm -f %{buildroot}/usr/lib/systemd/system/hlit-mon-broker.service rm -f %{buildroot}/usr/lib/systemd/system/hlit-mon-registrar.service rm -f %{buildroot}/usr/lib/systemd/system/hlit-soft-broker.service %else rm -f %{buildroot}/%{_sysconfdir}/init.d/hlit-mon-sensor rm -f %{buildroot}/%{_sysconfdir}/init.d/hlit-mon-broker rm -f %{buildroot}/%{_sysconfdir}/init.d/hlit-mon-registrar rm -f %{buildroot}/%{_sysconfdir}/init.d/hlit-soft-broker %endif %post %if 0%{?rhel} == 6 || 0%{?el6} == 1 %else %systemd_post hlit-mon-sensor.service %systemd_post hlit-mon-broker.service %systemd_post hlit-mon-registrar.service %systemd_post hlit-soft-broker.service %endif %preun %if 0%{?rhel} == 6 || 0%{?el6} == 1 %else %systemd_preun hlit-mon-sensor.service %systemd_preun hlit-mon-broker.service %systemd_preun hlit-mon-registrar.service %systemd_preun hlit-soft-broker.service %endif %postun %if 0%{?rhel} == 6 || 0%{?el6} == 1 %else %systemd_postun_with_restart hlit-mon-sensor.service %systemd_postun_with_restart hlit-mon-broker.service %systemd_postun_with_restart hlit-mon-registrar.service %systemd_postun_with_restart hlit-soft-broker.service %endif %files %{_bindir}/hlit-mon-sensor %{_bindir}/hlit-mon-broker %{_bindir}/hlit-mon-registrar %{_bindir}/hlit-mon-sub-test %{_bindir}/hlit-soft-sensor %{_bindir}/hlit-soft-broker %{_libdir}/libHlitMonSensor.so %{_libdir}/libHlitMonRegistrar.so %doc %{_defaultdocdir}/%{name}/html %config(noreplace) %{_sysconfdir}/sysconfig/hlit-mon.conf %{_sysconfdir}/sysconfig/hlit-soft.conf.example %{_sysconfdir}/profile.d/modulesx_hlit-soft.sh %if 0%{?rhel} == 6 || 0%{?el6} == 1 %attr(0755, root, root) %{_sysconfdir}/init.d/hlit-mon-sensor %attr(0755, root, root) %{_sysconfdir}/init.d/hlit-mon-broker %attr(0755, root, root) %{_sysconfdir}/init.d/hlit-mon-registrar %attr(0755, root, root) %{_sysconfdir}/init.d/hlit-soft-broker %else %{_unitdir}/hlit-mon-sensor.service %{_unitdir}/hlit-mon-broker.service %{_unitdir}/hlit-mon-registrar.service %{_unitdir}/hlit-soft-broker.service %endif %changelog