diff options
author | Corey Hinshaw | 2017-11-14 00:58:53 -0500 |
---|---|---|
committer | Corey Hinshaw | 2017-11-14 00:58:53 -0500 |
commit | 506b7edf5bcfb28fbefcda62e260540d32229c7e (patch) | |
tree | 176fc6c249038f3313f2d008a840aab93730d523 | |
parent | e65fda5250b5ea574ed10f449df96234fd2b84b0 (diff) | |
download | aur-506b7edf5bcfb28fbefcda62e260540d32229c7e.tar.gz |
Add backlight and hidpi service. Add network restart script.
-rw-r--r-- | .SRCINFO | 9 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 72 | ||||
-rw-r--r-- | hidpi.patch | 9 | ||||
-rw-r--r-- | system76-driver.install | 64 | ||||
-rw-r--r-- | system76.service | 8 |
6 files changed, 101 insertions, 65 deletions
@@ -1,9 +1,7 @@ -# Generated by mksrcinfo v8 -# Sat Nov 11 04:31:21 UTC 2017 pkgbase = system76-driver pkgdesc = System76 Driver provides drivers, restore, and regression support for System76 computers pkgver = 17.10.6 - pkgrel = 1 + pkgrel = 2 url = https://launchpad.net/system76-driver install = system76-driver.install arch = any @@ -18,16 +16,17 @@ pkgbase = system76-driver optdepends = grub: To apply kernel boot time parameters optdepends = polkit: runnning System76 Driver GUI from application menu optdepends = pulseaudio: To apply microphone fix + optdepends = xorg-xbacklight: To use the backlight service source = https://launchpad.net/~system76-dev/+archive/stable/+files/system76-driver_17.10.6.tar.gz - source = system76.service source = galu1.patch source = gtk.patch source = cli.patch + source = hidpi.patch sha1sums = cf746be2bb1d33d4f23d296992824e17c2e150d1 - sha1sums = cf763432441c3da0563eee041145a02109f2bb3a sha1sums = ea8d53a80a26eb05b367f27996c8ce715aafba1e sha1sums = bf0c37a6226858c768e8ce2c9c3c3801aef14c0e sha1sums = 92f0de2acea6ac69c36378c7139fb84a7eaf7842 + sha1sums = acbcc10d4b4fc94bc33e9956fb0f4f335136beab pkgname = system76-driver diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0cced017d91a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tar.xz +*.tar.gz +/pkg +/src @@ -1,60 +1,78 @@ # Maintainer: ava1ar <mail(at)ava1ar(dot)me> +# Maintainer: Corey Hinshaw <coreyhinshaw@gmail.com> pkgname=system76-driver pkgver=17.10.6 -pkgrel=1 +pkgrel=2 pkgdesc="System76 Driver provides drivers, restore, and regression support for System76 computers" arch=('any') url="https://launchpad.net/system76-driver" license=('GPL') install="${pkgname}.install" depends=('python>=3.6' 'python-gobject' 'python-dbus' 'python-evdev' 'dmidecode') -makepdepends=('patch') +makepdepends=('python-pyflakes' 'patch') optdepends=( 'pm-utils: For powermanagement features' 'gtk3: To launch System76 Driver GUI' 'grub: To apply kernel boot time parameters' 'polkit: runnning System76 Driver GUI from application menu' - 'pulseaudio: To apply microphone fix') + 'pulseaudio: To apply microphone fix' + 'xorg-xbacklight: To use the backlight service') source=("https://launchpad.net/~system76-dev/+archive/stable/+files/${pkgname}_${pkgver}.tar.gz" - 'system76.service' 'galu1.patch' 'gtk.patch' 'cli.patch') + 'galu1.patch' 'gtk.patch' 'cli.patch' 'hidpi.patch') sha1sums=('cf746be2bb1d33d4f23d296992824e17c2e150d1' - 'cf763432441c3da0563eee041145a02109f2bb3a' 'ea8d53a80a26eb05b367f27996c8ce715aafba1e' 'bf0c37a6226858c768e8ce2c9c3c3801aef14c0e' - '92f0de2acea6ac69c36378c7139fb84a7eaf7842') + '92f0de2acea6ac69c36378c7139fb84a7eaf7842' + 'acbcc10d4b4fc94bc33e9956fb0f4f335136beab') + package() { cd ${srcdir}/${pkgname}-${pkgver} - - ################ - # installation # - ################ - install -m644 -D system76-daemon ${pkgdir}/usr/lib/${pkgname}/system76-daemon + + ########### + # Install # + ########### + + # Build and install base package python setup.py install --prefix=/usr --root=${pkgdir} --optimize=1 - install -m644 -D ${startdir}/system76.service ${pkgdir}/usr/lib/systemd/system/system76.service - # installing system76-driver-pkexec script and polkit configuration + + # Install daemons and systemd unit files + # Note: system76-driver* service files shortened to system76* + install -m755 -D system76-daemon ${pkgdir}/usr/lib/${pkgname}/system76-daemon + install -m755 -D system76-backlight-daemon ${pkgdir}/usr/lib/${pkgname}/system76-backlight-daemon + install -m755 -D system76-hidpi-daemon ${pkgdir}/usr/lib/${pkgname}/system76-hidpi-daemon + + # 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 -m644 -D debian/system76-driver-hidpi.service ${pkgdir}/usr/lib/systemd/user/system76-hidpi.service + install -m644 -D system76-driver-backlight.desktop ${pkgdir}/usr/share/applications/system76-backlight.desktop + + # Install scripts and configuration install -m755 -D system76-driver-pkexec ${pkgdir}/usr/bin/system76-driver-pkexec + install -m755 -D system76-nm-restart ${pkgdir}/usr/lib/${pkgname}/system76-nm-restart install -m644 -D com.system76.pkexec.system76-driver.policy ${pkgdir}/usr/share/polkit-1/actions/com.system76.pkexec.system76-driver.policy - # creating /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 -m755 -d ${pkgdir}/var/lib/${pkgname} + + # Clean up + rm -rf ${pkgdir}/usr/lib/python*/site-packages/system76driver/{__pycache__,tests} + + ################# + # Apply patches # + ################# + cd ${pkgdir} - ############ - # patching # - ############ # 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 patch --no-backup-if-mismatch -Np1 -i ${srcdir}/galu1.patch - # making grub optional - do not fail if /etc/default/grub file not found - #patch --no-backup-if-mismatch -Np1 -i ${srcdir}/grub.patch # enabling "Restore System" button if all changes applied - patch --no-backup-if-mismatch -Np1 -i ${srcdir}/gtk.patch - - ########### - # cleanup # - ########### - rm -rf ${pkgdir}/usr/lib/python*/site-packages/system76driver/{__pycache__,tests} + 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/hidpi.patch b/hidpi.patch new file mode 100644 index 000000000000..fcae5055b50e --- /dev/null +++ b/hidpi.patch @@ -0,0 +1,9 @@ +--- a/usr/lib/systemd/user/system76-hidpi.service 2017-09-27 16:50:07.000000000 -0400 ++++ b/usr/lib/systemd/user/system76-hidpi.service 2017-11-09 23:57:02.406774919 -0500 +@@ -6,5 +6,5 @@ + Restart=on-failure + + [Install] +-WantedBy=ubuntu-session.target ++WantedBy=default.target + diff --git a/system76-driver.install b/system76-driver.install index a782267e7c4c..c5bec98d4561 100644 --- a/system76-driver.install +++ b/system76-driver.install @@ -1,49 +1,63 @@ post_install() { cat << EOF - To enable the System76 driver service at boot, run the following command as root: + To enable the System76 driver service at boot, run the following command as root: - systemctl enable system76.service + systemctl enable system76.service - To manually start the service (without reboot), run the following command as root: + To manually start the service (without reboot), run the following command as root: - systemctl start system76.service + systemctl start system76.service - Before removing the System76 service, run the following commands as root: + Before removing the System76 service, run the following commands as root: - systemctl stop system76.service - systemctl disable system76.service + systemctl stop system76.service + systemctl disable system76.service - To install settings and patches, specific for your System76 laptop model, execute System76 Driver - application and click "Install Drivers". If the application won't start, you can manually start it - using following command as root: + The package also provides two additional user services: - GUI version: + system76-backlight.service Backlight Daemon for NVIDIA 9 Series on GNOME + system76-hidpi.service System76 HiDPI Daemon - system76-driver + The backlight service can (optionally) be started automatically: - CLI version: + ln -s /usr/share/applications/system76-driver-backlight.desktop /etc/xdg/autostart/system76-driver-backlight.desktop - system76-driver-cli + To install settings and patches specific to your System76 laptop model, execute the System76 Driver + application and click "Install Drivers". If the application won't start, you can manually start it + using following command as root: + GUI version: - (!) If you do not use grub bootloader, please check output for possible manual actions required for - your model related to bootloader modifications. + system76-driver - (!) For Clevo W740SU BIOS/Firmware users on Galago UltraPro: your will need to create /etc/system76-daemon.json - file with following content: + CLI version: - { - "vendor": "System76, Inc", - "model": "galu1" - } + system76-driver-cli + + + (!) 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" + } - to override laptop model for daemon and system76-driver-cli, because it fails to correctly identify laptop - model with non-System76 BIOS/Firmware flashed. + to override laptop model for daemon and system76-driver-cli, because it fails to correctly identify + laptop model with non-System76 BIOS/Firmware flashed. + + (!) If you experience Wifi issues after resuming from suspend, consider using the included network + restart script: + + ln -s /usr/lib/system76-driver/system76-nm-restart /lib/systemd/system-sleep/system76-nm-restart EOF } post_upgrade() { - post_install + post_install } diff --git a/system76.service b/system76.service deleted file mode 100644 index eb5392144b3b..000000000000 --- a/system76.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=System76 driver - -[Service] -ExecStart=/usr/bin/python /usr/lib/system76-driver/system76-daemon - -[Install] -WantedBy=multi-user.target |