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.

43 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 - 2007 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. sqfs_ver=$( pkgdesc ver squashfs-tools )
  15. echo_status "Including SquashFS (${sqfs_ver}) support."
  16. hook_add prepatch 5 'squashfs_patch'
  17. squashfs_patch() {
  18. local lx_ver= sqfs_patch= sqfs_patch_base=
  19. local x=
  20. tar -v $taropt $( match_source_file -p squashfs squashfs-tools ) -C $builddir
  21. sqfs_patch_base=$builddir/squashfs${sqfs_ver}/kernel-patches
  22. # full version
  23. lx_ver="$ver"
  24. if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then
  25. # just three elements
  26. lx_ver=$( echo "$lx_ver" | cut -d. -f1-3 )
  27. if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then
  28. # ok, the last for this tree
  29. lx_ver=$( echo "$lx_ver" | cut -d. -f1-2 )
  30. sqfs_patch=$sqfs_patch_base/linux-${lx_ver}.
  31. lx_ver=$lx_ver.$( ls -1d ${sqfs_patch}* | sed -e "s,^${sqfs_patch},," | sort -n | tail -n 1 )
  32. echo_warning "SquashFS patch for $ver was not found, trying $lx_ver instead."
  33. fi
  34. fi
  35. sqfs_patch=$builddir/squashfs-${sqfs_ver}-${lx_ver}-patch
  36. cp -v $( ls -1d $sqfs_patch_base/linux-$lx_ver/squashfs*-patch ) $sqfs_patch
  37. var_append patchfiles ' ' "$sqfs_patch"
  38. }