wok-current diff squashfs/receipt @ rev 240
Shfs & squashfs : no WANTED with WGET_URL
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Feb 18 00:24:44 2008 +0100 (2008-02-18) |
parents | 6f0f8c0fbedc |
children | d1ecaea3e7cf |
line diff
1.1 --- a/squashfs/receipt Sun Feb 17 15:30:24 2008 +0100 1.2 +++ b/squashfs/receipt Mon Feb 18 00:24:44 2008 +0100 1.3 @@ -1,7 +1,6 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="squashfs" 1.7 -WANTED="linux" 1.8 VERSION="3.3" 1.9 CATEGORY="base-system" 1.10 SHORT_DESC="Linux squashfs module and userland tools." 1.11 @@ -10,7 +9,7 @@ 1.12 TARBALL="squashfs$VERSION.tgz" 1.13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.14 DEPENDS="zlib" 1.15 -BUILD_DEPENDS="zlib-dev perl" 1.16 +BUILD_DEPENDS="zlib-dev" 1.17 1.18 # Rules to configure and make the package. 1.19 compile_rules() 1.20 @@ -25,9 +24,12 @@ 1.21 # Select patch according to kernel version 1.22 patch_dir=${PACKAGE}${VERSION}/kernel-patches/linux-${kver%.*} 1.23 if [ -f ${PACKAGE}${VERSION}/kernel-patches/linux-$kver ]; then 1.24 - patch_dir=${PACKAGE}${VERSION}/kernel-patches/linux-$kver 1.25 + patch_dir=${PACKAGE}${VERSION}/kernel-patches/linux-$kver 1.26 fi 1.27 - [ -d $patch_dir ] || return 1 1.28 + if [ ! -d $patch_dir ]; then 1.29 + echo "No squashfs patchset for kernel $ker. Abort." 1.30 + return 1 1.31 + fi 1.32 [ -d _kernel ] && rm -rf _kernel 1.33 mkdir _kernel 1.34 cd _kernel 1.35 @@ -44,13 +46,15 @@ 1.36 patch -Np1 < ../$patch_dir/${PACKAGE}${VERSION}-patch 1.37 1.38 # Move every files in fs/squashfs directory 1.39 - find include -type f -exec cp {} fs/squashfs \; 1.40 - 1.41 - # Hardcoded options 1.42 - perl -pi -e 's/CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE/3/g' fs/squashfs/* 1.43 + mv include/linux/* fs/squashfs 1.44 + ln -s . fs/squashfs/linux 1.45 + for i in fs/squashfs/*.c fs/squashfs/*.h ; do 1.46 + sed -e 's/#include <\(linux\/squashfs.*\)>.*/#include "\1"/g' > $i.$$ < $i 1.47 + sed -e 's/CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE/3/g' > $i < $i.$$ 1.48 + done 1.49 1.50 # Build kernel module 1.51 - make -C src/. SUBDIRS=$(pwd)/fs/squashfs/ modules 1.52 + make -C src/. SUBDIRS=$(pwd)/fs/squashfs/ CONFIG_SQUASHFS=m modules 1.53 cd .. 1.54 [ -d _pkg ] && rm -rf _pkg 1.55 mkdir -p _pkg/lib/modules/$kver-slitaz/kernel/fs/squashfs _pkg/usr/sbin