Date: Friday, February 23, 2018 @ 18:51:11 Author: andyrtr Revision: 297250
archrelease: copy trunk to community-testing-x86_64 Added: tp_smapi-lts/repos/community-testing-x86_64/ tp_smapi-lts/repos/community-testing-x86_64/PKGBUILD (from rev 297249, tp_smapi-lts/trunk/PKGBUILD) tp_smapi-lts/repos/community-testing-x86_64/tp_smapi-lts.install (from rev 297249, tp_smapi-lts/trunk/tp_smapi-lts.install) ----------------------+ PKGBUILD | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ tp_smapi-lts.install | 13 +++++++++++++ 2 files changed, 61 insertions(+) Copied: tp_smapi-lts/repos/community-testing-x86_64/PKGBUILD (from rev 297249, tp_smapi-lts/trunk/PKGBUILD) =================================================================== --- community-testing-x86_64/PKGBUILD (rev 0) +++ community-testing-x86_64/PKGBUILD 2018-02-23 18:51:11 UTC (rev 297250) @@ -0,0 +1,48 @@ +# 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-lts +_pkgname=tp-smapi +pkgver=0.42 +_extradir=/usr/lib/modules/extramodules-4.14-lts +pkgrel=31 +pkgdesc="Modules for ThinkPad's SMAPI functionality" +arch=('x86_64') +url='https://github.com/evgeni/tp_smapi' +license=('GPL') +depends=('linux-lts>=4.14.21' 'linux-lts<4.15') +makedepends=('linux-lts-headers>=4.14.21' 'linux-lts-headers<4.15') +install="$pkgname.install" +source=("$_pkgname-$pkgver.tar.gz::https://github.com/evgeni/${pkgname/-lts/}/archive/$_pkgname/$pkgver.tar.gz") +md5sums=('6a51d3aa459ad7a6ebfbb8c29527b3ee') + +build() { + cd ${pkgname/-lts/}-$_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 + + make HDAPS=1 KVER="$(<$_extradir/version)" EXTRA_CFLAGS= +} + +package() { + cd ${pkgname/-lts/}-$_pkgname-$pkgver + + # install kernel modules + find . -name "*.ko" -exec install -Dt "$pkgdir$_extradir" {} + + + # compress kernel modules + find "$pkgdir" -name "*.ko" -exec gzip -n -9 {} + + + # load module on startup + echo tp_smapi | install -Dm644 /dev/stdin "$pkgdir/usr/lib/modules-load.d/$pkgname.conf" + + # update kernel version in install file + sed -ri "s|^(extramodules=).*\$|\1$_extradir|" "$startdir/$pkgname.install" +} Copied: tp_smapi-lts/repos/community-testing-x86_64/tp_smapi-lts.install (from rev 297249, tp_smapi-lts/trunk/tp_smapi-lts.install) =================================================================== --- community-testing-x86_64/tp_smapi-lts.install (rev 0) +++ community-testing-x86_64/tp_smapi-lts.install 2018-02-23 18:51:11 UTC (rev 297250) @@ -0,0 +1,13 @@ +extramodules=/usr/lib/modules/extramodules-4.14-lts + +post_install() { + depmod -v $(< "$extramodules/version") &>/dev/null +} + +post_upgrade() { + post_install +} + +post_remove() { + post_install +}