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.

49 lines
1.6 KiB

# --- 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 - 2009 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 ---
hook_add prepatch 5 'squashfs_patch'
squashfs_patch() {
local sqfs_ver=$( pkgdesc ver squashfs-tools )
local lx_ver= sqfs_patch= sqfs_patch_base=
local ver3=$(echo "$ver" | cut -d. -f1-3)
tar -v $taropt "$(match_source_file -p squashfs squashfs-tools)" -C "$builddir"
sqfs_patch_base="$builddir/squashfs${sqfs_ver}/kernel-patches/linux-"
# known mappings
case "$ver3" in
2.6.27) lx_ver="2.6.27-rc4" ;;
*) for lx_ver in $ver $ver3 ''; do
[ ! -d "${sqfs_patch_base}${lx_ver}/" ] || break
done
if [ -z "$lx_ver" ]; then
lx_ver=$(ls -1d "${sqfs_patch_base}$ver3"[-.]* |
sed -e "s,^${sqfs_patch_base},," |
sort -n | tail -n 1)
fi
;;
esac
if [ -z "$lx_ver" ]; then
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"
fi
}