updated on Mon Jan 16 12:07:49 UTC 2012
[aur-mirror.git] / kernel-eeepc-901 / PKGBUILD
blob844b75f2c610f7ce9c06cf19fe6ae1d9609b1a85
1 # Maintainer: Dan McGee <dan@archlinux.org>
2 # Contributor: Smith Dhumbumroong <zodmaner@gmail.com>
4 pkgname=kernel-eeepc-901
5 pkgver=3.2
6 _kernver=3.2
7 pkgrel=1
8 pkgdesc="The Linux Kernel and modules for the Asus Eee PC 901"
9 arch=('i686')
10 license=('GPL2')
11 url="http://bitbucket.org/zodmaner/eeepc-901/wiki/Home"
12 groups=(eeepc-901)
13 depends=('coreutils' 'module-init-tools' 'linux-firmware')
14 optdepends=('crda: for wireless regulatory domain support'
15             'iw: for wireless configuration support')
16 replaces=('kernel-eeepc-901-kms')
17 install=kernel-eeepc-901.install
18 source=(ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-$_kernver.tar.bz2
19         ftp://ftp.kernel.org/pub/linux/kernel/v3.0/patch-$pkgver.gz
20         kernelconfig
21         61-eee-ssd.rules
22         CREDITS)
24 build() {
25   # unset since our build machine may differ from eee
26   unset CFLAGS CXXFLAGS
28   # get into the linux source directory and start some magic
29   cd $srcdir/linux-$_kernver
31   if [ "$_kernver" != "$pkgver" ]; then
32     # add latest kernel stable patch
33     patch -Np1 < ../patch-$pkgver || return 1
34   fi
36   # load configuration and build kernel + modules
37   cp ../kernelconfig ./.config
38   make silentoldconfig
39   #make menuconfig
40   make || return 1
43 package() {
44   # install our modules
45   cd $srcdir/linux-$_kernver
46   mkdir -p $pkgdir/{lib/modules,boot}
47   make INSTALL_MOD_PATH=$pkgdir modules_install || return 1
49   # remove the junk symlinks
50   cd $srcdir/linux-$_kernver
51   if [ "$_kernver" != "$pkgver" ]; then
52     rm $pkgdir/lib/modules/${pkgver}-eeepc-901/{build,source}
53   else
54     rm $pkgdir/lib/modules/${pkgver}.0-eeepc-901/{build,source}
55   fi
56   # install the kernel
57   cp arch/x86/boot/bzImage $pkgdir/boot/vmlinuz-eeepc-901
58   # install a helper file for all install scripts
59   mkdir -p $pkgdir/usr/share/kernel-eeepc-901/
60   if [ "$_kernver" != "$pkgver" ]; then
61     echo "KERNEL_VERSION='${pkgver}-eeepc-901'" > \
62     $pkgdir/usr/share/kernel-eeepc-901/currver
63   else
64     echo "KERNEL_VERSION='${pkgver}.0-eeepc-901'" > \
65     $pkgdir/usr/share/kernel-eeepc-901/currver
66   fi
68   # udev rules for SSD drives
69   mkdir -p $pkgdir/lib/udev/rules.d/
70   install -m644 $srcdir/61-eee-ssd.rules $pkgdir/lib/udev/rules.d/
72   # install credits file
73   install -m644 $srcdir/CREDITS $pkgdir/usr/share/kernel-eeepc-901/CREDITS
76 md5sums=('7ceb61f87c097fc17509844b71268935'
77          'c86b87056ad548a7f6f668d13d69bd8e'
78          'e709765d4bdef9595c2a9ed67cdd2b30'
79          '73a20e8bf2bb29ba342f43460c6291cb'
80          'bccc9e60b27d739d0d4383dc9c08ed4a')
81 # vim:set ts=2 sw=2 et: