[arch-commits] Commit in tp_smapi-lts/repos (3 files)
Andreas Radke
andyrtr at archlinux.org
Tue Dec 5 16:49:22 UTC 2017
Date: Tuesday, December 5, 2017 @ 16:49:21
Author: andyrtr
Revision: 272254
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 272253, tp_smapi-lts/trunk/PKGBUILD)
tp_smapi-lts/repos/community-testing-x86_64/tp_smapi-lts.install
(from rev 272253, 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 272253, tp_smapi-lts/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD (rev 0)
+++ community-testing-x86_64/PKGBUILD 2017-12-05 16:49:21 UTC (rev 272254)
@@ -0,0 +1,48 @@
+# Maintainer: Lukas Fleischer <lfleischer at 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.9-lts
+pkgrel=23
+pkgdesc="Modules for ThinkPad's SMAPI functionality"
+arch=('x86_64')
+url='https://github.com/evgeni/tp_smapi'
+license=('GPL')
+depends=('linux-lts>=4.9.67' 'linux-lts<4.10')
+makedepends=('linux-lts-headers>=4.9.67' 'linux-lts-headers<4.10')
+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 272253, 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 2017-12-05 16:49:21 UTC (rev 272254)
@@ -0,0 +1,13 @@
+extramodules=/usr/lib/modules/extramodules-4.9-lts
+
+post_install() {
+ depmod -v $(< "$extramodules/version") &>/dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
More information about the arch-commits
mailing list