summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2021-10-03 08:23:17 -0600
committerMark Wagie2021-10-03 08:23:17 -0600
commite52a7e9734839b1d86e68c61f879e05209da7f4e (patch)
tree369913e54a95a9958d4b94b9a81f6aea449c34a3
parent1185295b055e6358d4bc7fafd399bb4d91d66cca (diff)
downloadaur-e52a7e9734839b1d86e68c61f879e05209da7f4e.tar.gz
PKGBUILD improvements
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD53
-rw-r--r--dkms.conf7
-rw-r--r--system76.conf2
5 files changed, 36 insertions, 47 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a908a4d6810e..ed542aa66162 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,15 @@
pkgbase = system76-dkms-git
- pkgdesc = The system76 driver kernel module (DKMS)
- pkgver = 85
+ pkgdesc = On newer System76 laptops, this driver controls some of the hotkeys and allows for custom fan control.
+ pkgver = 1.0.13.r0.g68bd479
pkgrel = 1
url = https://github.com/pop-os/system76-dkms
- arch = i686
arch = x86_64
license = GPL2
makedepends = git
depends = dkms
provides = system76-dkms
conflicts = system76-dkms
- source = system76::git+https://github.com/pop-os/system76-dkms.git#branch=master
- source = dkms.conf
- source = system76.conf
- md5sums = SKIP
- md5sums = 654623daac5a4c9d69883d7b2b5ddac8
- md5sums = 1e988cc5cf05cec741f78fe90f2054d7
+ source = git+https://github.com/pop-os/system76-dkms.git
+ sha256sums = SKIP
pkgname = system76-dkms-git
-
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4dab8d6386e3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
diff --git a/PKGBUILD b/PKGBUILD
index 5386b91e5942..39432dd348e9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,45 +1,42 @@
-# Maintainer: Shaleen Jain <shaleen(at)jain(dot)sh>
-
-_pkgname=system76
-_pkgbase=system76-dkms
+# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
+# Contributor: Shaleen Jain <shaleen(at)jain(dot)sh>
pkgname=system76-dkms-git
-pkgver=85
+pkgver=1.0.13.r0.g68bd479
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')
depends=('dkms')
makedepends=('git')
-conflicts=("${_pkgbase}")
-provides=("${_pkgbase}")
-source=("system76::git+https://github.com/pop-os/system76-dkms.git#branch=master"
- '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 "$srcdir/${pkgname%-git}"
+ git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
package() {
- local install_dir="${pkgdir}/usr/src/${_pkgname}-${pkgver}"
+ local install_dir="$pkgdir/usr/src/system76-${pkgver//.r*/}"
+
+ cd "$srcdir/${pkgname%-git}"
- # 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"
}
diff --git a/dkms.conf b/dkms.conf
deleted file mode 100644
index a3117ffc852e..000000000000
--- a/dkms.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-PACKAGE_NAME="@_PKGBASE@"
-PACKAGE_VERSION="@PKGVER@"
-MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build modules"
-CLEAN="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build clean"
-BUILT_MODULE_NAME[0]="@_PKGBASE@"
-DEST_MODULE_LOCATION[0]="/kernel/drivers/misc"
-AUTOINSTALL="yes"
diff --git a/system76.conf b/system76.conf
deleted file mode 100644
index 62481f7da20a..000000000000
--- a/system76.conf
+++ /dev/null
@@ -1,2 +0,0 @@
-# Load the system76 driver module
-system76