diff options
author | Corey Hinshaw | 2018-02-13 23:14:12 -0500 |
---|---|---|
committer | Corey Hinshaw | 2018-02-13 23:14:12 -0500 |
commit | 70f04a0458b29c7685e81bc2479f5ffc0024826d (patch) | |
tree | 401a52b1f113b29c30e94cf7e8a02c5676c52bc1 | |
parent | 7283edef0d274aca230b56c89e7a9a3f9e85b197 (diff) | |
download | aur-70f04a0458b29c7685e81bc2479f5ffc0024826d.tar.gz |
Update to 17.10.19 and add service management to install script
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 16 | ||||
-rw-r--r-- | system76-driver.install | 64 |
3 files changed, 65 insertions, 21 deletions
@@ -1,6 +1,6 @@ pkgbase = system76-driver pkgdesc = System76 Driver provides drivers, restore, and regression support for System76 computers - pkgver = 17.10.17 + pkgver = 17.10.19 pkgrel = 1 url = https://github.com/pop-os/system76-driver install = system76-driver.install @@ -20,12 +20,12 @@ pkgbase = system76-driver optdepends = polkit: Run System76 Driver GUI from application menu optdepends = pulseaudio: To apply microphone fix optdepends = xorg-xbacklight: To use the backlight service - source = https://github.com/pop-os/system76-driver/archive/17.10.17.tar.gz + source = https://github.com/pop-os/system76-driver/archive/17.10.19.tar.gz source = galu1.patch source = gtk.patch source = cli.patch source = hidpi.patch - sha1sums = 6d6121f6e36b58a795c14338fc724c0e1a89f44e + sha1sums = 9d4f4be2ed45197cebe4dc7ccf4ebd0727a560ca sha1sums = ea8d53a80a26eb05b367f27996c8ce715aafba1e sha1sums = bf0c37a6226858c768e8ce2c9c3c3801aef14c0e sha1sums = 92f0de2acea6ac69c36378c7139fb84a7eaf7842 @@ -1,8 +1,8 @@ # Maintainer: ava1ar <mail(at)ava1ar(dot)me> -# Maintainer: Corey Hinshaw <coreyhinshaw@gmail.com> +# Maintainer: Corey Hinshaw <coreyhinshaw(at)gmail(dot)com> pkgname=system76-driver -pkgver=17.10.17 +pkgver=17.10.19 pkgrel=1 pkgdesc="System76 Driver provides drivers, restore, and regression support for System76 computers" arch=('any') @@ -19,8 +19,7 @@ depends=( 'python-xlib' 'dmidecode') makepdepends=( - 'python-pyflakes' - 'patch') + 'python-pyflakes') optdepends=( 'pm-utils: For power management features' 'gtk3: To launch System76 driver and firmware GUI' @@ -34,7 +33,7 @@ source=( 'gtk.patch' 'cli.patch' 'hidpi.patch') -sha1sums=('6d6121f6e36b58a795c14338fc724c0e1a89f44e' +sha1sums=('9d4f4be2ed45197cebe4dc7ccf4ebd0727a560ca' 'ea8d53a80a26eb05b367f27996c8ce715aafba1e' 'bf0c37a6226858c768e8ce2c9c3c3801aef14c0e' '92f0de2acea6ac69c36378c7139fb84a7eaf7842' @@ -95,11 +94,14 @@ package() { cd ${pkgdir} # patch for cli version - enable override vendor/model via /etc/system76-daemon.json - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/cli.patch + patch --no-backup-if-mismatch -Np1 -i ${srcdir}/cli.patch + # galu1 model-specific patch - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/galu1.patch + patch --no-backup-if-mismatch -Np1 -i ${srcdir}/galu1.patch + # enabling "Restore System" button if all changes applied patch --no-backup-if-mismatch -Np1 -i ${srcdir}/gtk.patch + # Remove Ubuntu-specific service target patch --no-backup-if-mismatch -Np1 -i ${srcdir}/hidpi.patch } diff --git a/system76-driver.install b/system76-driver.install index a32045365b9b..6045ba31cdc4 100644 --- a/system76-driver.install +++ b/system76-driver.install @@ -1,3 +1,28 @@ +_services="system76.service system76-firmware.service" + +_stop_services() { + /usr/bin/systemctl stop $_services >/dev/null 2>&1 +} + +_disable_services() { + /usr/bin/systemctl disable $_services >/dev/null 2>&1 + /usr/bin/systemctl reset-failed $_services >/dev/null 2>&1 +} + +_restore_services() { + for service in $_services; do + if /usr/bin/systemctl -q is-enabled $service >/dev/null 2>&1; then + /usr/bin/systemctl start $service > /dev/null 2>&1 + fi + done +} + +_remove_symlink() { + if [ -L $1 ] && [ "$(readlink -f $1)" = "$2" ]; then + rm $1 + fi +} + post_install() { cat << EOF @@ -15,32 +40,25 @@ cat << EOF ln -s /usr/share/applications/system76-driver-backlight.desktop /etc/xdg/autostart/system76-driver-backlight.desktop - GUI applications are provided to install drivers, patches, and formware updates. If the applications + GUI applications are provided to install drivers, patches, and firmware updates. If the applications fail to start, try the following commands as root: - GUI versions: - system76-driver system76-firmware - CLI version: - - system76-driver-cli - (!) Under Wayland try using xhost prior to running the GUI applications: xhost +local: + (!) To use system76.service, you must add "ec_sys.write_support=1" to your kernel command line + (!) If you do not use Grub bootloader, please check output for possible manual actions required for your model related to bootloader modifications. (!) For Clevo W740SU BIOS/Firmware users on Galago UltraPro: your will need to create /etc/system76-daemon.json file with following content: - { - "vendor": "System76, Inc", - "model": "galu1" - } + { "vendor": "System76, Inc", "model": "galu1" } (!) If you experience Wifi issues after resuming from suspend, consider using the included network restart script: @@ -50,6 +68,30 @@ cat << EOF EOF } +pre_upgrade() { + _stop_services +} + post_upgrade() { + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 + _restore_services post_install } + +pre_remove() { + _stop_services + _disable_services + + # Remove symlinks if target points to package files + _remove_symlink /etc/xdg/autostart/system76-driver-backlight.desktop /usr/share/applications/system76-driver-backlight.desktop + _remove_symlink /lib/systemd/system-sleep/system76-nm-restart /usr/lib/system76-driver/system76-nm-restart +} + +post_remove() { + /usr/bin/systemctl daemon-reload >/dev/null 2>&1 + cat << EOF + + Be sure to stop and disable all running System76 user services. + +EOF +} |