recipe 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Build recipe for kernel/generic (build-tree).
  2. #
  3. # Copyright (c) 2017-2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. # The version and release numbers are set from 'kernel/generic'
  19. if test -z "$kernel_generic_version" || test -z "$kernel_generic_release"
  20. then
  21. printf '%s\n' "" \
  22. "Variables coming from 'kernel/generic' to set the version and" \
  23. "release numbers of this recipe are empty. This will be ignored." \
  24. "" 1>&2
  25. opt_skiprecipe=opt_skiprecipe; # Tells to Qi to ignore this recipe.
  26. fi
  27. program=linux
  28. version=$kernel_generic_version
  29. release=$kernel_generic_release
  30. # Define a category for the output of the package name
  31. pkgcategory=kernel
  32. # Use a custom package name
  33. pkgname=linux-libre-buildtree
  34. description="
  35. The Linux-libre build tree directory (${arch}).
  36. This is the directory tree as generated for Dragora from the 'kernel/generic'
  37. recipe. Necessary for later installations of modules as well as drivers that
  38. require it.
  39. "
  40. license="GPLv2 only"
  41. build()
  42. {
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. # Move (build) kernel-tree into package
  47. mkdir -p "${destdir}/usr/src/${srcdir}"
  48. mv -f ./* "${destdir}/usr/src/${srcdir}"
  49. # Unset variables exported from "kernel/generic"
  50. unset -v keep_srcdir kernel_generic_version kernel_generic_release
  51. }