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.

48 lines
1.6 KiB

  1. #!/bin/sh
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../loop-aes/patch_o_matic.in
  6. # Copyright (C) 2006 - 2008 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. if aespatch="`match_source_file loop-AES loop-aes`"; then
  17. lver=${aespatch%.tar.*} lver=${lver#*AES-}
  18. echo_status "Including loop-AES ($lver) support."
  19. hook_add prepatch 5 "tar -C /tmp $taropt $base/download/mirror/l/$aespatch"
  20. hook_add prepatch 6 "laes_fix_and_inject_patch $aespatch"
  21. # removed on postinstall to be able to copy it to /usr/src/linux-patches
  22. hook_add postinstall 5 "rm -rf /tmp/${aespatch%.tar*}/"
  23. laes_fix_and_inject_patch() {
  24. local patchfile
  25. if [ "$pkg" = "util-linux" ]; then
  26. patchfile=$( echo /tmp/${1%.tar*}/util-linux-*.diff )
  27. elif [ "$pkg" = "gnupg" ]; then
  28. #new gpg version needs a new patch ...
  29. #patchfile=$( echo /tmp/${1%.tar*}/gnupg-*.diff )
  30. patchfile=$base/package/*/loop-aes/gnupg-*.diff
  31. elif [[ $ver = 2.6* ]]; then
  32. aespf=$( echo /tmp/${1%.tar*}/kernel-2.6*.diff )
  33. elif [[ $ver = 2.4* ]]; then
  34. patchfile=$( echo /tmp/${1%.tar*}/kernel-2.4*.diff )
  35. else
  36. patchfile=
  37. fi
  38. var_append patchfiles ' ' $patchfile
  39. }
  40. else
  41. abort "what? loop-aes patch not found!"
  42. fi