diff options
author | Fabian Bornschein | 2022-11-08 21:53:38 +0100 |
---|---|---|
committer | Fabian Bornschein | 2022-11-08 21:53:38 +0100 |
commit | a35874e220a344eecd8d75036d8367ba94fac62e (patch) | |
tree | 17da9b1a98df11b24679b2e767b7e71c62474e4a | |
parent | 40f3e64b4fcf9f28501e8ce05731ffede1c629f3 (diff) | |
download | aur-a35874e220a344eecd8d75036d8367ba94fac62e.tar.gz |
add systemd unit "asusd-nohwdep.service" to workaround the dependency on specific hardware, if needed
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r--[-rwxr-xr-x] | asusctl.install | 5 | ||||
-rw-r--r-- | asusd-nohwdep.service | 20 |
3 files changed, 34 insertions, 4 deletions
@@ -4,7 +4,7 @@ pkgbase=asusctl pkgname=(asusctl rog-control-center) pkgver=4.5.0 -pkgrel=1 +pkgrel=2 pkgdesc="A control daemon, tools, and a collection of crates for interacting with ASUS ROG laptops" arch=('x86_64') url="https://gitlab.com/asus-linux/asusctl" @@ -13,8 +13,10 @@ makedepends=('cmake' 'git' 'rust' 'hicolor-icon-theme' 'libusb' 'fontconfig' 'systemd' 'power-profiles-daemon') conflicts=('asusctl-git') _commit=2cd1ee02eecbb64026f78bc895ae99ab952ecd23 # tags/4.5.0^0 -source=("git+${url}.git#commit=$_commit") -sha256sums=('SKIP') +source=("git+${url}.git#commit=$_commit" + "asusd-nohwdep.service") +sha256sums=('SKIP' + 'f6cf6fe6e379f29282c503351cf7e09c5141572c9acc183b934764099958e4d2') pkgver() { cd "${pkgbase}" @@ -52,6 +54,9 @@ package_asusctl() { cd "${pkgbase}" make DESTDIR="${pkgdir}" install + install -Dm 644 "${srcdir}/asusd-nohwdep.service" \ + -t "${pkgdir}/usr/lib/systemd/system" + _pick rogcc "${pkgdir}/usr/bin/rog-control-center" \ "${pkgdir}/usr/share/applications/rog-control-center.desktop" \ "${pkgdir}/usr/share/icons/hicolor/512x512/apps/rog-control-center.png" \ @@ -61,5 +66,5 @@ package_asusctl() { package_rog-control-center() { depends=('asusctl' 'fontconfig') pkgdesc="App to control asusctl" - mv rogcc/* "$pkgdir" + mv rogcc/* "${pkgdir}" } diff --git a/asusctl.install b/asusctl.install index 4f125106d340..27bd15b8bf8f 100755..100644 --- a/asusctl.install +++ b/asusctl.install @@ -4,5 +4,10 @@ post_upgrade() { printf ":: asusd is running, and requires a restart of the serviceā¦\n" systemctl restart asusd.service fi + if [ $(systemctl is-active asusd-nohwdep.service) == "active" ] + then + printf ":: asusd is running, and requires a restart of the serviceā¦\n" + systemctl restart asusd-nohwdep.service + fi } diff --git a/asusd-nohwdep.service b/asusd-nohwdep.service new file mode 100644 index 000000000000..477be2e065b4 --- /dev/null +++ b/asusd-nohwdep.service @@ -0,0 +1,20 @@ +[Unit] +Description=ASUS Notebook Control +StartLimitInterval=200 +StartLimitBurst=2 +Before=multi-user.target +Conflicts=asusd.service + +[Service] +Environment=IS_SERVICE=1 +ExecStartPre=/bin/sleep 2 +ExecStart=/usr/bin/asusd +Restart=on-failure +Restart=always +RestartSec=1 +Type=dbus +BusName=org.asuslinux.Daemon +SELinuxContext=system_u:system_r:unconfined_t:s0 + +[Install] +WantedBy=multi-user.target |