When building an RPM, --with-kerneldir is passed to ./configure. This adds
the include path /lib/modules/<kversion>/build/include that may break the
build but is not present when building with "make" so useless.
For instance while building ipmi_sel.c with kernel 5.3.7-301.fc31.x86_64 :
/lib/modules/5.3.7-301.fc31.x86_64/build/include/linux/stddef.h:11:2: error:
expected identifier before numeric constant
11 | false = 0,
| ^~~~~
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
Simplified target "rpm" of Makefile, and removed rpmrc and rpmmacros to use
default settings and those from the spec file such as Distribution that has
been changed to "GitHub Build" instead of "Sourceforge Build".
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>
The command "make rpm" was failing for the following reasons :
- setting the build directory to ./rpmbuild/ instead of default
~/rpmbuild/ was ignored.
- errors in the spec file : wrong dates and characters in the
changelog, and unpackaged files under misc/*
- debug package built even if unneeded but failing to build because
of missing requisites.
Using "rpmbuild -tb ipmitool-*.tar.gz" instead of 'make rpm" builds
under ~/rpmbuild/ but also fails because of the last two reasons.
Signed-off-by: Gilles Buloz <gilles.buloz@kontron.com>