This repository has been archived by the owner on May 20, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
archrelease: copy trunk to community-testing-x86_64
git-svn-id: file:///srv/repos/svn-community/svn@1315603 9fca08f4-af9d-4005-b8df-a31f2cc04f65
- Loading branch information
andyrtr
committed
Sep 28, 2022
1 parent
253694a
commit b409a6f
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Maintainer: Lukas Fleischer <lfleischer@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 | ||
pkgver=0.43 | ||
pkgrel=272 | ||
pkgdesc="Modules for ThinkPad's SMAPI functionality" | ||
arch=('x86_64') | ||
url='https://github.com/evgeni/tp_smapi' | ||
license=('GPL') | ||
makedepends=('linux-lts-headers' 'git') | ||
_commit=a63729ab30d85430048f65c37f29188ab484cd52 # tags/tp-smapi/0.43 | ||
source=("git+https://github.com/evgeni/tp_smapi#commit=$_commit") | ||
sha256sums=('SKIP') | ||
|
||
pkgver() { | ||
cd tp_smapi | ||
git describe --tags | sed 's/^tp-smapi\///;s/-/+/g' | ||
} | ||
|
||
build() { | ||
cd tp_smapi | ||
|
||
# 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-lts/version)" EXTRA_CFLAGS= | ||
} | ||
|
||
package() { | ||
depends=('linux-lts') | ||
|
||
local extradir=/usr/lib/modules/$(</usr/src/linux-lts/version)/extramodules | ||
cd tp_smapi | ||
|
||
# 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" | ||
} |