Date: Sunday, February 4, 2018 @ 12:02:17
  Author: heftig
Revision: 288964

archrelease: copy trunk to community-staging-x86_64

Added:
  tp_smapi/repos/community-staging-x86_64/
  tp_smapi/repos/community-staging-x86_64/PKGBUILD
    (from rev 288963, tp_smapi/trunk/PKGBUILD)

----------+
 PKGBUILD |   49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

Copied: tp_smapi/repos/community-staging-x86_64/PKGBUILD (from rev 288963, 
tp_smapi/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD                           (rev 0)
+++ community-staging-x86_64/PKGBUILD   2018-02-04 12:02:17 UTC (rev 288964)
@@ -0,0 +1,49 @@
+# 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.42+7+g76c5120
+_extradir=/usr/lib/modules/extramodules-4.15-ARCH
+pkgrel=2
+pkgdesc="Modules for ThinkPad's SMAPI functionality"
+arch=('x86_64')
+url='https://github.com/evgeni/tp_smapi'
+license=('GPL')
+depends=('linux>=4.15' 'linux<4.16')
+makedepends=('linux-headers>=4.15' 'linux-headers<4.16' 'git')
+_commit=76c5120f7be4880cf2c6801f872327e4e70c449f  # master
+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="$(<$_extradir/version)" EXTRA_CFLAGS=
+}
+
+package() {
+  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"
+}

Reply via email to