wok view linux/receipt @ rev 6891

Fixed cups. Needed to add --enable-dbus and --with-dbusdir=/etc/dbus-1 for there to be a /etc/dbus-1 folder to copy to package.
author Christopher Rogers <slaxemulator@gmail.com>
date Thu Oct 21 02:47:40 2010 +0000 (2010-10-21)
parents 473886fe148a
children 5355ffc461cf
line source
1 # SliTaz package receipt.
3 PACKAGE="linux"
4 VERSION="2.6.34"
5 CATEGORY="base-system"
6 SHORT_DESC="The Linux kernel and modules."
7 DEPENDS="depmod"
8 BUILD_DEPENDS="slitaz-toolchain perl git"
9 MAINTAINER="devel@slitaz.org"
10 TARBALL="$PACKAGE-$VERSION.tar.bz2"
11 WEB_SITE="http://www.kernel.org/"
12 WGET_URL="http://www.eu.kernel.org/pub/linux/kernel/v${VERSION:0:3}/$TARBALL"
13 CONFIG_FILES="/lib/modules/$VERSION-slitaz/modules.dep"
15 # Rules to configure and make the package.
16 compile_rules()
17 {
18 local _AUFSVER="20101015"
19 local AUFSDIR="aufs2-${_AUFSVER}-${VERSION}"
20 [ -d "AUFSDIR" ] && rm -rf $AUFSDIR
21 TARBALL=$SOURCES_REPOSITORY/$AUFSDIR.tar.gz
22 if [ -f $TARBALL ]; then
23 tar xzf $TARBALL
24 cd $AUFSDIR && git checkout origin/aufs2-34
25 else
26 # Aufs2 from git repository
27 git clone http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git $AUFSDIR
28 tar czf $TARBALL $AUFSDIR
29 cd $AUFSDIR && git checkout origin/aufs2-34
30 fi
31 #cd $AUFSDIR
32 cp -a Documentation fs include $src
33 cp -a *.patch ../stuff
34 # We need the real GNU patch
35 [ -L /usr/bin/patch ] && tazpkg get-install patch --forced
36 cd $src
37 # SliTaz db
38 rm -rf slitaz 2> /dev/null
39 mkdir slitaz
40 echo "$WGET_URL" > slitaz/url
41 cp ../stuff/gztazmod.sh ../stuff/list_modules.sh slitaz
42 cp ../stuff/bootloader.sh slitaz
43 # Apply patches
44 while read patch_file; do
45 echo "$patch_file" >> slitaz/patches
46 cp ../stuff/$patch_file slitaz
47 if [ -f done.$patch_file ]; then
48 echo "Skipping $patch_file"
49 continue
50 fi
51 echo "Apply $patch_file"
52 patch -p1 < slitaz/$patch_file || exit 1
53 touch done.$patch_file
54 done <<EOT
55 $PACKAGE-diff-$VERSION.u
56 $PACKAGE-unlzma-$VERSION.u
57 $PACKAGE-header-$VERSION.u
58 aufs2-base.patch
59 aufs2-kbuild.patch
60 aufs2-standalone.patch
61 $PACKAGE-freeinitrd-$VERSION.u
62 $PACKAGE-squashfs-lzma-$VERSION.u
63 EOT
64 make mrproper
65 cd Documentation/lguest
66 make lguest || return 1
67 cd ../..
68 cp ../stuff/$PACKAGE-$VERSION-slitaz.config .config
69 make oldconfig
70 ln .config slitaz/config
71 make -j 4 bzImage &&
72 make -j 4 modules &&
73 make INSTALL_MOD_PATH=$PWD/_pkg modules_install &&
74 make INSTALL_HDR_PATH=$PWD/_pkg/usr headers_install &&
75 [ -s arch/x86/boot/bzImage ]
76 # Compress all modules.
77 $WOK/$PACKAGE/stuff/gztazmod.sh $PWD/_pkg/lib/modules/$VERSION-slitaz
78 }
80 # Rules to gen a SliTaz package suitable for Tazpkg.
81 genpkg_rules()
82 {
83 local path
84 mkdir $fs/boot
85 cp -a $src/arch/x86/boot/bzImage \
86 $fs/boot/vmlinuz-$VERSION-slitaz
87 # Compress all modules.
88 #./stuff/gztazmod.sh $_pkg/lib/modules/$VERSION-slitaz
89 path=$fs/lib/modules/$VERSION-slitaz/kernel
90 mkdir -p $path
91 cp -a $_pkg/lib/modules/$VERSION-slitaz/mo* \
92 $fs/lib/modules/$VERSION-slitaz
93 # Get the base modules
94 export src
95 export _pkg
96 $src/slitaz/list_modules.sh \
97 $(cat stuff/modules-$VERSION.list) > $src/modules.list
98 while read module; do
99 dir=$(dirname $module)
100 [ -d $path/$dir ] || mkdir -p $path/$dir
101 cp -a $_pkg/lib/modules/$VERSION-slitaz/kernel/$module $path/$dir
102 done < $src/modules.list
103 # Remove unresolved links
104 rm -f $fs/lib/modules/$VERSION-slitaz/build
105 rm -f $fs/lib/modules/$VERSION-slitaz/source
106 # Cook all packages with a kernel module
107 for i in $(cd $WOK; grep -l 'tazwok cook linux$' */receipt)
108 do
109 echo tazwok cook ${i%/receipt}
110 done
111 # Check and echo any module in kernel .config that's not added to
112 # one of linux-* pkgs
113 ./stuff/check_modules.sh
114 }
116 # Pre and post install commands for Tazpkg.
117 post_install()
118 {
119 echo "Processing post-install commands..."
120 chroot "$1/" depmod -a $VERSION-slitaz
121 # GRUB stuff.
122 if [ -f "$1/boot/grub/menu.lst" ]; then
123 root_dev=`cat $1/boot/grub/menu.lst | grep root= | sed 's/.*root=\([^ ]*\).*/\1/' | head -n 1`
124 grub_dev=`cat $1/boot/grub/menu.lst | grep "root (" | head -n 1`
125 # Add new kernel entry in case of upgrade for installed system.
126 if ! grep -q $PACKAGE-$VERSION-slitaz $1/boot/grub/menu.lst; then
127 cat >> $1/boot/grub/menu.lst << EOT
129 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
130 $grub_dev
131 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
132 EOT
133 fi
134 # Display information message.
135 cat <<EOT
136 ----
137 GRUB is installed, these tree lines must be in your /boot/grub/menu.lst:
139 title SliTaz GNU/Linux (Kernel $VERSION-slitaz)
140 $grub_dev
141 kernel /boot/vmlinuz-$VERSION-slitaz root=$root_dev
142 ----
143 EOT
144 fi
145 }
147 clean_wok()
148 {
149 rm -rf aufs2
150 rm stuff/aufs2-*
151 rm -rf stuff/tmp
152 }