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. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../squashfs-tools/pkg_linux_pre.conf
  5. # Copyright (C) 2006 - 2009 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. hook_add prepatch 5 'squashfs_patch'
  15. squashfs_patch() {
  16. local sqfs_ver=$( pkgdesc ver squashfs-tools )
  17. local lx_ver= sqfs_patch= sqfs_patch_base=
  18. local ver3=$(echo "$ver" | cut -d. -f1-3)
  19. tar -v $taropt "$(match_source_file -p squashfs squashfs-tools)" -C "$builddir"
  20. sqfs_patch_base="$builddir/squashfs${sqfs_ver}/kernel-patches/linux-"
  21. # known mappings
  22. case "$ver3" in
  23. 2.6.27) lx_ver="2.6.27-rc4" ;;
  24. *) for lx_ver in $ver $ver3 ''; do
  25. [ ! -d "${sqfs_patch_base}${lx_ver}/" ] || break
  26. done
  27. if [ -z "$lx_ver" ]; then
  28. lx_ver=$(ls -1d "${sqfs_patch_base}$ver3"[-.]* |
  29. sed -e "s,^${sqfs_patch_base},," |
  30. sort -n | tail -n 1)
  31. fi
  32. ;;
  33. esac
  34. if [ -z "$lx_ver" ]; then
  35. echo_warning "SquashFS $sqfs_ver patch for $ver not found, skipping."
  36. else
  37. echo_status "SquashFS $sqfs_ver: using patch for Linux $lx_ver."
  38. sqfs_patch="$builddir/squashfs-${sqfs_ver}-${lx_ver}.patch"
  39. cp -v $(ls -1d "${sqfs_patch_base}$lx_ver"/squashfs*-patch) $sqfs_patch
  40. var_append patchfiles ' ' "$sqfs_patch"
  41. fi
  42. }