|
|
@ -2,7 +2,7 @@ |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|
|
|
# |
|
|
|
# |
|
|
|
# Filename: package/.../squashfs-tools/pkg_linux_pre.conf |
|
|
|
# Filename: package/.../squashfs-tools/pkg_linux_pre.conf |
|
|
|
# Copyright (C) 2006 - 2007 The OpenSDE Project |
|
|
|
# Copyright (C) 2006 - 2009 The OpenSDE Project |
|
|
|
# |
|
|
|
# |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# More information can be found in the files COPYING and README. |
|
|
|
# |
|
|
|
# |
|
|
@ -12,32 +12,37 @@ |
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
# GNU General Public License can be found in the file COPYING. |
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
# --- SDE-COPYRIGHT-NOTE-END --- |
|
|
|
|
|
|
|
|
|
|
|
sqfs_ver=$( pkgdesc ver squashfs-tools ) |
|
|
|
|
|
|
|
echo_status "Including SquashFS (${sqfs_ver}) support." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hook_add prepatch 5 'squashfs_patch' |
|
|
|
hook_add prepatch 5 'squashfs_patch' |
|
|
|
squashfs_patch() { |
|
|
|
squashfs_patch() { |
|
|
|
|
|
|
|
local sqfs_ver=$( pkgdesc ver squashfs-tools ) |
|
|
|
local lx_ver= sqfs_patch= sqfs_patch_base= |
|
|
|
local lx_ver= sqfs_patch= sqfs_patch_base= |
|
|
|
local x= |
|
|
|
local ver3=$(echo "$ver" | cut -d. -f1-3) |
|
|
|
|
|
|
|
|
|
|
|
tar -v $taropt $( match_source_file -p squashfs squashfs-tools ) -C $builddir |
|
|
|
tar -v $taropt "$(match_source_file -p squashfs squashfs-tools)" -C "$builddir" |
|
|
|
sqfs_patch_base=$builddir/squashfs${sqfs_ver}/kernel-patches |
|
|
|
sqfs_patch_base="$builddir/squashfs${sqfs_ver}/kernel-patches/linux-" |
|
|
|
# full version |
|
|
|
|
|
|
|
lx_ver="$ver" |
|
|
|
# known mappings |
|
|
|
if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then |
|
|
|
case "$ver3" in |
|
|
|
# just three elements |
|
|
|
2.6.27) lx_ver="2.6.27-rc4" ;; |
|
|
|
lx_ver=$( echo "$lx_ver" | cut -d. -f1-3 ) |
|
|
|
*) for lx_ver in $ver $ver3 ''; do |
|
|
|
if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then |
|
|
|
[ ! -d "${sqfs_patch_base}${lx_ver}/" ] || break |
|
|
|
# ok, the last for this tree |
|
|
|
done |
|
|
|
lx_ver=$( echo "$lx_ver" | cut -d. -f1-2 ) |
|
|
|
if [ -z "$lx_ver" ]; then |
|
|
|
sqfs_patch=$sqfs_patch_base/linux-${lx_ver}. |
|
|
|
lx_ver=$(ls -1d "${sqfs_patch_base}$ver3"[-.]* | |
|
|
|
lx_ver=$lx_ver.$( ls -1d ${sqfs_patch}* | sed -e "s,^${sqfs_patch},," | sort -n | tail -n 1 ) |
|
|
|
sed -e "s,^${sqfs_patch_base},," | |
|
|
|
echo_warning "SquashFS patch for $ver was not found, trying $lx_ver instead." |
|
|
|
sort -n | tail -n 1) |
|
|
|
fi |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
|
|
sqfs_patch=$builddir/squashfs-${sqfs_ver}-${lx_ver}-patch |
|
|
|
if [ -z "$lx_ver" ]; then |
|
|
|
cp -v $( ls -1d $sqfs_patch_base/linux-$lx_ver/squashfs*-patch ) $sqfs_patch |
|
|
|
echo_warning "SquashFS $sqfs_ver patch for $ver not found, skipping." |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo_status "SquashFS $sqfs_ver: using patch for Linux $lx_ver." |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sqfs_patch="$builddir/squashfs-${sqfs_ver}-${lx_ver}.patch" |
|
|
|
|
|
|
|
cp -v $(ls -1d "${sqfs_patch_base}$lx_ver"/squashfs*-patch) $sqfs_patch |
|
|
|
var_append patchfiles ' ' "$sqfs_patch" |
|
|
|
var_append patchfiles ' ' "$sqfs_patch" |
|
|
|
|
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|