OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../drbd/pkg_linux_post.conf
  5. # Copyright (C) 2008 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; version 2 of the License. A copy of the
  12. # GNU General Public License can be found in the file COPYING.
  13. # --- SDE-COPYRIGHT-NOTE-END ---
  14. # get the drbd version
  15. pkg_drbd_ver=$( pkgdesc ver drbd )
  16. pkg_drbd_kernel_ver="linux-$( echo $ver | cut -d '.' -f1-3 )-drbd-$pkg_drbd_ver"
  17. # get the name of the drbd source tarball
  18. pkg_drbd_srctar=`match_source_file -p drbd-.*tar.* drbd`
  19. echo_status "Including DRBD ($pkg_drbd_ver) support"
  20. # create a temporary directory where we unpack drbd sources
  21. pkg_drbd_tempdir=`mktemp -d`
  22. tar $taropt $pkg_drbd_srctar -C $pkg_drbd_tempdir
  23. pkg_drbd_prepatch() {
  24. eval make -C "$pkg_drbd_tempdir/drbd-$pkg_drbd_ver KDIR=$PWD kernel-patch"
  25. # we create our own patch file from the original one
  26. cat "$pkg_drbd_tempdir/drbd-$pkg_drbd_ver/patch-$pkg_drbd_kernel_ver" > "$pkg_drbd_tempdir/$pkg_drbd_kernel_ver.patch"
  27. var_append patchfiles ' ' "$pkg_drbd_tempdir/$pkg_drbd_kernel_ver.patch"
  28. }
  29. hook_add prepatch 5 'pkg_drbd_prepatch'