updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / omnibook-git / PKGBUILD
blob86dbd2c0d14d56aef30c3428e6b0ab860e4d39a8
1 # Contributor: grimi <grimi at poczta dot fm>
3 pkgname=omnibook-git
4 pkgver=20110911
5 pkgrel=4
6 pkgdesc="Kernel module for HP OmniBook,Pavilion,Toshiba and Compal ACL00 laptops"
7 arch=('i686' 'x86_64')
8 url="http://omnibook.sourceforge.net"
9 license=('GPL')
10 depends=('linux')
11 makedepends=('git' 'linux-headers')
12 conflicts=('omnibook')
13 provides=('omnibook')
14 source=('omnibook-kernel-3.0.patch')
15 md5sums=('149b5ae2d66998fdc2490f15e99b1e35')
16 install=$pkgname.install
19 _gitroot="git://omnibook.git.sourceforge.net/gitroot/omnibook/omnibook"
20 _gitname="omnibook"
22 build() {
23   cd "$srcdir"
24   msg "Connecting to GIT server...."
26   if [ -d $_gitname ] ; then
27     cd $_gitname && git pull origin
28     msg "The local files are updated."
29   else
30     git clone $_gitroot $_gitname
31   fi
33   msg "GIT checkout done or server timeout"
34   msg "Starting make..."
36   rm -rf "$srcdir/$_gitname-build"
37   git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
38   cd "$srcdir/$_gitname-build"
40   #Build and install kernel module
41   patch -Np0 -i ../omnibook-kernel-3.0.patch
42   make
43   gzip omnibook.ko
44   install -Dm644 omnibook.ko.gz \
45      "${pkgdir}"/lib/modules/extramodules-$(uname -r|sed 's/\(.\..\).*/\1/')-ARCH/omnibook.ko.gz