wok annotate linux-libre/receipt @ rev 23345
updated perl-http-message (6.03 -> 6.22)
author | Hans-G?nter Theisgen |
---|---|
date | Tue Mar 31 09:19:52 2020 +0100 (2020-03-31) |
parents | 9e8d7fd12ee2 |
children | 324b3fa82b76 |
rev | line source |
---|---|
gokhlayeh@9257 | 1 # SliTaz package receipt. |
gokhlayeh@9257 | 2 |
gokhlayeh@9257 | 3 PACKAGE="linux-libre" |
pascal@20604 | 4 VERSION="3.18.129-gnu" |
gokhlayeh@9257 | 5 CATEGORY="base-system" |
gokhlayeh@9257 | 6 SHORT_DESC="The Linux Libre kernel and modules." |
gokhlayeh@9257 | 7 MAINTAINER="gokhlayeh@slitaz.org" |
pascal@14657 | 8 LICENSE="GPL2" |
gokhlayeh@9257 | 9 PROVIDE="linux" |
pascal@14201 | 10 TARBALL="$PACKAGE-$VERSION.tar.bz2" |
gokhlayeh@9257 | 11 WEB_SITE="http://www.fsfla.org/svnwiki/selibre/linux-libre/" |
gokhlayeh@9257 | 12 WGET_URL="http://www.fsfla.org/svnwiki/selibre/linux-libre/download/releases/$VERSION/$TARBALL" |
gokhlayeh@9257 | 13 |
pascal@20604 | 14 DEPENDS="kmod" |
pascal@20604 | 15 BUILD_DEPENDS="slitaz-toolchain perl git xz lzma patch kmod bc \ |
pascal@20604 | 16 sysfsutils-dev libtool glib-dev libwrap libwrap-dev udev-dev" |
slaxemulator@10638 | 17 |
gokhlayeh@9257 | 18 # Rules to configure and make the package. |
gokhlayeh@9257 | 19 compile_rules() |
gokhlayeh@9257 | 20 { |
gokhlayeh@9257 | 21 # SliTaz db |
gokhlayeh@11396 | 22 rm -rf $WOK/$PACKAGE/slitaz && mkdir $WOK/$PACKAGE/slitaz |
slaxemulator@9337 | 23 echo "$WGET_URL" > $WOK/$PACKAGE/slitaz/url |
gokhlayeh@9257 | 24 cp $stuff/gztazmod.sh $stuff/list_modules.sh $WOK/$PACKAGE/slitaz |
gokhlayeh@9257 | 25 cp $stuff/bootloader.sh $WOK/$PACKAGE/slitaz |
slaxemulator@10638 | 26 |
gokhlayeh@9257 | 27 # Apply patches |
gokhlayeh@11396 | 28 echo "Applying patches..." |
gokhlayeh@9257 | 29 while read patch_file; do |
gokhlayeh@9257 | 30 echo "$patch_file" >> $WOK/$PACKAGE/slitaz/patches |
gokhlayeh@9257 | 31 cp $stuff/$patch_file $WOK/$PACKAGE/slitaz |
gokhlayeh@9257 | 32 if [ -f done.$patch_file ]; then |
gokhlayeh@9257 | 33 echo "Skipping $patch_file" |
gokhlayeh@9257 | 34 continue |
gokhlayeh@9257 | 35 fi |
gokhlayeh@9257 | 36 echo "Apply $patch_file" |
pascal@20604 | 37 patch -p1 < $WOK/$PACKAGE/slitaz/$patch_file || return 1 |
gokhlayeh@9257 | 38 touch done.$patch_file |
gokhlayeh@9257 | 39 done <<EOT |
pascal@20604 | 40 $PACKAGE-lzma-$VERSION.u |
gokhlayeh@9257 | 41 $PACKAGE-freeinitrd-$VERSION.u |
pascal@20626 | 42 $PACKAGE-efi-$VERSION.u |
gokhlayeh@9257 | 43 EOT |
gokhlayeh@11396 | 44 |
gokhlayeh@9257 | 45 make mrproper |
pascal@20604 | 46 cd tools/lguest |
pascal@20604 | 47 make $MAKEFLAGS lguest || return 1 |
gokhlayeh@9257 | 48 cd $src |
gokhlayeh@9257 | 49 |
gokhlayeh@9257 | 50 # Build bzImage without modules first |
gokhlayeh@9257 | 51 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config |
gokhlayeh@9257 | 52 sed -i 's/CONFIG_MODULES=y/# CONFIG_MODULES is not set/' .config |
al@18741 | 53 |
gokhlayeh@9257 | 54 yes '' | make oldconfig |
pascal@20604 | 55 make $MAKEFLAGS bzImage || return 1 |
pascal@15602 | 56 [ -d $DESTDIR ] || mkdir -p $DESTDIR |
pascal@15602 | 57 mv arch/x86/boot/bzImage $DESTDIR |
gokhlayeh@9257 | 58 mv System.map System.map-without-modules |
gokhlayeh@9257 | 59 |
gokhlayeh@9257 | 60 # Build bzImage with modules |
gokhlayeh@9257 | 61 cp -f $stuff/$PACKAGE-$VERSION-slitaz.config .config |
gokhlayeh@9257 | 62 make oldconfig |
gokhlayeh@9257 | 63 ln .config $WOK/$PACKAGE/slitaz/config |
gokhlayeh@11396 | 64 make $MAKEFLAGS bzImage && |
gokhlayeh@11396 | 65 make $MAKEFLAGS modules && |
pascal@15602 | 66 make INSTALL_MOD_PATH=$DESTDIR modules_install && |
pascal@15602 | 67 make INSTALL_HDR_PATH=$DESTDIR/usr headers_install && |
pascal@20604 | 68 [ -s arch/x86/boot/bzImage ] || return 1 |
pascal@15602 | 69 mkdir -p $DESTDIR/boot 2> /dev/null |
pascal@15602 | 70 mv arch/x86/boot/bzImage $DESTDIR/boot/vmlinuz-$VERSION-slitaz |
al@18741 | 71 |
gokhlayeh@9257 | 72 # Compress all modules. |
pascal@15602 | 73 $stuff/gztazmod.sh $DESTDIR/lib/modules/$VERSION-slitaz |
gokhlayeh@9257 | 74 ln System.map System.map-modules |
gokhlayeh@9257 | 75 ln Module.symvers Module.symvers-modules |
gokhlayeh@9257 | 76 } |
gokhlayeh@9257 | 77 |
gokhlayeh@9257 | 78 # Rules to gen a SliTaz package suitable for Tazpkg. |
gokhlayeh@9257 | 79 genpkg_rules() |
gokhlayeh@9257 | 80 { |
al@18741 | 81 local path |
al@18741 | 82 cp -a $install/boot $fs |
al@18741 | 83 # Compress all modules. |
al@18741 | 84 #$stuff/gztazmod.sh $install/lib/modules/$VERSION-slitaz |
al@18741 | 85 path=$fs/lib/modules/$VERSION-slitaz/kernel |
al@18741 | 86 mkdir -p $path |
al@18741 | 87 cp -a $install/lib/modules/$VERSION-slitaz/mo* \ |
gokhlayeh@9257 | 88 $fs/lib/modules/$VERSION-slitaz |
al@18741 | 89 # Get the base modules |
al@18741 | 90 export src |
al@18741 | 91 export _pkg |
al@18741 | 92 mkdir $WOK/$PACKAGE/tmp |
al@18741 | 93 $stuff/list_modules.sh \ |
gokhlayeh@11396 | 94 $(cat stuff/modules-$VERSION.list) > $WOK/$PACKAGE/tmp/modules.list |
al@18741 | 95 while read module; do |
al@18741 | 96 dir=$(dirname $module) |
al@18741 | 97 [ -d $path/$dir ] || mkdir -p $path/$dir |
al@18741 | 98 cp -a $install/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir |
al@18741 | 99 done < $WOK/$PACKAGE/tmp/modules.list |
al@18741 | 100 # Remove unresolved links |
al@18741 | 101 rm -f $fs/lib/modules/$VERSION-slitaz/build |
al@18741 | 102 rm -f $fs/lib/modules/$VERSION-slitaz/source |
pascal@17733 | 103 |
al@18741 | 104 # Pack all packages with a kernel module |
al@18741 | 105 for i in $(cd $WOK; grep -l '^WANTED="linux-libre"' */receipt); do |
al@18741 | 106 [ ! -d "$install/lib/modules/$VERSION-slitaz" ] && return 1 |
al@18741 | 107 cook ${i%/receipt} |
al@18741 | 108 done |
al@18741 | 109 |
al@18741 | 110 # Check and echo any module in kernel .config that's not added to |
al@18741 | 111 # one of linux-* pkgs |
al@18741 | 112 export PACKAGE |
al@18741 | 113 $stuff/check_modules.sh |
gokhlayeh@9257 | 114 } |
gokhlayeh@9257 | 115 |
gokhlayeh@9257 | 116 # Pre and post install commands for Tazpkg. |
gokhlayeh@9257 | 117 post_install() |
gokhlayeh@9257 | 118 { |
al@18741 | 119 chroot "$1/" depmod -a $VERSION-slitaz |
al@18741 | 120 # GRUB stuff. |
al@18741 | 121 if [ -f "$1/boot/grub/menu.lst" ]; then |
al@18741 | 122 root_dev=$(cat "$1/boot/grub/menu.lst" | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1) |
al@18741 | 123 grub_dev=$(cat "$1/boot/grub/menu.lst" | grep "root (" | head -n 1) |
gokhlayeh@9257 | 124 # Add new kernel entry in case of upgrade for installed system. |
pascal@18730 | 125 if ! grep -q $PACKAGE-$VERSION-slitaz "$1/boot/grub/menu.lst"; then |
al@18741 | 126 cat >> "$1/boot/grub/menu.lst" <<EOT |
gokhlayeh@9257 | 127 |
gokhlayeh@9257 | 128 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
gokhlayeh@9257 | 129 $grub_dev |
gokhlayeh@9257 | 130 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
gokhlayeh@9257 | 131 EOT |
gokhlayeh@9257 | 132 fi |
gokhlayeh@9257 | 133 # Display information message. |
al@18741 | 134 cat <<EOT |
gokhlayeh@9257 | 135 ---- |
gokhlayeh@9257 | 136 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst: |
gokhlayeh@9257 | 137 |
gokhlayeh@9257 | 138 title SliTaz GNU/Linux (Kernel $VERSION-slitaz) |
gokhlayeh@9257 | 139 $grub_dev |
gokhlayeh@9257 | 140 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev |
gokhlayeh@9257 | 141 ---- |
gokhlayeh@9257 | 142 EOT |
al@18741 | 143 fi |
al@18741 | 144 true |
gokhlayeh@9257 | 145 } |