Date: Saturday, February 29, 2020 @ 20:13:23 Author: heftig Revision: 587091
archrelease: copy trunk to community-testing-x86_64 Added: tp_smapi/repos/community-testing-x86_64/ tp_smapi/repos/community-testing-x86_64/PKGBUILD (from rev 587089, tp_smapi/trunk/PKGBUILD) ----------+ PKGBUILD | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) Copied: tp_smapi/repos/community-testing-x86_64/PKGBUILD (from rev 587089, tp_smapi/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2020-02-29 20:13:23 UTC (rev 587091) @@ -0,0 +1,50 @@ +# Maintainer: Lukas Fleischer <lfleisc...@archlinux.org> +# Contributor: xduugu +# Contributor: nh2 +# Contributor: Steven Davidovitz <steviedizzle ð gmail đ com> +# Contributor: Nick B <Shirakawasuna ð gmail đ com> +# Contributor: Christof Musik <christof ð senfdax đ de> +# Contributor: Stefan Rupp <archlinux ð stefanrupp đ de> +# Contributor: Ignas Anikevicius <anikevicius ð gmail đ com> + +pkgname=tp_smapi +pkgver=0.43 +pkgrel=182 +pkgdesc="Modules for ThinkPad's SMAPI functionality" +arch=('x86_64') +url='https://github.com/evgeni/tp_smapi' +license=('GPL') +makedepends=('linux-headers' 'git') +_commit=a63729ab30d85430048f65c37f29188ab484cd52 # tags/tp-smapi/0.43 +source=("git+https://github.com/evgeni/tp_smapi#commit=$_commit") +sha256sums=('SKIP') + +pkgver() { + cd $pkgname + git describe --tags | sed 's/^tp-smapi\///;s/-/+/g' +} + +build() { + cd $pkgname + + # 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 + + make HDAPS=1 KVER="$(</usr/src/linux/version)" EXTRA_CFLAGS= +} + +package() { + depends=('linux') + + local extradir=/usr/lib/modules/$(</usr/src/linux/version)/extramodules + cd $pkgname + + # install kernel modules + find . -name "*.ko" -exec install -Dt "$pkgdir$extradir" {} + + + # compress kernel modules + find "$pkgdir" -name "*.ko" -exec xz {} + + + # load module on startup + echo tp_smapi | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/$pkgname.conf" +}