summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD56
1 files changed, 27 insertions, 29 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 035c906a1fd3..1398c86395c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,43 @@
-# Maintainer: Shaleen Jain <shaleen(at)jain(dot)sh>
-
-_pkgname=system76
-_pkgbase=system76-dkms
+# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
+# Co-Maintainer: Tony Lambiris <tony@libpcap.net>
+# Contributor: Shaleen Jain <shaleen(at)jain(dot)sh>
pkgname=system76-dkms-git
-pkgver=73
+pkgver=1.0.13.r4.g8c2ff21
pkgrel=1
-pkgdesc="The system76 driver kernel module (DKMS)"
-arch=('i686' 'x86_64')
+pkgdesc="On newer System76 laptops, this driver controls some of the hotkeys and allows for custom fan control."
+arch=('x86_64')
url="https://github.com/pop-os/system76-dkms"
-license=('GPL2')
+license=('GPL-2.0-or-later')
depends=('dkms')
makedepends=('git')
-conflicts=("${_pkgbase}")
-provides=("${_pkgbase}")
-source=("system76::git+https://github.com/pop-os/system76-dkms.git#branch=master_bionic"
- 'dkms.conf'
- 'system76.conf')
-md5sums=('SKIP'
- '654623daac5a4c9d69883d7b2b5ddac8'
- '1e988cc5cf05cec741f78fe90f2054d7')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=('git+https://github.com/pop-os/system76-dkms.git')
+sha256sums=('SKIP')
pkgver() {
- cd ${srcdir}/${_pkgname}
- git rev-list --count HEAD
+ cd "${pkgname%-git}"
+
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}
package() {
- local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"
+ cd "${pkgname%-git}"
+ local install_dir="$pkgdir/usr/src/system76-${pkgver//.r*/}"
- # Copy dkms.conf
- install -Dm644 dkms.conf ${install_dir}/dkms.conf
+ # Install source files
+ for file in {Makefile,*.c,*.h}; do
+ [ -f "$file" ] || continue
+ install -Dm644 -t "$install_dir/" "$file"
+ done
- # Set name and version
- sed -e "s/@_PKGBASE@/${_pkgname}/" \
- -e "s/@PKGVER@/${pkgver}/" \
- -i "${install_dir}"/dkms.conf
+ # Install udev hwdb files
+ install -Dm644 lib/udev/hwdb.d/*.hwdb -t "$pkgdir/usr/lib/udev/hwdb.d/"
- # Copy sources (including Makefile)
- cp ${_pkgname}/*.c ${install_dir}/
- cp ${_pkgname}/Makefile ${install_dir}/Makefile
+ # Edit and install dkms configuration
+ sed "s/#MODULE_VERSION#/${pkgver//.r*/}/" "debian/${pkgname%-git}.dkms" > "$install_dir/dkms.conf"
# Load the module at boot
- install -Dm644 system76.conf ${pkgdir}/etc/modules-load.d/system76.conf
+ install -Dm644 "usr/share/initramfs-tools/modules.d/${pkgname%-git}.conf" \
+ "$pkgdir/etc/modules-load.d/system76.conf"
}