Many fixes for debian build

This commit is contained in:
Luke
2020-07-07 19:36:39 +12:00
parent ae9d0463da
commit 857ef8bcb8
6 changed files with 24 additions and 39 deletions

View File

@@ -34,15 +34,15 @@ distclean:
install: all
install -D -m 0755 "target/release/$(BIN)" "$(DESTDIR)$(bindir)/$(BIN)"
install -D -m 0644 "data/$(BIN).rules" "$(DESTDIR)$(sysconfdir)/udev/rules.d/99-$(BIN).rules"
install -D -m 0644 "data/$(BIN).rules" "$(DESTDIR)/lib/udev/rules.d/99-$(BIN).rules"
install -D -m 0644 "data/$(BIN).conf" "$(DESTDIR)$(sysconfdir)/dbus-1/system.d/$(BIN).conf"
install -D -m 0644 "data/$(BIN).service" "$(DESTDIR)$(libdir)/systemd/system/$(BIN).service"
install -D -m 0644 "data/$(BIN).service" "$(DESTDIR)/lib/systemd/system/$(BIN).service"
uninstall:
rm -f "$(DESTDIR)$(bindir)/$(BIN)"
rm -f "$(DESTDIR)$(sysconfdir)/udev/rules.d/99-$(BIN).conf"
rm -f "$(DESTDIR)/lib/udev/rules.d/99-$(BIN).rules"
rm -f "$(DESTDIR)$(sysconfdir)/dbus-1/system.d/$(BIN).conf"
rm -f "$(DESTDIR)$(libdir)/systemd/system/$(BIN).service"
rm -f "$(DESTDIR)/lib/systemd/system/$(BIN).service"
update:
cargo update

View File

@@ -91,30 +91,6 @@ gnome-shell extension, or at least limiting use of the power-management parts as
(one or the other will overwrite pstates). I will create a shell extension at some point similar to system76, but using
the rog-core parts. It is safe to leave `system76-power.service` enabled and use for switching between graphics modes.
## Arch Linux, and possibly others
This method of enabling may become default.
Currently there seems to be an issue where the device is not fully initialised and
when rog-core attempts to grab the keyboard it will fail, and you may be left without
input. A way around this is to disable the systemd service (rog-core) if enabled
and create a udev rule in `/etc/udev/rules.d/99-rogcore.rules` with the following
content:
```
ACTION=="bind", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="1866", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service"
```
Double-check your `idProduct` with `lsusb |grep 0b05`, this will show a line such
as:
```
Bus 001 Device 006: ID 0b05:1866 ASUSTek Computer, Inc. N-KEY Device
```
where `1866` here is the `idProduct`. Modify the udev rule to suit. If there is
more than one line (such as with an AniMe laptop), prefer using the `N-Key` device.
### Ubuntu PPA
Alternatively, instead of building manually you can use the PPA.
@@ -133,7 +109,8 @@ Thanks to @aspann you can grab it here [sys-power/rog-core](https://lab.retarded
### Arch AUR
You can find the thingimajig [here](https://aur.archlinux.org/packages/rog-core/)
You can find the thingimajig [here](https://aur.archlinux.org/packages/rog-core/). If
you are using a GA14 or GA15 series, you may need kernel [patches](https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches).
## Updating

View File

@@ -1 +1 @@
ACTION=="bind", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="18[0-9][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service"
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0b05", ATTRS{idProduct}=="18[0-9][0-9]", TAG+="systemd", ENV{SYSTEMD_WANTS}="rog-core.service"

View File

@@ -1,12 +1,8 @@
[Unit]
Description=ROG Core Daemon
After=dbus.service
[Service]
ExecStart=/usr/bin/rog-core -d
Restart=on-failure
Type=dbus
BusName=org.rogcore.Daemon
[Install]
WantedBy=multi-user.target
BusName=org.rogcore.Daemon

19
debian/control vendored
View File

@@ -7,7 +7,6 @@ Build-Depends:
cargo,
llvm,
libclang-dev,
dh-systemd,
libusb-1.0-0-dev,
libdbus-1-dev,
pkg-config
@@ -18,9 +17,21 @@ Package: rog-core
Architecture: amd64
Depends:
dbus,
libc6,
systemd,
libusb-1.0-0,
${misc:Depends},
${shlib:Depends}
Description: ASUS ROG Laptop Management
${shlibs:Depends}
Description:ASUS ROG Laptop Management
Extra support for ASUS laptop models:
- GM501
- GX502
- GX531
- G512
- G712
- GX531
- G531
- GA14/GA401. You will need kernel patches
+ https://lab.retarded.farm/zappel/asus-rog-zephyrus-g14/-/tree/master/kernel_patches
- GA15/GA502/GU502 appears to have most things working
- GL703(0x1869)
- GL553/GL753

View File

@@ -8,6 +8,7 @@ case "$1" in
if [ -f $CONF ]; then
mv $CONF $CONF.save
fi
systemctl unmask rog-core.service
#ROG=$(lsusb |grep 0b05 |cut -d ' ' -f 6 |cut -d ':' -f 2)
#sed -i -e "s|==/"1866/"|==/"${ROG}/"|g" /etc/udev/rules.d/99-rog-core.rules
;;