Permalink
Fetching contributors…
Cannot retrieve contributors at this time
82 lines (68 sloc) 2.15 KB
# -*- rpm-spec -*-
BuildRoot: @CMAKE_CURRENT_BINARY_DIR@/_CPack_Packages/Linux/RPM/@CPACK_PACKAGE_FILE_NAME@
Summary: Simple yet powerful and secure monitoring daemon originally built for Nagios/Icinga
Name: @CPACK_PACKAGE_NAME@
Version: @CPACK_PACKAGE_VERSION@
Release: @CPACK_PACKAGE_RELEASE@
License: @CPACK_RPM_PACKAGE_LICENSE@
Group: @CPACK_RPM_PACKAGE_GROUP@
Vendor: @CPACK_PACKAGE_VENDOR@
#Prefix: @CPACK_PACKAGING_INSTALL_PREFIX@
#URL: @CPACK_RPM_PACKAGE_URL@
#Source0: https://github.com/mickem/nscp/tree/master/releases/%{version}.tar.gz
#Packager: @CPACK_PACKAGE_CONTACT@
Requires: @CPACK_RPM_PACKAGE_REQUIRES@
Requires(pre): shadow-utils
#BuildRequires: cmake
#BuildRequires: python
#BuildRequires: openssl-devel
#BuildRequires: boost-devel
#BuildRequires: python-devel
#BuildRequires: protobuf-devel
#BuildRequires: protobuf-compiler
#BuildRequires: rst2pdf
#%define prefix @CMAKE_INSTALL_PREFIX@
%define _rpmdir @CPACK_RPM_DIRECTORY@
%define _rpmfilename @CPACK_RPM_FILE_NAME@
%define _unpackaged_files_terminate_build 0
%define _topdir @CPACK_RPM_DIRECTORY@
# rpmbuild 4.7+ will remove the buildroot dir during pre-install
%global __spec_install_pre %{___build_pre}
%description
@CPACK_RPM_PACKAGE_DESCRIPTION@
%pre
getent group nsclient >/dev/null || groupadd -r nsclient
getent passwd nsclient >/dev/null || \
useradd -r -g nsclient -d /usr/share/nsclient -s /sbin/nologin \
-c "NSClient++ Monitoring Agent User" nsclient
#%prep
#%build
#%install
%post
/sbin/ldconfig
su nsclient -s /bin/bash -c "nscp nrpe make-cert||exit 0"
%postun
/sbin/ldconfig
%clean
%files
%defattr(-,root,root,-)
%if 0%{?el7}
/lib/systemd/system/nsclient.service
%endif
%if 0%{?el6}
/etc/init.d/nsclient
%endif
/usr/bin/check_nrpe
/usr/sbin/nscp
/usr/lib/libnscp*
/usr/lib/libplugin_api*
/usr/lib/libwhere_filter*
/usr/lib/nsclient
%attr(-,nsclient,nsclient) /usr/share/nsclient
%attr(-,nsclient,nsclient) %config(noreplace) /etc/nsclient
%attr(-,nsclient,nsclient) /var/log/nsclient
%changelog
* Sat Sep 27 2014 Michael Medin <michael@medin.name> 0.4.3-1
- Reworked to use cmake/cpack
* Wed Oct 16 2013 Pall Sigurdsson <palli@opensource.is> 0.4.1-3
- Initial Packaging