summarylogtreecommitdiffstats
path: root/ufsd-module-dkms.install
blob: 59ac36496d94f97ee69442818718d4a9627861ae (plain)
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
post_install() {
	local pkgver=${1%%-*}
	/usr/src/ufsd-module-$pkgver/configure --prefix=/usr --sbindir=/usr/bin

	echo ">>> DKMS: Module add, build, and install"

	dkms add -m ufsd-module -v $pkgver
	dkms build -m ufsd-module -v $pkgver
	dkms install -m ufsd-module -v $pkgver

	depmod -a

	cat <<EOF
==> For more information on this driver, see:
==> https://aur.archlinux.org/packages/ufsd-module
EOF
}

pre_upgrade() {
	pre_remove $1
}

pre_remove() {
	local pkgver=${1%%-*}
	echo ">>> DKMS: Module uninstall"

	line=`dkms status -m ufsd-module`
	if echo "$line" | grep -E 'added|built|installed'; then
		dkms remove ufsd-module/$pkgver --all
	fi

	depmod -a
}

post_upgrade() {
	post_install $1
}