wok-tiny rev 98

remove kernel-modular
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Oct 31 12:49:16 2015 +0100 (2015-10-31)
parents bb00d1e3b0f7
children a10bae21f602
files kernel-modular/receipt
line diff
     1.1 --- a/kernel-modular/receipt	Fri Oct 09 10:21:00 2015 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,172 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="kernel-modular"
     1.7 -SOURCE="linux"
     1.8 -VERSION="2.6.37"
     1.9 -CATEGORY="base-system"
    1.10 -SHORT_DESC="The Linux kernel and modules"
    1.11 -DEPENDS="depmod"
    1.12 -BUILD_DEPENDS="slitaz-toolchain perl git lzma"
    1.13 -[ -n "$TARGET" ] &&
    1.14 -BUILD_DEPENDS="$BUILD_DEPENDS uclibc-cross-compiler-$TARGET" ||
    1.15 -TARGET="i486"
    1.16 -MAINTAINER="devel@slitaz.org"
    1.17 -LICENSE="GPL2"
    1.18 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.19 -WEB_SITE="http://www.kernel.org/"
    1.20 -WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL"
    1.21 -CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
    1.22 -
    1.23 -# Rules to configure and make the package.
    1.24 -compile_rules()
    1.25 -{
    1.26 -	if [ ! -s $WOK/busybox/busybox*/rootfs.cpio ]; then
    1.27 -		tazwok cook busybox
    1.28 -	fi
    1.29 -	cp $WOK/busybox/busybox*/rootfs.cpio $src
    1.30 -	cp $WOK/busybox/busybox*/.config $src/config-busybox
    1.31 -
    1.32 -	# this is code to help update the kernel version faster
    1.33 -	#for i in $(grep -l 'WANTED="linux"' $WOK/*/receipt)
    1.34 -	#do
    1.35 -	#	sed -i 's|VERSION="OLDVERSION"|VERSION="NEWVERSION"|g' $i
    1.36 -	#done
    1.37 -	local _AUFSVER=`grep  ^VERSION= $WOK/aufs/receipt | cut -d "=" -f2 | sed -e 's/"//g'`
    1.38 -	local AUFSDIR="aufs-${_AUFSVER}"
    1.39 -	TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.lzma
    1.40 -	if [ -f $TARBALL ]; then
    1.41 -		unlzma -c $TARBALL | tar xf -
    1.42 -		cd $AUFSDIR && git checkout origin/aufs2.1-37
    1.43 -		cd $WOK/$PACKAGE
    1.44 -	else
    1.45 -		# Aufs2 from git repository
    1.46 -		git clone git://aufs.git.sourceforge.net/gitroot/aufs/aufs2-standalone.git $AUFSDIR
    1.47 -		tar cf - $AUFSDIR | lzma e $TARBALL -si
    1.48 -		cd $AUFSDIR && git checkout origin/aufs2.1-37
    1.49 -		cd $WOK/$PACKAGE
    1.50 -	fi
    1.51 -	cp -a $AUFSDIR/Documentation $AUFSDIR/fs $AUFSDIR/include $src
    1.52 -	cp -a $AUFSDIR/*.patch $WOK/$PACKAGE/stuff
    1.53 -	# We need the real GNU patch
    1.54 -	[ -L /usr/bin/patch ] && tazpkg get-install patch --forced
    1.55 -	cd $src
    1.56 -	# SliTaz db
    1.57 -	[ -d slitaz ] && rm -rf slitaz 2> /dev/null
    1.58 -	mkdir slitaz
    1.59 -	echo "$WGET_URL" > slitaz/url
    1.60 -	cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
    1.61 -	cp ../stuff/bootloader.sh slitaz
    1.62 -	# Apply patches
    1.63 -	while read patch_file; do
    1.64 -		echo "$patch_file" >> slitaz/patches
    1.65 -		cp ../stuff/$patch_file slitaz
    1.66 -		if [ -f done.$patch_file ]; then
    1.67 -			echo "Skipping $patch_file"
    1.68 -			continue
    1.69 -		fi
    1.70 -		echo "Apply $patch_file"
    1.71 -		patch -p1 < slitaz/$patch_file || exit 1
    1.72 -		touch done.$patch_file
    1.73 -	done <<EOT
    1.74 -$SOURCE-diff-$VERSION.u
    1.75 -$SOURCE-unlzma-$VERSION.u
    1.76 -$SOURCE-header-$VERSION.u
    1.77 -$SOURCE-freeinitrd-$VERSION.u
    1.78 -aufs2-base.patch
    1.79 -aufs2-standalone.patch
    1.80 -001-squashfs-decompressors-add-xz-decompressor-module.patch
    1.81 -002-squashfs-decompressors-add-boot-time-xz-support.patch
    1.82 -003-squashfs-x86-support-xz-compressed-kernel.patch
    1.83 -004-squashfs-add-xz-compression-support.patch
    1.84 -005-squashfs-add-xz-compression-configuration-option.patch
    1.85 -EOT
    1.86 -	make mrproper
    1.87 -	cd Documentation/lguest
    1.88 -	#make CC=uclibc-$TARGET-cc lguest || return 1
    1.89 -	cd ../..
    1.90 -
    1.91 -	# Build bzImage without modules first
    1.92 -	for i in isa lguest usbstorage fb ; do
    1.93 -		cp -f ../stuff/$SOURCE-$VERSION-slitaz.config-$TARGET-$i .config
    1.94 -		# We can't keep every driver in staging 
    1.95 -		sed -i -e 's/^CONFIG_RTL8192/#&/' \
    1.96 -		       -e 's/^CONFIG_R8187SE/#&/' \
    1.97 -		       -e 's/^CONFIG_RT2870/#&/' .config
    1.98 -		yes '' | make oldconfig
    1.99 -		make -j 4 bzImage || return 1
   1.100 -		mv arch/x86/boot/bzImage kernel-$i
   1.101 -		mv System.map System.map-$i
   1.102 -		mv .config config-$i
   1.103 -	done
   1.104 -
   1.105 -	# Build bzImage with modules
   1.106 -	cp -f ../stuff/$SOURCE-$VERSION-slitaz.config-$TARGET-modular .config
   1.107 -	make oldconfig
   1.108 -	ln .config slitaz/config
   1.109 -	make -j 4 bzImage &&
   1.110 -	make -j 4 modules &&
   1.111 -	make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
   1.112 -	make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
   1.113 -	[ -s arch/x86/boot/bzImage ] || return 1
   1.114 -	mkdir -p $PWD/_pkg/boot 2> /dev/null
   1.115 -	cp arch/x86/boot/bzImage kernel-modular
   1.116 -	cp System.map System.map-modular
   1.117 -	cp .config config-modular
   1.118 -	mv arch/x86/boot/bzImage $PWD/_pkg/boot/vmlinuz-$VERSION-slitaz
   1.119 -	# Compress all modules.
   1.120 -	$WOK/$PACKAGE/stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz
   1.121 -	ln System.map System.map-modules
   1.122 -	ln Module.symvers Module.symvers-modules
   1.123 -}
   1.124 -
   1.125 -# Rules to gen a SliTaz package suitable for Tazpkg.
   1.126 -genpkg_rules()
   1.127 -{
   1.128 -    mkdir $fs/boot
   1.129 -    cp -a $_pkg/../$PACKAGE $fs/boot/bzImage
   1.130 -    cp -a $_pkg/../System.map-${PACKAGE#kernel-} $fs/boot/System.map
   1.131 -    cp -a $_pkg/../config-${PACKAGE#kernel-} $fs/boot/config
   1.132 -    cp -a $_pkg/../config-busybox $fs/boot
   1.133 -    # Compress all modules.
   1.134 -    #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
   1.135 -}
   1.136 -
   1.137 -# Pre and post install commands for Tazpkg.
   1.138 -post_install()
   1.139 -{
   1.140 -    echo "Processing post-install commands..."
   1.141 -    chroot "$1/" depmod -a $VERSION-slitaz
   1.142 -    # GRUB stuff.
   1.143 -    if [ -f "$1/boot/grub/menu.lst" ]; then
   1.144 -    	root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
   1.145 -		grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
   1.146 -		# Add new kernel entry in case of upgrade for installed system.
   1.147 -		if ! grep -q $SOURCE-$VERSION-slitaz $1/boot/grub/menu.lst; then
   1.148 -    		cat >> $1/boot/grub/menu.lst << EOT
   1.149 -
   1.150 -title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
   1.151 -$grub_dev
   1.152 -kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
   1.153 -EOT
   1.154 -		fi
   1.155 -		# Display information message.
   1.156 -    	cat <<EOT
   1.157 -----
   1.158 -GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
   1.159 -
   1.160 -title  SliTaz GNU/Linux (Kernel $VERSION-slitaz)
   1.161 -$grub_dev
   1.162 -kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
   1.163 -----
   1.164 -EOT
   1.165 -	fi
   1.166 -}
   1.167 -
   1.168 -clean_wok()
   1.169 -{
   1.170 -	#rm -rf aufs2
   1.171 -	rm stuff/aufs2-base*
   1.172 -	rm stuff/aufs2-standalone*
   1.173 -	rm stuff/aufs2-kbuild*
   1.174 -	rm -rf stuff/tmp
   1.175 -}