[arch-commits] Commit in tp_smapi-lts/repos (3 files)

Andreas Radke andyrtr at archlinux.org
Sat May 5 18:37:05 UTC 2018


    Date: Saturday, May 5, 2018 @ 18:37:04
  Author: andyrtr
Revision: 318987

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 318986, tp_smapi-lts/trunk/PKGBUILD)
  tp_smapi-lts/repos/community-testing-x86_64/tp_smapi-lts.install
    (from rev 318986, 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 318986, tp_smapi-lts/trunk/PKGBUILD)
===================================================================
--- community-testing-x86_64/PKGBUILD	                        (rev 0)
+++ community-testing-x86_64/PKGBUILD	2018-05-05 18:37:04 UTC (rev 318987)
@@ -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.14-lts
+pkgrel=34
+pkgdesc="Modules for ThinkPad's SMAPI functionality"
+arch=('x86_64')
+url='https://github.com/evgeni/tp_smapi'
+license=('GPL')
+depends=('linux-lts>=4.14.39' 'linux-lts<4.15')
+makedepends=('linux-lts-headers>=4.14.39' '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 318986, 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-05-05 18:37:04 UTC (rev 318987)
@@ -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
+}



More information about the arch-commits mailing list