diff options
author | Tony Lambiris | 2021-08-04 20:24:16 -0400 |
---|---|---|
committer | Tony Lambiris | 2021-08-04 20:24:16 -0400 |
commit | fc6fd55ef1109f4e9299d08dcf1d4f0c98e87e9e (patch) | |
tree | 93c3ac10750f9d932a84d681ab9b7f639a7821e5 | |
parent | 2c36ae22a3242b9ccb0d1e99566fe69cdd09314f (diff) | |
download | aur-fc6fd55ef1109f4e9299d08dcf1d4f0c98e87e9e.tar.gz |
Version bump
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | PKGBUILD | 144 | ||||
-rw-r--r-- | actions.patch | 34 |
3 files changed, 135 insertions, 79 deletions
@@ -1,43 +1,49 @@ pkgbase = system76-driver-git pkgdesc = System76 Driver for System76 computers pkgver = 20.04.40.r0.g9a2d421 - pkgrel = 1 + pkgrel = 2 url = https://github.com/pop-os/system76-driver - install = system76-driver-git.install arch = any license = GPL + depends = at + depends = dmidecode + depends = ethtool + depends = grub + depends = gtk3 + depends = lm_sensors + depends = pciutils + depends = polkit depends = python>=3.6 depends = python-cffi depends = python-dbus + depends = python-distro depends = python-evdev depends = python-gobject depends = python-pynacl depends = python-systemd depends = python-xlib - depends = dmidecode - depends = at - depends = tlp - depends = system76-dkms - depends = system76-io-dkms depends = system76-firmware-daemon - depends = firmware-manager-git + depends = usbutils + depends = wireless_tools + optdepends = firmware-manager: Manage System76 firmware updates via standalone application + optdepends = gnome-control-center-system76: Manage System76 firmware updates via Settings optdepends = pm-utils: For power management features - optdepends = gtk3: To launch System76 driver and firmware GUI - optdepends = grub: To apply kernel boot time parameters - optdepends = polkit: Run System76 Driver GUI from application menu optdepends = pulseaudio: To apply microphone fix + optdepends = system76-dkms: Control hotkeys and fan on certain System76 laptops + optdepends = system76-acpi-dkms: Provides the system76_acpi in-tree driver + optdepends = system76-io-dkms: Enable System76 I/O daughterboard + optdepends = system76-oled: Control brightness on OLED displays + optdepends = system76-power: System76 Power Management optdepends = xorg-xhost: To enable GUI applications on Wayland optdepends = xorg-xbacklight: To use the backlight service provides = system76-driver conflicts = system76-driver source = system76-driver-git::git+https://github.com/pop-os/system76-driver.git - source = galu1.patch - source = gtk.patch + source = actions.patch source = cli.patch source = wayland.patch sha256sums = SKIP - sha256sums = 2ccf53ec0ffdeea00930d218253f5b3db2bdc7d3405e8353caabc36107f3ab26 - sha256sums = 14c6d669b5a4a5b4a306978ebdad7e26d939e8e559de52274aec26cd5b2ea853 + sha256sums = 3ade740c1681f8f33ef78e1e6c087e4002d14c888d7a5bf6bfbeb2aa70111119 sha256sums = ef027346c439561dc01f906ae7bd961100aedf9125fd86bb0eb89a87b683fdc3 sha256sums = 2ffbd813744c0b99416947a2755767767af434758aa20dcfafefb49fb367d5d3 @@ -2,102 +2,118 @@ pkgname=system76-driver-git pkgver=20.04.40.r0.g9a2d421 -pkgrel=1 +pkgrel=2 pkgdesc="System76 Driver for System76 computers" arch=('any') url="https://github.com/pop-os/system76-driver" license=('GPL') -install=system76-driver-git.install conflicts=("system76-driver") provides=("system76-driver") depends=( - 'python>=3.6' - 'python-cffi' - 'python-dbus' - 'python-evdev' - 'python-gobject' - 'python-pynacl' - 'python-systemd' - 'python-xlib' - 'dmidecode' - 'at' - 'tlp' - 'system76-dkms' - 'system76-io-dkms' - 'system76-firmware-daemon' - 'firmware-manager-git') -makepdepends=('python-pyflakes') + 'at' + 'dmidecode' + 'ethtool' + 'grub' + 'gtk3' + 'lm_sensors' + 'pciutils' + 'polkit' + 'python>=3.6' + 'python-cffi' + 'python-dbus' + 'python-distro' + 'python-evdev' + 'python-gobject' + 'python-pynacl' + 'python-systemd' + 'python-xlib' + 'system76-firmware-daemon' + 'usbutils' + 'wireless_tools' +) +makepdepends=( + 'python-pyflakes' +) optdepends=( - 'pm-utils: For power management features' - 'gtk3: To launch System76 driver and firmware GUI' - 'grub: To apply kernel boot time parameters' - 'polkit: Run System76 Driver GUI from application menu' - 'pulseaudio: To apply microphone fix' - 'xorg-xhost: To enable GUI applications on Wayland' - 'xorg-xbacklight: To use the backlight service') + 'firmware-manager: Manage System76 firmware updates via standalone application' + 'gnome-control-center-system76: Manage System76 firmware updates via Settings' + 'pm-utils: For power management features' + 'pulseaudio: To apply microphone fix' + 'system76-dkms: Control hotkeys and fan on certain System76 laptops' + 'system76-acpi-dkms: Provides the system76_acpi in-tree driver' + 'system76-io-dkms: Enable System76 I/O daughterboard' + 'system76-oled: Control brightness on OLED displays' + 'system76-power: System76 Power Management' + 'xorg-xhost: To enable GUI applications on Wayland' + 'xorg-xbacklight: To use the backlight service' +) source=("${pkgname}::git+https://github.com/pop-os/system76-driver.git" - 'galu1.patch' - 'gtk.patch' + 'actions.patch' 'cli.patch' 'wayland.patch') sha256sums=('SKIP' - '2ccf53ec0ffdeea00930d218253f5b3db2bdc7d3405e8353caabc36107f3ab26' - '14c6d669b5a4a5b4a306978ebdad7e26d939e8e559de52274aec26cd5b2ea853' + '3ade740c1681f8f33ef78e1e6c087e4002d14c888d7a5bf6bfbeb2aa70111119' 'ef027346c439561dc01f906ae7bd961100aedf9125fd86bb0eb89a87b683fdc3' '2ffbd813744c0b99416947a2755767767af434758aa20dcfafefb49fb367d5d3') pkgver() { - cd "${srcdir}/${pkgname}" + cd "${srcdir}/${pkgname}" - git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd "${srcdir}/${pkgname}" + cd "${srcdir}/${pkgname}" - # patch for cli version - enable override vendor/model via /etc/system76-daemon.json - msg2 ${srcdir}/cli.patch - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/cli.patch + # patch for cli version - enable override vendor/model via /etc/system76-daemon.json + patch --no-backup-if-mismatch -Np1 -i "${srcdir}/cli.patch" - # galu1 model-specific patch - msg2 ${srcdir}/galu1.patch - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/galu1.patch + # Use xhost for GUI apps on Wayland + patch --no-backup-if-mismatch -Np1 -i "${srcdir}/wayland.patch" - # enabling "Restore System" button if all changes applied - msg2 ${srcdir}/gtk.patch - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/gtk.patch + # Use mkinitcpio instead of initramfs-tools + patch --no-backup-if-mismatch -Np1 -i "${srcdir}/actions.patch" +} + +build() { + cd "${srcdir}/${pkgname}" - # Use xhost for GUI apps on Wayland - msg2 ${srcdir}/wayland.patch - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/wayland.patch + python setup.py build } package() { - cd "${srcdir}/${pkgname}" + cd "${srcdir}/${pkgname}" + + # Install base package + export PYTHONHASHSEED=0 + python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build - # Build and install base package - python setup.py install --prefix=/usr --root=${pkgdir} --optimize=1 + local _pkgname="${pkgname%%-git}" - # Install daemons and executables - install -m755 -D system76-daemon ${pkgdir}/usr/lib/system76-driver/system76-daemon - #install -m755 -D system76-backlight-daemon ${pkgdir}/usr/lib/system76-driver/system76-backlight-daemon - install -m755 -D system76-driver-pkexec ${pkgdir}/usr/bin/system76-driver-pkexec + # Install daemons and executables + install -Dm755 system76-daemon -t "${pkgdir}/usr/lib/${_pkgname}" + install -Dm755 system76-user-daemon -t "${pkgdir}/usr/lib/${_pkgname}" + install -Dm755 system76-driver-pkexec -t "${pkgdir}/usr/bin" - # Install systemd unit files - # Note: system76-driver* service files shortened to system76* - install -m644 -D debian/system76-driver.service ${pkgdir}/usr/lib/systemd/system/system76.service - #install -m644 -D debian/system76-driver-backlight.service ${pkgdir}/usr/lib/systemd/user/system76-backlight.service + # Install systemd unit files + # Note: system76-driver* service files shortened to system76* + install -Dm644 debian/system76-driver.service \ + "${pkgdir}/usr/lib/systemd/system/system76.service" - # Install scripts and configuration - install -m755 -D system76-nm-restart ${pkgdir}/usr/lib/system76-driver/system76-nm-restart - install -m644 -D com.system76.pkexec.system76-driver.policy ${pkgdir}/usr/share/polkit-1/actions/com.system76.pkexec.system76-driver.policy + # Install scripts and configuration + install -Dm755 system76-nm-restart "${pkgdir}/usr/lib/${_pkgname}" + install -Dm755 system76-thunderbolt-reload -t "${pkgdir}/usr/lib/${_pkgname}" + install -Dm644 com.system76.pkexec.system76-driver.policy -t \ + "${pkgdir}/usr/share/polkit-1/actions" - # Install desktop shortcuts - #install -m644 -D system76-driver-backlight.desktop ${pkgdir}/usr/share/applications/system76-backlight.desktop + # Install application launchers + install -Dm644 system76-driver.desktop -t "${pkgdir}/etc/xdg/autostart" + install -Dm644 system76-user-daemon.desktop -t "${pkgdir}/etc/xdg/autostart" - # Create /var/lib/system76-driver directory for brightness settings saving - install -m755 -d ${pkgdir}/var/lib/system76-driver + # Create /var/lib/system76-driver directory for brightness settings saving + install -dm755 "${pkgdir}/var/lib/${_pkgname}" - # Clean up - rm -rf ${pkgdir}/usr/lib/python*/site-packages/system76driver/{__pycache__,tests} + # Remove tests + local site_packages="$(python -c 'import site; print(site.getsitepackages()[0])')" + rm -rf "${pkgdir}${site_packages}/system76driver/tests" } diff --git a/actions.patch b/actions.patch new file mode 100644 index 000000000000..f8994f7904d7 --- /dev/null +++ b/actions.patch @@ -0,0 +1,34 @@ +diff --unified --recursive --text a/system76driver/actions.py b/system76driver/actions.py +--- a/system76driver/actions.py 2021-02-23 12:14:22.000000000 -0700 ++++ b/system76driver/actions.py 2021-02-23 15:19:40.284093704 -0700 +@@ -102,8 +102,8 @@ + + + def update_initramfs(): +- log.info('Calling `update-initramfs`...') +- SubProcess.check_call(['update-initramfs', '-u']) ++ log.info('Calling `mkinitcpio`...') ++ SubProcess.check_call(['mkinitcpio', '-P']) + + + def parse_lspci(text): +@@ -264,7 +264,7 @@ + update_grub() + + if any(action.update_initramfs for action in self.needed): +- yield _('Running `update-initramfs`') ++ yield _('Running `mkinitcpio`') + update_initramfs() + + +@@ -1494,8 +1494,8 @@ + + class i915_initramfs(FileAction): + update_initramfs = True +- relpath = ('usr', 'share', 'initramfs-tools', 'modules.d', 's76-i915-initramfs.conf') +- content = '# Added by system76-driver\ni915\n' ++ relpath = ('etc', 'modprobe.d', 's76-i915-mkinitcpio.conf') ++ content = '# Added by system76-driver\noptions i915\n' + + def describe(self): + return _('Add i915 driver to initramfs') |