Nagios (rpmbuild) Enterprise Linux

error(s):

1) /var/tmp/rpm-tmp.4HW54O: line 38: cd: nagios-3.5.0: No such file or directory
2) configure: error: unrecognized option: --datarootdir=/usr/share/nagios

Nagios Tracker – 0000468: redhat – I’m unable to use rpmbuild to build nagios-3.5.0 RPM @RHEL6 – Mantis

workaround:

tar -zxf nagios-3.5.0.tar.gz
rm nagios-3.5.0.tar.gz
mv nagios nagios-3.5.0
sed -i 's/datarootdir/datadir/' nagios-3.5.0/nagios.spec
tar -czf nagios-3.5.0.tar.gz nagios-3.5.0
rpmbuild -tb nagios-3.5.0.tar.gz
ls rpmbuild/RPMS/*/nagios-3.5.0*rpm