summaryrefslogtreecommitdiff
path: root/libre/vhba-module/PKGBUILD
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-07-08 20:51:23 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-07-08 20:51:23 -0500
commit7cffd3f39840ba78e88c393ab0622c0e4fa47223 (patch)
tree8cc1dce1b55870350ca7522dc2841f9851c365c4 /libre/vhba-module/PKGBUILD
parent38566d3c101b7e8b3450d7b5ac94507266ccb113 (diff)
downloadabslibre-7cffd3f39840ba78e88c393ab0622c0e4fa47223.tar.gz
abslibre-7cffd3f39840ba78e88c393ab0622c0e4fa47223.tar.bz2
abslibre-7cffd3f39840ba78e88c393ab0622c0e4fa47223.zip
vhba-module-20170610-5.parabola1.basekernel4.11: updating version
Diffstat (limited to 'libre/vhba-module/PKGBUILD')
-rw-r--r--libre/vhba-module/PKGBUILD73
1 files changed, 45 insertions, 28 deletions
diff --git a/libre/vhba-module/PKGBUILD b/libre/vhba-module/PKGBUILD
index e09166636..e00826b27 100644
--- a/libre/vhba-module/PKGBUILD
+++ b/libre/vhba-module/PKGBUILD
@@ -1,15 +1,16 @@
# Maintainer (Arch): Ray Rashif <schiv@archlinux.org>
# Contributor (Arch): Mateusz Herych <heniekk@gmail.com>
# Contributor (Arch): Charles Lindsay <charles@chaoslizard.org>
-# Maintainer: André Silva <emulatorman@parabola.nu>
+# Contributor (Hyperbola): André Silva <emulatorman@hyperbola.info>
+# Contributor (Hyperbola): Márcio Silva <coadde@hyperbola.info>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-# Contributor: Márcio Silva <coadde@parabola.nu>
_kernelname=
if [[ ${_kernelname} == "" ]]; then
_basekernel=4.11
- _archrel=4
+ _archrel=5
_parabolarel=1
elif [[ ${_kernelname} == -lts ]]; then
_basekernel=4.9
@@ -17,8 +18,7 @@ elif [[ ${_kernelname} == -lts ]]; then
_parabolarel=1
fi
-_pkgname=vhba-module
-pkgname=${_pkgname}${_kernelname}
+pkgbase=vhba-module
pkgver=20170610
pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel}
_extramodules=extramodules-${_basekernel}${_kernelname}
@@ -29,42 +29,59 @@ license=('GPL')
# Generic (you shouldn't have to modify any of these variables)
_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
-makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}")
+makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
makedepends+=('libelf')
-replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}")
-conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}")
if [[ ${_kernelname} != "" ]]; then
- provides=("${_pkgname}")
+ provides=("${pkgbase}")
fi
-options=(!makeflags)
-install='kmod.install'
-source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2"
- '60-vhba.rules')
+source=("http://downloads.sourceforge.net/cdemu/$pkgbase-$pkgver.tar.bz2"
+ '60-vhba.rules' 'dkms.conf')
sha256sums=('7970c93f989d9c4f2629371bf5ee7a76f95e4c12342c3320ddc528d0df02d9ec'
- '3052cb1cadbdf4bfb0b588bb8ed80691940d8dd63dc5502943d597eaf9f40c3b')
+ '3052cb1cadbdf4bfb0b588bb8ed80691940d8dd63dc5502943d597eaf9f40c3b'
+ '8cab0ebb4fee72069d63616b0983f105b98d1261e72e9bef5509a6e60bc382a7')
build() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
+ cd "${pkgbase}-${pkgver}"
- _kernver="$(cat /usr/lib/modules/${_extramodules}/version)"
-
- make KDIR=/usr/lib/modules/$_kernver/build
+ make KERNELRELEASE="$(cat /usr/lib/modules/$_extramodules/version)"
}
-package() {
- cd "${srcdir}/${_pkgname}-${pkgver}"
+_package() {
+ depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
+ replaces=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
+ conflicts=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
+ install='kmod.install'
- # Actually install
- install -Dm644 vhba.ko "$pkgdir/usr/lib/modules/$_extramodules/vhba.ko"
- install -Dm644 ../60-vhba.rules "$pkgdir/usr/lib/udev/rules.d/60-vhba.rules"
+ cd "${pkgbase}-${pkgver}"
- # Set the correct extramodules directory for install
- cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
- true && install=${install}.pkg
- sed -i "s/^_EXTRAMODULES=.*/_EXTRAMODULES="${_extramodules}"/" "${startdir}/${install}"
+ # Actually install
+ install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
+ install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
}
+if [[ ${_kernelname} == "" ]]; then
+ _package-dkms() {
+ depends=(dkms)
+ provides=("vhba-module=$pkgver-$pkgrel")
+ conflicts=(vhba-module)
+
+ cd $pkgbase-$pkgver
+ install -Dt "$pkgdir/usr/src/$pkgbase-$pkgver" -m644 Makefile vhba.c ../dkms.conf
+ install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
+ }
+
+ pkgname=("${pkgbase}${_kernelname}" "${pkgbase}${_kernelname}-dkms")
+else
+ pkgname=("${pkgbase}${_kernelname}")
+fi
+
+for _p in ${pkgname[@]}; do
+ eval "package_${_p}() {
+ $(declare -f "_package${_p#${pkgbase}${_kernelname}}")
+ _package${_p#${pkgbase}${_kernelname}}
+ }"
+done
+
# vim:set ts=2 sw=2 et: