-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnagiosmobile_git.spec
61 lines (48 loc) · 1.6 KB
/
nagiosmobile_git.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
50
51
52
53
54
55
56
57
58
59
60
61
%define version 1.03
%define relnum 9
%define NVdir %{name}-%{version}
Name: nagiosmobile
Version: %{version}
Release: %{relnum}%{?dist}
Summary: Nagios for mobile devices
License: GNU 2.0
URL: https://github.com/celane/nagiosmobile
#URL: http://www.nagios.com/products/nagios-mobile
BuildRequires: perl
BuildRequires: git
Requires: php >= 8.0
Requires: nagios
Requires: httpd
%description
Web interface from mobile devices to Nagios
%prep
### build from git ###
rm -rf %{NVdir}
git clone %{url}.git %{NVdir}
%build
%install
cd %{NVdir}
if [ "$RPM_BUILD_ROOT" != "/" ]; then
rm -rf $RPM_BUILD_ROOT
fi
install -d $RPM_BUILD_ROOT%{_datadir}/nagios/nagiosmobile
cp -r class includes jquery.mobile-1.0 js \
$RPM_BUILD_ROOT%{_datadir}/nagios/nagiosmobile/
install *.php *.png *.gif $RPM_BUILD_ROOT%{_datadir}/nagios/nagiosmobile/
install -d $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install nagiosmobile_apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/
install -d $RPM_BUILD_ROOT%{_sysconfdir}/nagios
install update_nagiosmobile_config.pl $RPM_BUILD_ROOT%{_sysconfdir}/nagios/
install -d $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
install LICENSE README CHANGES TODO.txt $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
%files
%doc LICENSE README CHANGES TODO.txt
%{_datadir}/nagios/nagiosmobile/*
%{_sysconfdir}/httpd/conf.d/*
%{_sysconfdir}/nagios/update_nagiosmobile_config.pl
%post
cd %{_sysconfdir}/nagios
perl update_nagiosmobile_config.pl %{_datadir}/nagios/nagiosmobile/include.inc.php
%changelog
* Wed Aug 10 2022 [email protected]
-