ソースを参照

Fixed some rpmbuild errors

Fix for issue #94

Thanks to bvandi for the patch I modified slightly
John C. Frickson 9 年 前
コミット
a9374448d4
3 ファイル変更6 行追加2 行削除
  1. 1 0
      Changelog
  2. 3 1
      Makefile.in
  3. 2 1
      nrpe.spec.in

+ 1 - 0
Changelog

@@ -37,6 +37,7 @@ FIXES
 - xinetd.d parameter causes many messages in log file (John Frickson)
 - Fixes for openssl 1.1.x (Stephen Smoogen / John Frickson)
 - PATH and other environment variables not set with numeric nrpe_user (John Frickson)
+- rpmbuild -ta nrpe-3.0.1.tar.gz failed File not found: /etc/init.d/nrpe (bvandi / John Frickson)
 
 
 3.0.1 - 2016-09-08

+ 3 - 1
Makefile.in

@@ -126,7 +126,9 @@ install-init:
 			launchctl load $(INIT_DIR)/$(INIT_FILE); \
 		else\
 			if test -f /sbin/chkconfig ; then \
-			    /sbin/chkconfig nrpe on;\
+			    case "$(DESTDIR)" in */rpmbuild/*) break;; \
+			    *)/sbin/chkconfig nrpe on;; \
+			    esac; \
 			else\
 				echo "Make sure to enable the nrpe daemon";\
 			fi;\

+ 2 - 1
nrpe.spec.in

@@ -9,6 +9,7 @@
 %endif
 %if %{islinux}
 	%define _init_dir @initdir@
+	%define _init_tyhpe @init_type@
 	%define _exec_prefix %{_prefix}/sbin
 	%define _bindir %{_prefix}/sbin
 	%define _sbindir %{_prefix}/lib/nagios/cgi
@@ -127,7 +128,7 @@ fi
 export PATH=$PATH:/usr/sbin
 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \
 MAKE=%{_make} ./configure \
-	--with-init-dir=/etc/init.d \
+	--with-init-type=%{_init_type} \
 	--with-nrpe-port=%{nsport} \
 	--with-nrpe-user=%{nsusr} \
 	--with-nrpe-group=%{nsgrp} \