mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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:
+9
-6
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user