-
Notifications
You must be signed in to change notification settings - Fork 8
/
ms-agent.spec
49 lines (35 loc) · 1.2 KB
/
ms-agent.spec
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
Name: ms-agent
Version: %{version}
Release: 1%{?alphatag:.%{alphatag}}%{?dist}
Summary: A tools send zabbix alerts to ZbxTable
Group: Applications/Internet
License: Apache-2.0
URL: https://zbxtable.cactifans.com
Source0: ms-agent-%{version}%{?alphatag:%{alphatag}}.tar.gz
Buildroot: %{_tmppath}/ms-agent-%{version}-%{release}-root-%(%{__id_u} -n)
%description
A tools send zabbix alerts to ZbxTable
%global debug_package %{nil}
%prep
%setup0 -q -n ms-agent-%{version}%{?alphatag:%{alphatag}}
%build
%install
rm -rf $RPM_BUILD_ROOT
# install necessary directories
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ms-agent
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/zabbix/alertscripts
# install binaries and conf
install -m 0755 -p ms-agent $RPM_BUILD_ROOT%{_prefix}/lib/zabbix/alertscripts/
install -m 0755 -p app.ini $RPM_BUILD_ROOT%{_sysconfdir}/ms-agent/
exit 0
%clean
rm -rf $RPM_BUILD_ROOT
%define __debug_install_post \
%{_rpmconfigdir}/find-debuginfo.sh %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
%{nil}
%files
%defattr(755,root,root,755)
%dir %{_prefix}/lib/zabbix/alertscripts/
%dir %{_sysconfdir}/ms-agent/
%{_prefix}/lib/zabbix/alertscripts/ms-agent
%{_sysconfdir}/ms-agent/app.ini