Commit 4a42f70c authored by Luca Giambonini's avatar Luca Giambonini

initial preparation for LTS kernel

removed all references of source ../linux-lts.conf
parent 8e73d7cf
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=acpi_call-lts
_pkgname=acpi_call
pkgver=1.1.0
pkgrel=8
pkgrel=9
pkgdesc="A kernel module that enables you to call parameterless ACPI methods by writing the method name to /proc/acpi/call, e.g. to turn off discrete graphics card in a dual graphics environment (like NVIDIA Optimus)."
arch=('x86_64')
url='http://github.com/mkottman/acpi_call'
license=('GPL')
depends=("linux-lts>=${_kernelver}")
depends=("linux-lts=${_kernelver}")
makedepends=("linux-lts-headers=${_kernelver}")
provides=("${pkgname%-*}")
install="${pkgname%-*}.install"
source=("acpi_call-$pkgver.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('d0d14b42944282724fca76f57d598eed794ef97448f387d1c489d85ad813f2f0')
_extramodules=extramodules-CHAKRA-LTS
source=("https://github.com/mkottman/acpi_call/archive/v${pkgver}.tar.gz")
md5sums=('f69d40e130b0e5ed17ce8adb19e6dda1')
prepare() {
cd ${pkgname%-*}-${pkgver}
# Fix build with Linux >= 3.17
sed -i 's|acpi/acpi.h|linux/acpi.h|' acpi_call.c
}
build() {
cd ${pkgname%-*}-${pkgver}
make KVERSION="${_kver}"
make KVERSION="$(cat /usr/lib/modules/$_extramodules/version)"
}
package() {
cd ${pkgname%-*}-${pkgver}
install -Dt "$pkgdir/usr/lib/modules/$_extramodules" -m644 *.ko
find "$pkgdir" -name '*.ko' -exec xz {} +
install -dm 755 "${pkgdir}"/usr/lib/{modules/${_extramodules},modules-load.d}
install -m 644 ${pkgname%-*}.ko "${pkgdir}"/usr/lib/modules/${_extramodules}/
gzip "${pkgdir}"/usr/lib/modules/${_extramodules}/${pkgname%-*}.ko
echo ${pkgname%-*} > "${pkgdir}"/usr/lib/modules-load.d/${pkgname}.conf
echo acpi_call | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/acpi_call.conf"
install -dm 755 "${pkgdir}"/usr/share/${pkgname}
cp -dr --no-preserve='ownership' {examples,support} "${pkgdir}"/usr/share/${pkgname}/
mkdir -p "$pkgdir/usr/share/acpi_call"
cp -t "$pkgdir/usr/share/acpi_call" -dr --no-preserve=ownership examples support
}
post_install() {
depmod -a
echo ""
echo "[+] modprobe acpi_call"
echo ">>> run /usr/bin/turn_off_gpu.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
......@@ -7,7 +6,6 @@ post_install() {
}
post_upgrade() {
depmod -a
echo ""
echo "[+] modprobe acpi_call"
echo ">>> run /usr/bin/turn_off_gpu.sh to test/view different acpi_call functions to see if it disables your secondary/hybrid video card"
......@@ -15,7 +13,6 @@ post_upgrade() {
}
post_remove() {
depmod -a
}
op=$1
......
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=bbswitch-lts
_pkgname=bbswitch
pkgver=0.8
pkgrel=11
pkgrel=12
pkgdesc="kernel module allowing to switch dedicated graphics card on Optimus laptops"
arch=('x86_64')
url='http://github.com/Bumblebee-Project/bbswitch'
license=('GPL')
provides=('bbswitch')
install=bbswitch.install
depends=("linux-lts=${_kernelver}")
_extramodules=extramodules-CHAKRA
depends=("linux-lts=4.4.147")
makedepends=("linux-lts-headers=${_kernelver}")
source=("https://github.com/Bumblebee-Project/bbswitch/archive/v${pkgver}.tar.gz")
md5sums=('5b116b31ace3604ddf9d1fc1f4bc5807')
build() {
cd ${srcdir}/${_pkgname}-${pkgver}
make KDIR=/usr/lib/modules/${_kver}/build KVERSION=${_kver}
cd ${srcdir}/${pkgname}-${pkgver}
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make KDIR="/usr/lib/modules/$KERNEL_VERSION/build/"
}
package() {
cd ${srcdir}/${_pkgname}-${pkgver}
msg2 "Building module for $_kver..."
cd ${srcdir}/${pkgname}-${pkgver}
msg2 "Building module for $_kver..."
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
mkdir -p $pkgdir/usr/lib/modules/${_extramodules}
install -D -m644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
#automatically update bbswitch.install
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/bbswitch.install"
# KDIR is necessary even when cleaning
#make KDIR=/usr/src/linux-${_kver} clean
install -Dm644 bbswitch.ko $pkgdir/usr/lib/modules/${_extramodules}/bbswitch.ko
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/bbswitch.ko"
}
post_install() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
\ No newline at end of file
# Source global configuration
source ../linux-lts.conf
pkgname=broadcom-wl-lts
pkgver=6.30.223.271
pkgrel=7
pkgrel=8
pkgdesc='Broadcom 802.11abgn hybrid Linux networking device driver'
arch=('x86_64')
url='http://www.broadcom.com/support/802.11/linux_sta.php'
license=('custom')
depends=("linux-lts=${_kernelver}")
depends=("linux-lts=4.4.147")
makedepends=("linux-lts-headers=${_kernelver}")
backup=('etc/modprobe.d/broadcom-wl-lts.conf')
install=install
_extramodules=extramodules-CHAKRA-LTS
source=("https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz"
#"http://ftp.de.debian.org/debian/pool/non-free/b/broadcom-sta/broadcom-sta_5.100.82.112.orig.tar.gz" "http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_${ARCH}-v${pkgver//./_}.tar.gz" we need the debian version, because upstream URL doesn't exist anymore
'modprobe.d'
......@@ -38,16 +35,19 @@ prepare() {
}
build() {
cd "${srcdir}"
make -C $_rootOfSourceTree M=`pwd`
cd "${srcdir}"
KERNEL_VERSION=$(</usr/lib/modules/extramodules-CHAKRA/version)
msg2 "Kernel = $KERNEL_VERSION"
make -C /usr/lib/modules/"${KERNEL_VERSION}"/build M=`pwd`
}
package() {
cd "${srcdir}"
cd "${srcdir}"
install -D -m 755 wl.ko "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/wl.ko"
install -Dm644 wl.ko "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
gzip "${pkgdir}/usr/lib/modules/$_extramodules/wl.ko"
install -D -m 644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -D -m 644 ${srcdir}/modprobe.d "${pkgdir}"/etc/modprobe.d/broadcom-wl-lts.conf
install -Dm644 lib/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 modprobe.d "${pkgdir}/usr/lib/modprobe.d/broadcom-wl.conf"
}
post_upgrade() {
cd lib/modules
for i in extramodules-*; do depmod "$(cat "$i/version")"; done
cd ../..
}
post_install() {
post_upgrade
}
......@@ -53,9 +53,14 @@ build()
git reset HEAD PKGBUILD
git checkout PKGBUILD
_rel=$(cat PKGBUILD | grep pkgrel= | cut -d= -f2)
#sed -i -e "s/pkgrel=$_rel/pkgrel=$(($_rel+1))/" PKGBUILD
sed -i -e "s/pkgrel=$_rel/pkgrel=$(($_rel+1))/" PKGBUILD
sed -e "s/\(depends=([^>]*linux=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(depends=([^>]*linux-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
git add PKGBUILD
popd &>/dev/null
continue
......@@ -70,6 +75,9 @@ build()
sed -e "s/\(depends=([^>]*linux=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(depends=([^>]*linux-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
sed -e "s/\(makedepends=([^>]*linux-headers-lts=\)[^\"]*/\1$_kernelver/" -i PKGBUILD
# update source link
#sed -r "s|https://download.kde.org/.*stable/|https://download.kde.org/${Branch}/|g" -i PKGBUILD
......
......@@ -6,7 +6,7 @@
# These are the "basic variables" appliable for the LTS kernal group
_kernelname="-CHAKRA-LTS"
_kernelver=4.4.115
_kernelver=4.4.147
_basekernel=4.4
_extramodules=extramodules-${_basekernel}${_kernelname}
......
......@@ -12,13 +12,14 @@
#
#core_packages
#linux-lts
vhba-module-lts
broadcom-wl-lts
acpi_call-lts
ndiswrapper-lts
linux-lts
+vhba-module-lts
+broadcom-wl-lts
+acpi_call-lts
+ndiswrapper-lts
bbswitch-lts
nvidia-lts
nvidia-304xx-lts
nvidia-340xx-lts
+bbswitch-lts
+nvidia-lts
+nvidia-304xx-lts
+nvidia-340xx-lts
+nvidia-390xx-lts
# Source global configuration
source ../linux-lts.conf
pkgbase="linux-lts"
pkgname=('linux-lts' 'linux-lts-headers' 'linux-lts-docs')
pkgver=${_kernelver}
_srcname=linux-${_basekernel}
pkgver=4.4.147
_srcname=linux-4.4
pkgrel=1
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
arch=('x86_64')
......@@ -12,7 +10,7 @@ license=('GPL2')
url="http://www.kernel.org"
options=('!strip')
source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.{xz,sign}
http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz
# the main kernel config files
config.x86_64
# standard config files for mkinitcpio ramdisk
......@@ -20,8 +18,7 @@ source=(http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.{xz,sign}
change-default-console-loglevel.patch)
md5sums=('9a78fa2eb6c68ca5a40ed5af08142599'
'SKIP'
'6f3e057f552161d8dbc534f58b50f107'
'SKIP'
'a38b9535d049266b3eb81d5b89335d61'
'99d3696dce99d4eebf297fc542f6b22d'
'232b52576a62c7a333e9fe7a1e1ca359'
'df7fceae6ee5d7e7be7b60ecd7f6bb35')
......@@ -30,8 +27,10 @@ validpgpkeys=(
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
)
_kernelname=-CHAKRA-LTS
prepare() {
cd ${srcdir}/linux-$_basekernel
cd ${srcdir}/$_srcname
# add upstream patch
msg "adding upstream patch"
......@@ -86,7 +85,7 @@ prepare() {
}
build() {
cd ${srcdir}/linux-$_basekernel
cd ${srcdir}/$_srcname
make ${MAKEFLAGS} LOCALVERSION= bzImage modules
}
......@@ -106,7 +105,7 @@ package_linux-lts() {
backup=("etc/mkinitcpio.d/${pkgbase}.preset")
install=${pkgname}.install
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
KARCH=x86
......@@ -162,7 +161,7 @@ package_linux-lts-headers() {
install -dm755 "${pkgdir}/usr/lib/modules/${_kernver}"
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
install -D -m644 Makefile \
"${pkgdir}/usr/lib/modules/${_kernver}/build/Makefile"
install -D -m644 kernel/Makefile \
......@@ -284,7 +283,7 @@ package_linux-lts-headers() {
package_linux-lts-docs() {
pkgdesc="Kernel hackers manual - HTML documentation that comes with the Linux lts-kernel."
cd "${srcdir}/linux-${_basekernel}"
cd "${srcdir}/$_srcname"
mkdir -p "${pkgdir}/usr/lib/modules/${_kernver}/build"
cp -al Documentation "${pkgdir}/usr/lib/modules/${_kernver}/build"
......
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=ndiswrapper-lts
_pkgname=ndiswrapper
pkgver=1.61
pkgrel=4
pkgrel=5
pkgdesc="Module for NDIS (Windows Network Drivers) drivers supplied by vendors. For linux-lts."
license=('GPL')
arch=('x86_64')
url="http://ndiswrapper.sourceforge.net"
install="ndiswrapper.install"
depends=("linux-lts=${_kernelver}")
depends=("linux-lts=4.4.147")
makedepends=("linux-lts-headers=${_kernelver}")
source=("http://downloads.sourceforge.net/sourceforge/ndiswrapper/ndiswrapper-$pkgver.tar.gz")
sha1sums=('213854ca8a83f9b5972db8fa873d346124e4bcb5')
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
#patch -p1 -i ../ndiswrapper-1.59.patch
......@@ -24,17 +22,14 @@ prepare() {
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
make -C driver KVERS_UNAME=${_kver}
cd ndiswrapper-$pkgver
make -C driver KVERS_UNAME=${KERNEL_VERSION}
make -C utils
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD=${_rootOfSourceTree} INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$_kver DESTDIR="$pkgdir/" install
cd ndiswrapper-$pkgver
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" \
"${startdir}/ndiswrapper.install"
make sbindir=usr/sbin usrsbindir=usr/bin KBUILD="/usr/lib/modules/$KERNEL_VERSION/build/" INST_DIR="usr/lib/modules/$_extramodules" \
KVERS=$KERNEL_VERSION DESTDIR="$pkgdir/" install
}
post_install()
{
post_upgrade
}
post_upgrade()
{
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove()
{
post_upgrade
}
pkgname=nvidia-304xx-lts
pkgver=304.137
pkgrel=3
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-304xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
license=('custom')
_extramodules=extramodules-CHAKRA-LTS
_pkg="NVIDIA-Linux-${arch}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${arch}/${pkgver}/${_pkg}.run")
md5sums=('485506ee6a7c54780488dacddf1d56b1')
prepare() {
cd "${srcdir}"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
sh "${_pkg}.run" --extract-only
cd "${_pkg}"
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/etc/modprobe.d"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/nvidia.ko"
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
}
# Maintainer: Neophytos Kolokotronis <tetris4 AT gmail DOT com>
# Source global configuration
source ../linux-lts.conf
pkgname=nvidia-340xx-lts
pkgver=340.106
pkgrel=1
pkgrel=2
pkgdesc="NVIDIA drivers for linux."
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-340xx-utils=${pkgver}")
depends=("linux-lts=4.4.147" "nvidia-340xx-utils=${pkgver}")
makedepends=("linux-lts-headers=${_kernelver}")
conflicts=('nvidia-304xx-lts' 'nvidia-lts')
license=('custom')
install=nvidia.install
_extramodules=extramodules-CHAKRA-LTS
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/${_pkg}.run")
md5sums=('37c84428b64696be2b104edbc9855f57')
......@@ -23,12 +20,15 @@ prepare() {
cd "${_pkg}"
}
build() {
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
cd uvm
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
......@@ -38,6 +38,6 @@ package() {
"${pkgdir}/usr/lib/modules/${_extramodules}/nvidia-uvm.ko"
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
}
post_install() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
}
post_upgrade() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo "blacklist nouveau" > "/etc/modprobe.d/nouveau_blacklist.conf"
echo -e '\e[31;46m WARNING'
echo -e '\e[31;46m If your card is from the 7xxx series or earlier, switch to nvidia-304xx-lts'
echo -e '\e[31;46m pacman -S nvidia-304xx-lts'
echo -e '\e[0m'
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
rm "/etc/modprobe.d/nouveau_blacklist.conf"
}
# $Id: PKGBUILD 323392 2018-05-05 18:28:00Z andyrtr $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Source global configuration
source ../linux-lts.conf
pkgname=nvidia-390xx-lts
pkgver=390.59
pkgver=390.77
pkgrel=1
pkgdesc="NVIDIA drivers for linux-lts, 390xx legacy branch"
arch=('x86_64')
......@@ -15,6 +10,7 @@ makedepends=("linux-lts-headers=${_kernelver}")
conflicts=('nvidia-340xx-lts' 'nvidia-lts')
license=('custom')
options=('!strip')
_extramodules=extramodules-CHAKRA-LTS
source=("http://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Linux-x86_64-${pkgver}-no-compat32.run")
sha512sums=('65b92ec7f9488a98a8579efcf5b00aca42945b1d0fd0f58aacebf45c772b0b896af8bbac3abec126a931752ef9504a727fac89220c115ff474c0521f3c214d99')
......@@ -26,8 +22,11 @@ prepare() {
}
build() {
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
......
# Source global configuration
source ../linux-lts.conf
pkgname=('nvidia-lts')
pkgdesc=('NVIDIA drivers for linux-lts')
pkgver=390.25
pkgver=396.51
pkgrel=1
arch=('x86_64')
url="http://www.nvidia.com/"
depends=("linux-lts=${_kernelver}" "nvidia-utils=${pkgver}" 'libglvnd')
depends=("linux-lts=4.4.147" "nvidia-utils=${pkgver}" 'libglvnd')
makedepends=("linux-lts-headers=${_kernelver}")
install=nvidia.install
_extramodules=extramodules-CHAKRA-LTS
license=('custom')
_pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32"
......@@ -26,19 +23,21 @@ prepare() {
}
build() {
_kver="$(cat /usr/lib/modules/${_extramodules}/version)"
cd "${_pkg}/kernel"
make SYSSRC=/usr/lib/modules/"${_kver}/build" module
KERNEL_VERSION=$(</usr/lib/modules/$_extramodules/version)
msg2 "Kernel = $KERNEL_VERSION"
make SYSSRC=/usr/lib/modules/$KERNEL_VERSION/build module
}
package() {
for ko in nvidia nvidia-uvm nvidia-modeset nvidia-drm; do
install -Dm644 "${srcdir}/${_pkg}/kernel/${ko}.ko" \
"${pkgdir}/usr/lib/modules/${_extramodules}/${ko}.ko"
done
gzip "${pkgdir}/usr/lib/modules/${_extramodules}/"*.ko
package_nvidia() {
install -Dt "${pkgdir}/usr/lib/modules/${_extramodules}" -m644 \
"${srcdir}/${_pkg}/kernel"/nvidia{,-modeset,-drm,-uvm}.ko
find "${pkgdir}" -name '*.ko' -exec gzip -n {} +
echo "blacklist nouveau" |
install -Dm644 /dev/stdin "${pkgdir}/usr/lib/modprobe.d/${pkgname}.conf"
install -d -m755 "${pkgdir}/usr/lib/modprobe.d"
install -Dt "${pkgdir}/usr/share/licenses/${pkgname}" -m644 "${srcdir}/${_pkg}/LICENSE"
echo "blacklist nouveau" >> "${pkgdir}/usr/lib/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
}
# Source global configuration
source ../linux-lts.conf
pkgname=vhba-module-lts
_pkgname=vhba-module
pkgver=20170610
pkgrel=3
pkgrel=4
pkgdesc="Kernel module that emulates SCSI devices"
arch=('x86_64')
url="http://cdemu.sourceforge.net/"
......
post_install() {
echo ">> Place 'vhba' in MODULES= in /etc/rc.conf to enable vhba on system boot."
echo ">> This module needs to be recompiled for every kernel version upgrade."
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_upgrade() {
post_install
}
post_remove() {
EXTRAMODULES='extramodules-4.4-CHAKRA-LTS'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment