|
|
|
# --- SDE-COPYRIGHT-NOTE-BEGIN ---
|
|
|
|
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
|
|
|
|
#
|
|
|
|
# Filename: package/.../squashfs-tools/pkg_linux_pre.conf
|
|
|
|
# Copyright (C) 2006 - 2007 The OpenSDE Project
|
|
|
|
#
|
|
|
|
# More information can be found in the files COPYING and README.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License. A copy of the
|
|
|
|
# GNU General Public License can be found in the file COPYING.
|
|
|
|
# --- SDE-COPYRIGHT-NOTE-END ---
|
|
|
|
|
|
|
|
sqfs_ver=$( pkgdesc ver squashfs-tools )
|
|
|
|
echo_status "Including SquashFS (${sqfs_ver}) support."
|
|
|
|
|
|
|
|
hook_add prepatch 5 'squashfs_patch'
|
|
|
|
squashfs_patch() {
|
|
|
|
local lx_ver= sqfs_patch= sqfs_patch_base=
|
|
|
|
local x=
|
|
|
|
|
|
|
|
tar -v $taropt $( match_source_file -p squashfs squashfs-tools ) -C $builddir
|
|
|
|
sqfs_patch_base=$builddir/squashfs${sqfs_ver}/kernel-patches
|
|
|
|
# full version
|
|
|
|
lx_ver="$ver"
|
|
|
|
if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then
|
|
|
|
# just three elements
|
|
|
|
lx_ver=$( echo "$lx_ver" | cut -d. -f1-3 )
|
|
|
|
if [ ! -d $sqfs_patch_base/linux-${lx_ver}/ ]; then
|
|
|
|
# ok, the last for this tree
|
|
|
|
lx_ver=$( echo "$lx_ver" | cut -d. -f1-2 )
|
|
|
|
sqfs_patch=$sqfs_patch_base/linux-${lx_ver}.
|
|
|
|
lx_ver=$lx_ver.$( ls -1d ${sqfs_patch}* | sed -e "s,^${sqfs_patch},," | sort -n | tail -n 1 )
|
|
|
|
echo_warning "SquashFS patch for $ver was not found, trying $lx_ver instead."
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
sqfs_patch=$builddir/squashfs-${sqfs_ver}-${lx_ver}-patch
|
|
|
|
cp -v $( ls -1d $sqfs_patch_base/linux-$lx_ver/squashfs*-patch ) $sqfs_patch
|
|
|
|
var_append patchfiles ' ' "$sqfs_patch"
|
|
|
|
}
|
|
|
|
|