-
-
Notifications
You must be signed in to change notification settings - Fork 94
/
nscp.spec.in
81 lines (68 loc) · 2.15 KB
/
nscp.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# -*- 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