diff options
author | Link Dupont <link@fastmail.com> | 2016-06-22 21:22:57 -0700 |
---|---|---|
committer | Link Dupont <link@fastmail.com> | 2016-06-22 21:22:57 -0700 |
commit | 64b2ebe5f02e944d53760a3a9f5b3ecf27ecb8d5 (patch) | |
tree | 9f513669f637eacbe6804d04ff8c4d3d3e466f2f | |
download | system76-driver-64b2ebe5f02e944d53760a3a9f5b3ecf27ecb8d5.tar.gz system76-driver-64b2ebe5f02e944d53760a3a9f5b3ecf27ecb8d5.tar.xz system76-driver-64b2ebe5f02e944d53760a3a9f5b3ecf27ecb8d5.zip |
initial commit
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | sources | 4 | ||||
-rw-r--r-- | system76-driver-15.10.12-desktop-version.patch | 9 | ||||
-rw-r--r-- | system76-driver-15.10.12-update-grub.patch | 23 | ||||
-rw-r--r-- | system76-driver.spec | 79 | ||||
-rw-r--r-- | system76.service | 9 |
6 files changed, 125 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1a6002e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/system76-driver_16.04.3.tar.gz @@ -0,0 +1,4 @@ +85b185260cadff7a4dc6ba9bb18d5bca system76-driver-15.10.12-desktop-version.patch +c50dcbec8fddc1ad79275932f209de56 system76-driver-15.10.12-update-grub.patch +c658fa2fd73faa9ffc4170b5f851ef08 system76-driver_16.04.3.tar.gz +e2f9db7d354b09d552c19408f121ba46 system76.service diff --git a/system76-driver-15.10.12-desktop-version.patch b/system76-driver-15.10.12-desktop-version.patch new file mode 100644 index 0000000..bcc70fe --- /dev/null +++ b/system76-driver-15.10.12-desktop-version.patch @@ -0,0 +1,9 @@ +--- system76-driver.desktop.orig 2015-12-26 14:26:49.396093118 -0800 ++++ system76-driver.desktop 2015-12-26 14:26:57.294005988 -0800 +@@ -1,5 +1,5 @@ + [Desktop Entry] +-Version=2.7.3 ++Version=1.0 + Encoding=UTF-8 + Name=System76 Driver + GenericName=System76 Driver diff --git a/system76-driver-15.10.12-update-grub.patch b/system76-driver-15.10.12-update-grub.patch new file mode 100644 index 0000000..0750c85 --- /dev/null +++ b/system76-driver-15.10.12-update-grub.patch @@ -0,0 +1,23 @@ +--- system76driver/actions.py.orig 2016-02-09 19:53:15.955662158 -0800 ++++ system76driver/actions.py 2016-02-09 19:57:52.008898381 -0800 +@@ -29,6 +29,7 @@ + from base64 import b32encode + import datetime + import logging ++import platform + + from . import get_datafile + from .mockable import SubProcess +@@ -74,7 +75,11 @@ + + def update_grub(): + log.info('Calling `update-grub`...') +- SubProcess.check_call(['update-grub']) ++ distname = platform.linux_distribution()[0] ++ if distname == "Ubuntu" or distname == "Debian": ++ SubProcess.check_call(['update-grub']) ++ else: ++ SubProcess.check_call(['grub2-mkconfig','-o','/boot/grub2/grub.cfg']) + + + class Action: diff --git a/system76-driver.spec b/system76-driver.spec new file mode 100644 index 0000000..3e3a5c3 --- /dev/null +++ b/system76-driver.spec @@ -0,0 +1,79 @@ +%define debug_package %{nil} +%define modulename system76driver + +Name: system76-driver +Version: 16.04.3 +Release: 1%{?dist} +Summary: Universal driver for System76 computers + +License: GPLv2 +URL: https://launchpad.net/system76-driver +Source0: https://launchpad.net/~system76-dev/+archive/stable/+files/%{name}_%{version}.tar.gz +Source1: http://linkdupont.fedorapeople.org/sources/system76.service + +Patch0: http://linkdupont.fedorapeople.org/patches/system76-driver-15.10.12-desktop-version.patch +Patch1: http://linkdupont.fedorapeople.org/patches/system76-driver-15.10.12-update-grub.patch + +BuildArch: noarch +BuildRequires: python3-devel >= 3.4 +Requires: dmidecode +Requires: system76-wallpapers >= 16.04.1 +BuildRequires: systemd + +%description +System76 Driver provides drivers, restore, and regression support for System76 +computers. + + +%post +systemctl enable system76.service +systemctl start system76.service + + +%preun +systemctl stop system76.service +systemctl disable system76.service + + +%prep +%autosetup -p0 + + +%build +%{__python3} setup.py build + + +%install +%{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot} +install -m755 -D system76-daemon %{buildroot}%{_bindir}/system76-daemon +install -m644 -D %{SOURCE1} %{buildroot}%{_unitdir}/system76.service +install -m755 -D system76-driver-pkexec %{buildroot}%{_bindir}/system76-driver-pkexec +install -m644 -D com.system76.pkexec.system76-driver.policy %{buildroot}%{_datadir}/polkit-1/actions/com.system76.pkexec.system76-driver.policy +install -m755 -d %{buildroot}%{_sharedstatedir}/%{name} + + +%files +%license LICENSE +%doc README +%{_bindir}/%{name}* +%{_bindir}/system76-daemon +%{_unitdir}/system76.service +%{python3_sitelib}/%{modulename}* +%{_datadir}/applications/%{name}.desktop +%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg +%{_datadir}/polkit-1/actions/com.system76.pkexec.system76-driver.policy +%{_sharedstatedir}/%{name} + + +%changelog +* Fri Jun 17 2016 Link Dupont <link@fastmail.com> - 16.04.3-1 +- New upstream release +* Fri Apr 22 2016 Link Dupont <link@fastmail.com> - 16.04.2-1 +- New upstream release +* Wed Feb 24 2016 Link Dupont <link@fastmail.com> - 15.10.14-1 +- New upstream release +* Tue Feb 9 2016 Link Dupont <link@fastmail.com> - 15.10.13-1 +- New upstream release +- Add patch to correctly rebuild grub.cfg on distributions without 'update-grub' (namely Ubuntu) +* Sat Dec 26 2015 Link Dupont <link@fastmail.com> - 15.10.12-1 +- Initial package diff --git a/system76.service b/system76.service new file mode 100644 index 0000000..9e27f84 --- /dev/null +++ b/system76.service @@ -0,0 +1,9 @@ +[Unit] +Description=System76 airplane-mode hotkey and LED support + +[Service] +ExecStart=/usr/bin/system76-daemon +Restart=on-failure + +[Install] +WantedBy=multi-user.target |