wok rev 12306

Add linux64-btrfs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Apr 17 12:15:25 2012 +0200 (2012-04-17)
parents 0a2b4acbf5be
children 6a1c389593ae
files linux-btrfs/receipt linux64-btrfs/receipt
line diff
     1.1 --- a/linux-btrfs/receipt	Tue Apr 17 10:02:09 2012 +0200
     1.2 +++ b/linux-btrfs/receipt	Tue Apr 17 12:15:25 2012 +0200
     1.3 @@ -1,7 +1,8 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="linux-btrfs"
     1.7 -VERSION="2.6.37"
     1.8 +VERSION="3.2.14"
     1.9 +BASEVER="${VERSION:0:3}"
    1.10  CATEGORY="base-system"
    1.11  SHORT_DESC="The Linux kernel btrfs module."
    1.12  MAINTAINER="devel@slitaz.org"
    1.13 @@ -14,7 +15,7 @@
    1.14  genpkg_rules()
    1.15  {
    1.16      local path
    1.17 -    path=lib/modules/$VERSION-slitaz/kernel
    1.18 +    path=lib/modules/$BASEVER-slitaz/kernel
    1.19      mkdir -p $fs/$path $fs/etc
    1.20      export src
    1.21      export _pkg
    1.22 @@ -37,12 +38,12 @@
    1.23  {
    1.24  	grep -qs ^${PACKAGE#*-}$ $1/etc/filesystems || \
    1.25  		echo "${PACKAGE#*-}" >> $1/etc/filesystems
    1.26 -	chroot "$1/" depmod -a $VERSION-slitaz
    1.27 +	chroot "$1/" depmod -a $BASEVER-slitaz
    1.28  }
    1.29  
    1.30  post_remove()
    1.31  {
    1.32  	sed -i "/^${PACKAGE#*-}\$/d" $1/etc/filesystems
    1.33 -	chroot "$1/" depmod -a $VERSION-slitaz
    1.34 +	chroot "$1/" depmod -a $BASEVER-slitaz
    1.35  }
    1.36  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linux64-btrfs/receipt	Tue Apr 17 12:15:25 2012 +0200
     2.3 @@ -0,0 +1,51 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="linux64-btrfs"
     2.7 +VERSION="3.2.14"
     2.8 +BASEVER="${VERSION:0:3}"
     2.9 +CATEGORY="base-system"
    2.10 +SHORT_DESC="The Linux kernel btrfs module."
    2.11 +MAINTAINER="devel@slitaz.org"
    2.12 +DEPENDS="linux64"
    2.13 +WANTED="linux"
    2.14 +PROVIDE="linux-btrfs"
    2.15 +WEB_SITE="http://www.kernel.org/"
    2.16 +CONFIG_FILES="/etc/filesystems"
    2.17 +
    2.18 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.19 +genpkg_rules()
    2.20 +{
    2.21 +    local path
    2.22 +    _pkg=$_pkg/linux64
    2.23 +    path=lib/modules/$BASEVER-slitaz/kernel
    2.24 +    mkdir -p $fs/$path $fs/etc
    2.25 +    export src
    2.26 +    export _pkg
    2.27 +    $wanted_stuff/list_modules.sh fs/${PACKAGE#*-} | while read module; do
    2.28 +    	dir=$path/$(dirname $module)
    2.29 +    	[ -d $fs/$dir ] || mkdir -p $fs/$dir
    2.30 +        cp -a $_pkg/$path/$module $fs/$dir
    2.31 +    done
    2.32 +    touch $fs/etc/filesystems
    2.33 +
    2.34 +    for i in $(cat $wanted_stuff/modules-$VERSION.list); do
    2.35 +        if [ $fs/lib/modules/$VERSION-slitaz/kernel/$i ]; then
    2.36 +	    rm -f $fs/lib/modules/$VERSION-slitaz/kernel/$i
    2.37 +	fi
    2.38 +    done
    2.39 +}
    2.40 +
    2.41 +# Post install/remove commands for Tazpkg.
    2.42 +post_install()
    2.43 +{
    2.44 +	grep -qs ^${PACKAGE#*-}$ $1/etc/filesystems || \
    2.45 +		echo "${PACKAGE#*-}" >> $1/etc/filesystems
    2.46 +	chroot "$1/" depmod -a $BASEVER-slitaz
    2.47 +}
    2.48 +
    2.49 +post_remove()
    2.50 +{
    2.51 +	sed -i "/^${PACKAGE#*-}\$/d" $1/etc/filesystems
    2.52 +	chroot "$1/" depmod -a $BASEVER-slitaz
    2.53 +}
    2.54 +