/
PKGBUILD
74 lines (59 loc) · 1.64 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Maintainer: Dave Reisner <d@falconindy.com>
pkgname=kmod-git
pkgver=20120109
pkgrel=1
pkgdesc="interface to kernel module operations"
arch=('i686' 'x86_64')
url="http://git.profusion.mobi/cgit.cgi/kmod.git/"
license=('GPL2')
depends=('glibc' 'zlib')
makedepends=('git')
conflicts=('kmod' 'module-init-tools')
provides=('kmod=3' 'module-init-tools=3.16')
replaces=('module-init-tools')
options=('!libtool')
backup=('lib/depmod.d/search.conf')
source=('depmod-search.conf')
md5sums=('4b8cbcbc54b9029c99fd730e257d4436')
_gitroot="git://git.profusion.mobi/kmod.git"
_gitname="kmod"
build() {
msg "Connecting to GIT server...."
if [[ -d $_gitname ]] ; then
( cd "$_gitname" && git pull origin )
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting make..."
rm -rf "$_gitname-build"
cp -r "$_gitname"{,-build}
cd "$_gitname-build"
./autogen.sh
./configure \
--sysconfdir=/etc \
--enable-debug \
--with-rootprefix= \
--with-rootlibdir=/lib \
--with-zlib
make
}
check() {
make -C "$_gitname-build" check
}
package() {
make -C "$_gitname-build" DESTDIR="$pkgdir" install
# binary directories
install -dm755 "$pkgdir"/{,s}bin
# configuration directories
install -dm755 "$pkgdir"/{etc,lib}/{depmod,modprobe}.d
# add symlinks to kmod
ln -s /usr/bin/kmod "$pkgdir/bin/lsmod"
for tool in {ins,rm,dep}mod mod{info,probe}; do
ln -s ../usr/bin/kmod "$pkgdir/sbin/$tool"
done
# install depmod.d file for search/ dir
install -Dm644 "$srcdir/depmod-search.conf" "$pkgdir/lib/depmod.d/search.conf"
}
# vim: ft=sh syn=sh et