Packaging improvements for RHEL and SLES

- Properly honor --prefix in build system and rpm spec file.
- Add '--define require_kdir' to spec file to support building
  rpms against kernel sources installed in non-default locations.
- Add '--define require_kobj' to spec file to support building
  rpms against kernel object installed in non-default locations.
- Stop suppressing errors in autogen.sh script.
- Improved logic to detect missing kernel objects when they are
  not located with the source.  This is the common case for SLES
  as well as in-tree chaos kernel builds and is done to simply
  support for multiple arches.
- Moved spl-devel build products to /usr/src/spl-<version>, a
  spl symlink is created to reference the last installed version.
This commit is contained in:
Brian Behlendorf
2009-06-16 10:44:59 -07:00
parent e554dffa60
commit 39a3d2a421
9 changed files with 69 additions and 29 deletions
+9 -6
View File
@@ -2,7 +2,7 @@ AC_DEFUN([SPL_AC_KERNEL], [
AC_ARG_WITH([linux],
AS_HELP_STRING([--with-linux=PATH],
[Path to kernel source]),
[kernelsrc="$withval"; kernelbuild="$withval"])
[kernelsrc="$withval"])
AC_ARG_WITH([linux-obj],
AS_HELP_STRING([--with-linux-obj=PATH],
@@ -16,7 +16,6 @@ AC_DEFUN([SPL_AC_KERNEL], [
if test -e ${sourcelink}; then
kernelsrc=`readlink -f ${sourcelink}`
kernelbuild=
else
AC_MSG_RESULT([Not found])
AC_MSG_ERROR([
@@ -31,10 +30,14 @@ AC_DEFUN([SPL_AC_KERNEL], [
AC_MSG_RESULT([$kernelsrc])
AC_MSG_CHECKING([kernel build directory])
if test -z "$kernelbuild" && test -d ${kernelsrc}-obj; then
kernelbuild=${kernelsrc}-obj/`arch`/`arch`
else
kernelbuild=${kernelsrc}
if test -z "$kernelbuild"; then
if test -d ${kernelsrc}-obj; then
kernelbuild=${kernelsrc}-obj/`arch`/`arch`
elif test -d `dirname ${kernelsrc}`/build-`arch`; then
kernelbuild=`dirname ${kernelsrc}`/build-`arch`
else
kernelbuild=${kernelsrc}
fi
fi
AC_MSG_RESULT([$kernelbuild])