updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / kmod-git / PKGBUILD
blob9758f0488bc4ad08028799d1ea4b11eddc89131a
1 # Maintainer: Dave Reisner <d@falconindy.com>
3 pkgname=kmod-git
4 pkgver=20120109
5 pkgrel=1
6 pkgdesc="interface to kernel module operations"
7 arch=('i686' 'x86_64')
8 url="http://git.profusion.mobi/cgit.cgi/kmod.git/"
9 license=('GPL2')
10 depends=('glibc' 'zlib')
11 makedepends=('git')
12 conflicts=('kmod' 'module-init-tools')
13 provides=('kmod=3' 'module-init-tools=3.16')
14 replaces=('module-init-tools')
15 options=('!libtool')
16 backup=('lib/depmod.d/search.conf')
17 source=('depmod-search.conf')
18 md5sums=('4b8cbcbc54b9029c99fd730e257d4436')
20 _gitroot="git://git.profusion.mobi/kmod.git"
21 _gitname="kmod"
23 build() {
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 "$_gitname-build"
37   cp -r "$_gitname"{,-build}
38   cd "$_gitname-build"
40   ./autogen.sh
41   ./configure \
42     --sysconfdir=/etc \
43     --enable-debug \
44     --with-rootprefix= \
45     --with-rootlibdir=/lib \
46     --with-zlib
48   make
51 check() {
52   make -C "$_gitname-build" check
55 package() {
56   make -C "$_gitname-build" DESTDIR="$pkgdir" install
58   # binary directories
59   install -dm755 "$pkgdir"/{,s}bin
61   # configuration directories
62   install -dm755 "$pkgdir"/{etc,lib}/{depmod,modprobe}.d
64   # add symlinks to kmod
65   ln -s /usr/bin/kmod "$pkgdir/bin/lsmod"
66   for tool in {ins,rm,dep}mod mod{info,probe}; do
67     ln -s ../usr/bin/kmod "$pkgdir/sbin/$tool"
68   done
70   # install depmod.d file for search/ dir
71   install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/lib/depmod.d/search.conf"
74 # vim: ft=sh syn=sh et