summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-08-28 03:18:12 -0300
committercoadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu>2014-08-28 03:18:12 -0300
commit587875af278dfc6899376afa44e38f3158e0137e (patch)
tree1a911c5d76f9489ffdfd359db7ac9d1f379082f5
parent1f6670940a9e80aa1cf18b9f3b341733ccb76d28 (diff)
downloadabslibre-587875af278dfc6899376afa44e38f3158e0137e.tar.gz
abslibre-587875af278dfc6899376afa44e38f3158e0137e.tar.bz2
abslibre-587875af278dfc6899376afa44e38f3158e0137e.zip
vhba-module: rebuild and fixing pkg
-rw-r--r--libre/vhba-module-parabola/PKGBUILD74
-rw-r--r--libre/vhba-module-parabola/kmod.install20
-rw-r--r--libre/vhba-module-parabola/vhba-module.install20
3 files changed, 67 insertions, 47 deletions
diff --git a/libre/vhba-module-parabola/PKGBUILD b/libre/vhba-module-parabola/PKGBUILD
index aa392ecb8..18e863bf6 100644
--- a/libre/vhba-module-parabola/PKGBUILD
+++ b/libre/vhba-module-parabola/PKGBUILD
@@ -1,4 +1,3 @@
-# $Id: PKGBUILD 116828 2014-08-04 07:19:43Z tpowa $
# Maintainer (Arch): Ray Rashif <schiv@archlinux.org>
# Contributor (Arch): Mateusz Herych <heniekk@gmail.com>
# Contributor (Arch): Charles Lindsay <charles@chaoslizard.org>
@@ -6,39 +5,58 @@
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
# Contributor: Márcio Silva <coadde@parabola.nu>
-# Kernel info
-_basekernel=3.16
_kernelname=
+_basekernel=3.16
+_pkgrel=6.2
+
+if [[ ${_kernelname} == "" ]]; then
+ _basekernel=${_basekernel}
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -lts ]]; then
+ _basekernel=3.14
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -grsec ]]; then
+ _basekernel=3.15
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -lts-knock ]]; then
+ _basekernel=3.10
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -rt ]]; then
+ _basekernel=3.14
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -pae ]]; then
+ _basekernel=${_basekernel}
+ _pkgrel=${_pkgrel}
+elif [[ ${_kernelname} == -xen ]]; then
+ _basekernel=${_basekernel}
+ _pkgrel=${_pkgrel}
+fi
-# Source info
_pkgname=vhba-module
+pkgname=${_pkgname}${_kernelname}-parabola
pkgver=20140629
+pkgrel=${_pkgrel}
+_extramodules=extramodules-${_basekernel}${_kernelname}
pkgdesc="Kernel module that emulates SCSI devices (built for the linux-libre${_kernelname} kernel package)"
+arch=('i686' 'x86_64' 'mips64el')
url="http://cdemu.sourceforge.net/"
license=('GPL')
-source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2"
- '60-vhba.rules')
-md5sums=('6b307a80df9c163768cc7ecb3ccebb71'
- '4dc37dc348b5a2c83585829bde790dcc')
-
-# Package info
-pkgrel=6.1
-arch=('i686' 'x86_64' 'mips64el')
-options=(!makeflags)
-install=$_pkgname.install
# Generic (you shouldn't have to modify any of these variables)
-pkgname=${_pkgname}-parabola${_kernelname}
_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-_extramodules=extramodules-${_basekernel}${_kernelname}
depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}")
-replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") # for Arch-compatibility
-conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}") # for Arch-compatibility
-provides=("${_pkgname}${_kernelname}=${pkgver}") # for Arch-compatibility
-if [[ -n "${_kernelname}" ]]; then
- provides+=("${_pkgname}-parabola=${pkgver}") # pkgname without _kernelname
-fi
+
+replaces=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}")
+conflicts=("${_pkgname}${_kernelname}" "${_pkgname}-libre${_kernelname}")
+provides=("${_pkgname}${_kernelname}=${pkgver}")
+
+options=(!makeflags)
+install='kmod.install'
+source=("http://downloads.sourceforge.net/cdemu/$_pkgname-$pkgver.tar.bz2"
+ '60-vhba.rules')
+md5sums=('6b307a80df9c163768cc7ecb3ccebb71'
+ '4dc37dc348b5a2c83585829bde790dcc')
build() {
cd "${srcdir}/${_pkgname}-${pkgver}"
@@ -51,12 +69,14 @@ build() {
package() {
cd "${srcdir}/${_pkgname}-${pkgver}"
- # Set the correct extramodules directory for install
- cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
- true && install=${install}.pkg
- sed -r "s/(_extramodules=).*/\1${_extramodules}/" -i "${startdir}/${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"
+
+ # 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}"
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/libre/vhba-module-parabola/kmod.install b/libre/vhba-module-parabola/kmod.install
new file mode 100644
index 000000000..08ecfbfba
--- /dev/null
+++ b/libre/vhba-module-parabola/kmod.install
@@ -0,0 +1,20 @@
+_EXTRAMODULES=
+
+_post_install() {
+ echo ">>> Updating module dependencies. Please wait ..."
+ depmod "$(cat /usr/lib/modules/$_EXTRAMODULES/version)" >/dev/null 2>&1
+}
+
+post_install() {
+ _post_install
+ getent group cdemu &>/dev/null || groupadd -r cdemu
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ _post_install
+ groupdel cdemu
+}
diff --git a/libre/vhba-module-parabola/vhba-module.install b/libre/vhba-module-parabola/vhba-module.install
deleted file mode 100644
index 04d26b27b..000000000
--- a/libre/vhba-module-parabola/vhba-module.install
+++ /dev/null
@@ -1,20 +0,0 @@
-_updatemod() {
- _extramodules=THIS_IS_AUTOMATICALLY_SET_BY_PKGBUILD
- depmod $(cat /usr/lib/modules/${_extramodules}/version)
-}
-
-post_install() {
- getent group cdemu &>/dev/null || groupadd -r cdemu
- _updatemod
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- _updatemod
- groupdel cdemu
-}
-
-# vim:set ts=2 sw=2 et: