wok-undigest rev 682

add linux64
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Apr 12 18:11:31 2012 +0200 (2012-04-12)
parents a4a2f5433520
children 7005e0e1bf22
files linux64-sound/receipt linux64/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/linux64-sound/receipt	Thu Apr 12 18:11:31 2012 +0200
     1.3 @@ -0,0 +1,51 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="linux64-sound"
     1.7 +VERSION="3.2.14"
     1.8 +BASEVER="${VERSION:0:3}"
     1.9 +CATEGORY="base-system"
    1.10 +SHORT_DESC="The Linux kernel sound modules."
    1.11 +MAINTAINER="devel@slitaz.org"
    1.12 +DEPENDS="linux64"
    1.13 +WANTED="linux"
    1.14 +PROVIDE="linux-sound"
    1.15 +WEB_SITE="http://www.kernel.org/"
    1.16 +
    1.17 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.18 +genpkg_rules()
    1.19 +{
    1.20 +    local path
    1.21 +    _pkg=$_pkg/linux64
    1.22 +    path=lib/modules/$BASEVER-slitaz/kernel
    1.23 +    mkdir -p $fs/$path
    1.24 +    export src
    1.25 +    export _pkg
    1.26 +    $wanted_stuff/list_modules.sh sound | while read module; do
    1.27 +    	dir=$path/$(dirname $module)
    1.28 +    	[ -d $fs/$dir ] || mkdir -p $fs/$dir
    1.29 +        cp -a $_pkg/$path/$module $fs/$dir
    1.30 +    done
    1.31 +	mkdir $fs/lib/firmware
    1.32 +	for i in ess korg sun yamaha; do
    1.33 +		cp -a $_pkg/lib/firmware/$i $fs/lib/firmware
    1.34 +	done
    1.35 +
    1.36 +    for i in $(cat $wanted_stuff/modules.list); do
    1.37 +        if [ -f $fs/$path/$i ]; then
    1.38 +	    rm -f $fs/$path/$i
    1.39 +	fi
    1.40 +    done
    1.41 +
    1.42 +}
    1.43 +
    1.44 +# Post install/remove commands for Tazpkg.
    1.45 +post_install()
    1.46 +{
    1.47 +	chroot "$1/" depmod -a $BASEVER-slitaz
    1.48 +}
    1.49 +
    1.50 +post_remove()
    1.51 +{
    1.52 +	chroot "$1/" depmod -a $BASEVER-slitaz
    1.53 +}
    1.54 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/linux64/receipt	Thu Apr 12 18:11:31 2012 +0200
     2.3 @@ -0,0 +1,85 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="linux64"
     2.7 +VERSION="3.2.14"
     2.8 +KBASEVER="${VERSION:0:3}"
     2.9 +CATEGORY="base-system"
    2.10 +SHORT_DESC="The Linux 64 bits kernel and modules."
    2.11 +MAINTAINER="devel@slitaz.org"
    2.12 +WEB_SITE="http://www.kernel.org/"
    2.13 +WANTED="linux"
    2.14 +PROVIDE="linux"
    2.15 +CONFIG_FILES="/lib/modules/$KBASEVER-slitaz/modules.dep"
    2.16 +
    2.17 +DEPENDS="depmod"
    2.18 +
    2.19 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.20 +genpkg_rules()
    2.21 +{
    2.22 +    local path
    2.23 +    _pkg=$_pkg/linux64
    2.24 +    cp -a $_pkg/boot $fs
    2.25 +    # Compress all modules.
    2.26 +    #$wanted_stuff/gztazmod.sh $_pkg/lib/modules/$KBASEVER-slitaz
    2.27 +    path=$fs/lib/modules/$KBASEVER-slitaz/kernel
    2.28 +    mkdir -p $path
    2.29 +    cp -a $_pkg/lib/modules/$KBASEVER-slitaz/mo* \
    2.30 +		$fs/lib/modules/$KBASEVER-slitaz
    2.31 +    # Get the base modules
    2.32 +    export src
    2.33 +    export _pkg
    2.34 +    mkdir -p $WOK/$PACKAGE/source/tmp
    2.35 +    $wanted_stuff/list_modules.sh \
    2.36 +	$(cat $wanted_stuff/modules.list) > $WOK/$PACKAGE/source/tmp/modules.list
    2.37 +    while read module; do
    2.38 +    	dir=$(dirname $module)
    2.39 +    	[ -d $path/$dir ] || mkdir -p $path/$dir
    2.40 +        cp -a $_pkg/lib/modules/$KBASEVER-slitaz/kernel/$module $path/$dir
    2.41 +    done < $WOK/$PACKAGE/source/tmp/modules.list
    2.42 +    # Remove unresolved links
    2.43 +    rm -f $fs/lib/modules/$KBASEVER-slitaz/build
    2.44 +    rm -f $fs/lib/modules/$KBASEVER-slitaz/source
    2.45 +    # Cook all packages with a kernel module
    2.46 +    for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
    2.47 +    do
    2.48 +    	echo tazwok cook ${i%/receipt}
    2.49 +    done
    2.50 +    # Fixed modules.dep to use right path
    2.51 +    # saves 100kb of space too
    2.52 +    sed -i "s|$_pkg||g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
    2.53 +    sed -i "s|99.98.$KBASEVER-slitaz|$KBASEVER-slitaz|g" $fs/lib/modules/$KBASEVER-slitaz/modules.dep
    2.54 +    # Check and echo any module in kernel .config that's not added to 
    2.55 +    # one of linux-* pkgs
    2.56 +	$wanted_stuff/check_modules.sh 
    2.57 +}
    2.58 +
    2.59 +# Pre and post install commands for Tazpkg.
    2.60 +post_install()
    2.61 +{
    2.62 +    echo "Processing post-install commands..."
    2.63 +    chroot "$1/" depmod -a $KBASEVER-slitaz
    2.64 +    # GRUB stuff.
    2.65 +    if [ -f "$1/boot/grub/menu.lst" ]; then
    2.66 +    	root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
    2.67 +		grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
    2.68 +		# Add new kernel entry in case of upgrade for installed system.
    2.69 +		if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
    2.70 +    		cat >> $1/boot/grub/menu.lst << EOT
    2.71 +
    2.72 +title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
    2.73 +$grub_dev
    2.74 +kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
    2.75 +EOT
    2.76 +		fi
    2.77 +		# Display information message.
    2.78 +    	cat <<EOT
    2.79 +----
    2.80 +GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
    2.81 +
    2.82 +title  SliTaz GNU/Linux (Kernel $VERSION-slitaz)
    2.83 +$grub_dev
    2.84 +kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
    2.85 +----
    2.86 +EOT
    2.87 +	fi
    2.88 +}