wok-current diff squashfs/receipt @ rev 1243

Up: bogofilter 1.1.6 to 1.1.7
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Tue Aug 12 00:00:05 2008 +0200 (2008-08-12)
parents 998d2b306f24
children c343c644ab92
line diff
     1.1 --- a/squashfs/receipt	Wed Apr 09 17:18:31 2008 +0000
     1.2 +++ b/squashfs/receipt	Tue Aug 12 00:00:05 2008 +0200
     1.3 @@ -3,12 +3,12 @@
     1.4  PACKAGE="squashfs"
     1.5  VERSION="3.3"
     1.6  CATEGORY="base-system"
     1.7 -SHORT_DESC="Linux squashfs module and userland tools."
     1.8 +SHORT_DESC="Linux squashfs userland tools."
     1.9  MAINTAINER="pascal.bellard@slitaz.org"
    1.10  WEB_SITE="http://$PACKAGE.sourceforge.net/"
    1.11  TARBALL="squashfs$VERSION.tgz"
    1.12  WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
    1.13 -DEPENDS="zlib"
    1.14 +DEPENDS="zlib squashfs-module"
    1.15  BUILD_DEPENDS="zlib-dev patch"
    1.16  
    1.17  # Rules to configure and make the package.
    1.18 @@ -17,6 +17,7 @@
    1.19  	local kver
    1.20  	local patch_dir
    1.21  
    1.22 +	ln -s . $src
    1.23  	# get kernel version
    1.24  	if [ ! -d ../linux/taz ]; then
    1.25  		tazwok cook linux
    1.26 @@ -26,7 +27,13 @@
    1.27  
    1.28  	# Select patch according to kernel version
    1.29  	patch_dir=${PACKAGE}${VERSION}/kernel-patches/linux-${kver%.*}
    1.30 -	if [ -f ${PACKAGE}${VERSION}/kernel-patches/linux-$kver ]; then
    1.31 +	i=${patch_dir##*.}
    1.32 +	while [ ! -d ${patch_dir%.*}.$i ]; do
    1.33 +		[ "$i" = "0" ] && break
    1.34 +		i=$(($i - 1))
    1.35 +	done
    1.36 +	patch_dir=${patch_dir%.*}.$i
    1.37 +	if [ -d ${PACKAGE}${VERSION}/kernel-patches/linux-$kver ]; then
    1.38  		patch_dir=${PACKAGE}${VERSION}/kernel-patches/linux-$kver
    1.39  	fi
    1.40  	if [ ! -d $patch_dir ]; then
    1.41 @@ -36,7 +43,7 @@
    1.42  	[ -d _kernel ] && rm -rf _kernel
    1.43  	mkdir _kernel
    1.44  	cd _kernel
    1.45 -	ln -s ../../linux/linux-$kver* src
    1.46 +	ln -fs ../../linux/linux-$kver* src
    1.47  
    1.48  	# Copy files to be patched in local aera
    1.49  	# Do not alter kernel sources !!
    1.50 @@ -46,7 +53,16 @@
    1.51  	done
    1.52  
    1.53  	# Apply squashfs patches in local aera
    1.54 -	patch -p1 < ../$patch_dir/${PACKAGE}${VERSION}-patch
    1.55 +	#patch -p1 < ../$patch_dir/${PACKAGE}${VERSION}-patch
    1.56 +	echo "Apply $patch_dir..."
    1.57 +	awk 'BEGIN { keep=1} /^---/ { keep=(index($0,"/fs/squashfs/") || index($0,"/include/linux/"))} { if (keep) print }' < \
    1.58 +		../$patch_dir/${PACKAGE}${VERSION}-patch | patch -p1
    1.59 +
    1.60 +	extra_patch=stuff/squashfs-patch-${kver%.*}
    1.61 +	if [ -e ../$extra_patch ]; then
    1.62 +		echo "Apply $extra_patch..."
    1.63 +		patch -p1 < ../$extra_patch || return 1
    1.64 +	fi
    1.65  
    1.66  	# Move every files in fs/squashfs directory
    1.67  	mv include/linux/* fs/squashfs
    1.68 @@ -56,6 +72,10 @@
    1.69  		sed -e 's/CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE/3/g' > $i < $i.$$
    1.70  	done
    1.71  	
    1.72 +	# Apply lzma patches
    1.73 +#	echo "Apply stuff/lzma.u.."
    1.74 +#	patch -p0 < ../stuff/lzma.u
    1.75 +	
    1.76  	# Build kernel module
    1.77  	make -C src/. SUBDIRS=$(pwd)/fs/squashfs/ CONFIG_SQUASHFS=m modules
    1.78  	cd ..
    1.79 @@ -76,13 +96,13 @@
    1.80  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.81  genpkg_rules()
    1.82  {
    1.83 -	cp -a _pkg/* $fs
    1.84 +	cp -a _pkg/usr _pkg/sbin $fs
    1.85  }
    1.86  
    1.87  # Post install/remove commands for Tazpkg.
    1.88  post_install()
    1.89  {
    1.90 -	depmod -a -b /$1
    1.91 +	depmod -a -b "$1/"
    1.92  }
    1.93  
    1.94  post_remove()