summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libre/acpi_call/PKGBUILD78
-rw-r--r--libre/bbswitch/PKGBUILD60
-rw-r--r--libre/tp_smapi/PKGBUILD42
-rw-r--r--libre/vhba-module/PKGBUILD71
4 files changed, 77 insertions, 174 deletions
diff --git a/libre/acpi_call/PKGBUILD b/libre/acpi_call/PKGBUILD
index 3fabea630..8d566c12b 100644
--- a/libre/acpi_call/PKGBUILD
+++ b/libre/acpi_call/PKGBUILD
@@ -6,106 +6,72 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-_kernelname=
-
-if [[ ${_kernelname} == "" ]]; then
- _basekernel=4.14
- _archrel=90
- _parabolarel=1
-elif [[ ${_kernelname} == -lts ]]; then
- _basekernel=4.9
- _archrel=53
- _parabolarel=1
-fi
+_basekernel=4.14
+_archrel=90
+_parabolarel=2
pkgbase=acpi_call
+pkgname=(acpi_call acpi_call-dkms)
pkgver=1.1.0
pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel}
-_extramodules=extramodules-${_basekernel}${_kernelname}
-pkgdesc="A linux kernel module that enables calls to ACPI methods through /proc/acpi/call (built for the linux-libre${_kernelname} kernel package)"
+pkgdesc="A linux kernel module that enables calls to ACPI methods through /proc/acpi/call (built for the linux-libre kernel package)"
arch=('i686' 'x86_64' 'armv7h')
url="http://github.com/mkottman/${pkgbase}"
license=('GPL')
# Generic (you shouldn't have to modify any of these variables)
_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
+makedepends=("linux-libre-headers>=${_basekernel}" "linux-libre-headers<${_toohigh}" "linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
makedepends+=('libelf')
-if [[ ${_kernelname} != "" ]]; then
- provides=("${pkgbase}")
-fi
-
+_extramodules=extramodules-${_basekernel}
source=("${pkgbase}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz"
'dkms.conf')
sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0'
'32e6ea6523b13132c6c7838bba7fbf3d040ba2d35a892c2c356245612720df8a')
prepare() {
- cd "${pkgbase}-${pkgver}"
+ cd $pkgbase-$pkgver
- if [[ ${_basekernel} > 3.16 ]]; then
- # Fix build with Linux-libre 3.17-gnu
- sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
- fi
+ # Fix build with Linux-libre >= 3.17-gnu
+ sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
- if [[ ${_basekernel} > 4.11 ]]; then
- # Fix build with Linux-libre 4.12-gnu
- sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c
- fi
+ # Fix build with Linux-libre >= 4.12-gnu
+ sed -i 's|asm/uaccess.h|linux/uaccess.h|' acpi_call.c
}
build() {
- cd "${pkgbase}-${pkgver}"
+ cd $pkgbase-$pkgver
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
-_package() {
- depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
- replaces=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
- [[ -n ${_kernelname} ]] && replaces+=("${_pkgname}${_kernelname}-parabola")
- conflicts=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
- [[ -n ${_kernelname} ]] && conflicts+=("${_pkgname}${_kernelname}-parabola")
+package_acpi_call() {
+ depends=("linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
+ replaces=("${pkgbase}-libre" "${pkgbase}-parabola")
+ conflicts=("${pkgbase}-libre" "${pkgbase}-parabola")
cd $pkgbase-$pkgver
-
- # Actually install
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 acpi_call.ko
find "$pkgdir" -name '*.ko' -exec gzip -n {} +
- echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call${_kernelname}.conf"
+ echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
- mkdir -p "$pkgdir/usr/share/acpi_call${_kernelname}"
- cp -t "$pkgdir/usr/share/acpi_call${_kernelname}" -dr --no-preserve=ownership examples support
+ mkdir -p "$pkgdir/usr/share/acpi_call"
+ cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}
-if [[ ${_kernelname} == "" ]]; then
- _package-dkms() {
+package_acpi_call-dkms() {
depends=(dkms)
provides=("acpi_call=$pkgver-$pkgrel")
conflicts=(acpi_call)
cd $pkgbase-$pkgver
-
- # Actually install
install -Dt "$pkgdir/usr/src/$pkgbase-$pkgver" -m644 Makefile acpi_call.c ../dkms.conf
echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
- }
-
- pkgname=("${pkgbase}" "${pkgbase}-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:
diff --git a/libre/bbswitch/PKGBUILD b/libre/bbswitch/PKGBUILD
index 809d97224..5763d7fc9 100644
--- a/libre/bbswitch/PKGBUILD
+++ b/libre/bbswitch/PKGBUILD
@@ -6,36 +6,25 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-_kernelname=
-
-if [[ ${_kernelname} == "" ]]; then
- _basekernel=4.14
- _archrel=96
- _parabolarel=1
-elif [[ ${_kernelname} == -lts ]]; then
- _basekernel=4.9
- _archrel=38
- _parabolarel=1
-fi
+_basekernel=4.14
+_archrel=96
+_parabolarel=2
pkgbase=bbswitch
+pkgname=(bbswitch bbswitch-dkms)
pkgver=0.8
pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel}
-_extramodules=extramodules-${_basekernel}${_kernelname}
-pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops (built for the linux-libre${_kernelname} kernel package)"
+pkgdesc="Kernel module allowing to switch dedicated graphics card on Optimus laptops (built for the linux-libre kernel package)"
arch=('i686' 'x86_64')
url="http://github.com/Bumblebee-Project/${pkgbase}"
license=('GPL')
# Generic (you shouldn't have to modify any of these variables)
_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
+makedepends=("linux-libre-headers>=${_basekernel}" "linux-libre-headers<${_toohigh}" "linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
makedepends+=('libelf')
-if [[ ${_kernelname} != "" ]]; then
- provides=("${pkgbase}")
-fi
-
+_extramodules=extramodules-${_basekernel}
source=("${pkgbase}-${pkgver}.tar.gz::https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
sha256sums=('76cabd3f734fb4fe6ebfe3ec9814138d0d6f47d47238521ecbd6a986b60d1477')
@@ -45,34 +34,21 @@ build() {
make KDIR=/lib/modules/${_kernver}/build
}
-_package() {
- depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
- replaces=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
- conflicts=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
+package_bbswitch() {
+ depends=("linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
+ replaces=("${pkgbase}-libre" "${pkgbase}-parabola")
+ conflicts=("${pkgbase}-libre" "${pkgbase}-parabola")
cd "${pkgbase}-${pkgver}"
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 bbswitch.ko
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
}
-if [[ ${_kernelname} == "" ]]; then
- _package-dkms() {
- depends=('dkms')
- conflicts=('bbswitch')
- provides=('bbswitch')
-
- cd "${pkgbase}-${pkgver}"
- install -Dt "${pkgdir}/usr/src/${pkgbase}-${pkgver}" -m644 Makefile bbswitch.c dkms/dkms.conf
- }
+package_bbswitch-dkms() {
+ depends=('dkms')
+ conflicts=('bbswitch')
+ provides=('bbswitch')
- 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
+ cd "${pkgbase}-${pkgver}"
+ install -Dt "${pkgdir}/usr/src/${pkgbase}-${pkgver}" -m644 Makefile bbswitch.c dkms/dkms.conf
+}
diff --git a/libre/tp_smapi/PKGBUILD b/libre/tp_smapi/PKGBUILD
index d3b431bce..475525ac2 100644
--- a/libre/tp_smapi/PKGBUILD
+++ b/libre/tp_smapi/PKGBUILD
@@ -11,46 +11,34 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-_kernelname=
+_basekernel=4.14
+_archrel=45
+_parabolarel=2
-if [[ ${_kernelname} == "" ]]; then
- _basekernel=4.14
- _archrel=45
- _parabolarel=1
-elif [[ ${_kernelname} == -lts ]]; then
- _basekernel=4.9
- _archrel=24
- _parabolarel=1
-fi
-
-__pkgname=tp-smapi
-_pkgname=tp_smapi
-pkgname=${_pkgname}${_kernelname}
+pkgname=tp_smapi
+_pkgname=tp-smapi
pkgver=0.42
pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel}
-_extramodules=extramodules-${_basekernel}${_kernelname}
-pkgdesc="Modules for ThinkPad's SMAPI functionality (built for the linux-libre${_kernelname} kernel package)"
+_extramodules=extramodules-${_basekernel}
+pkgdesc="Modules for ThinkPad's SMAPI functionality (built for the linux-libre kernel package)"
arch=('i686' 'x86_64')
url='https://github.com/evgeni/tp_smapi'
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}")
+depends=("linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
+makedepends=("linux-libre-headers>=${_basekernel}" "linux-libre-headers<${_toohigh}")
makedepends+=('libelf')
-replaces=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}")
-conflicts=("${_pkgname}-libre${_kernelname}" "${_pkgname}-parabola${_kernelname}")
-if [[ ${_kernelname} != "" ]]; then
- provides=("${_pkgname}")
-fi
+replaces=("${pkgname}-libre" "${pkgname}-parabola")
+conflicts=("${pkgname}-libre" "${pkgname}-parabola")
-source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/evgeni/${_pkgname}/archive/${__pkgname}/${pkgver}.tar.gz")
+source=("${pkgname}-${_pkgname}-${pkgver}.tar.gz::https://github.com/evgeni/${pkgname}/archive/${_pkgname}/${pkgver}.tar.gz")
sha256sums=('cd28bf6ee21b2c27b88d947cb0bfcb19648c7daa5d350115403dbcad05849381')
build() {
- cd "${_pkgname}-${__pkgname}-${pkgver}"
+ cd "${pkgname}-${_pkgname}-${pkgver}"
# https://bugs.archlinux.org/task/54975 (kernel has no _GLOBAL_OFFSET_TABLE_):
# Clear EXTRA_CFLAGS since it defaults to injecting CFLAGS and -fno-plt breaks the modules
@@ -59,7 +47,7 @@ build() {
}
package() {
- cd "${_pkgname}-${__pkgname}-${pkgver}"
+ cd "${pkgname}-${_pkgname}-${pkgver}"
# install kernel modules
find . -name "*.ko" -exec install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" {} +
@@ -69,5 +57,5 @@ package() {
# load module on startup
install -dm 755 "${pkgdir}/usr/lib/modules-load.d"
- echo ${_pkgname} > "${pkgdir}/usr/lib/modules-load.d/${_pkgname}${_kernelname}.conf"
+ echo ${pkgname} > "${pkgdir}/usr/lib/modules-load.d/${pkgname}.conf"
}
diff --git a/libre/vhba-module/PKGBUILD b/libre/vhba-module/PKGBUILD
index 4efe21005..a2fd335d9 100644
--- a/libre/vhba-module/PKGBUILD
+++ b/libre/vhba-module/PKGBUILD
@@ -6,36 +6,25 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: Luke Shumaker <lukeshu@sbcglobal.net>
-_kernelname=
-
-if [[ ${_kernelname} == "" ]]; then
- _basekernel=4.14
- _archrel=31
- _parabolarel=1
-elif [[ ${_kernelname} == -lts ]]; then
- _basekernel=4.9
- _archrel=1
- _parabolarel=1
-fi
+_basekernel=4.14
+_archrel=31
+_parabolarel=2
pkgbase=vhba-module
+pkgname=(vhba-module vhba-module-dkms)
pkgver=20170610
pkgrel=${_archrel}.parabola${_parabolarel}.basekernel${_basekernel}
-_extramodules=extramodules-${_basekernel}${_kernelname}
-pkgdesc="Kernel module that emulates SCSI devices (built for the linux-libre${_kernelname} kernel package)"
+pkgdesc="Kernel module that emulates SCSI devices (built for the linux-libre kernel package)"
arch=('i686' 'x86_64' 'armv7h')
url="http://cdemu.sourceforge.net/"
license=('GPL')
# Generic (you shouldn't have to modify any of these variables)
_toohigh=$(IFS=. read a b <<<$_basekernel; echo $a.$((b+1)))
-makedepends=("linux-libre${_kernelname}-headers>=${_basekernel}" "linux-libre${_kernelname}-headers<${_toohigh}" "linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
+makedepends=("linux-libre-headers>=${_basekernel}" "linux-libre-headers<${_toohigh}" "linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
makedepends+=('libelf')
-if [[ ${_kernelname} != "" ]]; then
- provides=("${pkgbase}")
-fi
-
+_extramodules=extramodules-${_basekernel}
source=("https://downloads.sourceforge.net/cdemu/$pkgbase-$pkgver.tar.bz2"
'60-vhba.rules' 'dkms.conf')
sha256sums=('7970c93f989d9c4f2629371bf5ee7a76f95e4c12342c3320ddc528d0df02d9ec'
@@ -43,19 +32,16 @@ sha256sums=('7970c93f989d9c4f2629371bf5ee7a76f95e4c12342c3320ddc528d0df02d9ec'
'8cab0ebb4fee72069d63616b0983f105b98d1261e72e9bef5509a6e60bc382a7')
build() {
- cd "${pkgbase}-${pkgver}"
-
+ cd $pkgbase-$pkgver
make KERNELRELEASE="$(cat /usr/lib/modules/$_extramodules/version)"
}
-_package() {
- depends=("linux-libre${_kernelname}>=${_basekernel}" "linux-libre${_kernelname}<${_toohigh}")
- replaces=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
- conflicts=("${pkgbase}-libre${_kernelname}" "${pkgbase}-parabola${_kernelname}")
+package_vhba-module() {
+ depends=("linux-libre>=${_basekernel}" "linux-libre<${_toohigh}")
+ replaces=("${pkgbase}-libre" "${pkgbase}-parabola")
+ conflicts=("${pkgbase}-libre" "${pkgbase}-parabola")
- cd "${pkgbase}-${pkgver}"
-
- # Actually install
+ cd $pkgbase-$pkgver
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 vhba.ko
install -Dt "$pkgdir/usr/lib/udev/rules.d" -m644 ../60-vhba.rules
echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
@@ -63,28 +49,15 @@ _package() {
find "$pkgdir" -name '*.ko' -exec gzip -n {} +
}
-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
- echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
- }
+package_vhba-module-dkms() {
+ depends=(dkms)
+ provides=("vhba-module=$pkgver-$pkgrel")
+ conflicts=(vhba-module)
- 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
+ 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
+ echo 'g cdemu - -' | install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/cdemu.conf"
+}
# vim:set ts=2 sw=2 et: