diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..5a95362 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,2 @@ +#! /bin/bash +systemctl --global enable --now sdgyrodsu.service || echo "sdgyrodsu service could not be enabled" diff --git a/debian/prerm b/debian/prerm new file mode 100644 index 0000000..1d710b0 --- /dev/null +++ b/debian/prerm @@ -0,0 +1,2 @@ +#! /bin/bash +systemctl --global disable --now sdgyrodsu.service || echo "sdgyrodsu service could not be disabled" diff --git a/debian/sdgyrodsu.install b/debian/sdgyrodsu.install new file mode 100644 index 0000000..73752c9 --- /dev/null +++ b/debian/sdgyrodsu.install @@ -0,0 +1 @@ +usr diff --git a/main.sh b/main.sh index 2b756ea..1b2bda5 100755 --- a/main.sh +++ b/main.sh @@ -1,8 +1,8 @@ # Clone Upstream -git clone https://github.com/kmicki/SteamDeckGyroDSU ./sdgyrodsu +#git clone https://github.com/kmicki/SteamDeckGyroDSU ./sdgyrodsu cp -rvf ./debian ./sdgyrodsu cd ./sdgyrodsu -for i in ../patches/*.patch; do patch -Np1 -i $i ;done +#for i in ../patches/*.patch; do patch -Np1 -i $i ;done # Get build deps apt-get build-dep ./ -y diff --git a/patches/fedora.patch b/patches/fedora.patch deleted file mode 100644 index 3be595e..0000000 --- a/patches/fedora.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- pkg/51-deck-controls.rules 2023-06-30 16:01:59.550968249 -0700 -+++ pkg/51-deck-controls.rules 2023-07-01 00:06:21.865925273 -0700 -@@ -1,2 +1,2 @@ --SUBSYSTEMS=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1205", GROUP="usbaccess" -+SUBSYSTEMS=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1205", TAG+="uaccess" - - ---- pkg/sdgyrodsu.service 2023-06-30 16:01:59.551968249 -0700 -+++ pkg/sdgyrodsu.service 2023-07-01 00:09:40.598922020 -0700 -@@ -7,7 +7,7 @@ - Type=simple - Restart=always - RestartSec=1 --ExecStart=%h/sdgyrodsu/sdgyrodsu -+ExecStart=/usr/bin/sdgyrodsu - - [Install] - WantedBy=default.target diff --git a/sdgyrodsu/usr/bin/sdgyrodsu b/sdgyrodsu/usr/bin/sdgyrodsu new file mode 100755 index 0000000..0472cf0 Binary files /dev/null and b/sdgyrodsu/usr/bin/sdgyrodsu differ diff --git a/sdgyrodsu/usr/lib/systemd/user/sdgyrodsu.service b/sdgyrodsu/usr/lib/systemd/user/sdgyrodsu.service new file mode 100644 index 0000000..57700bd --- /dev/null +++ b/sdgyrodsu/usr/lib/systemd/user/sdgyrodsu.service @@ -0,0 +1,14 @@ +[Unit] +Description=Steam Deck Gyro DSU Server +After=sockets.target +StartLimitIntervalSec=0 + +[Service] +Type=simple +Restart=always +RestartSec=1 +ExecStart=/usr/bin/sdgyrodsu + +[Install] +WantedBy=default.target + diff --git a/sdgyrodsu/usr/lib/udev/rules.d/51-deck-controls.rules b/sdgyrodsu/usr/lib/udev/rules.d/51-deck-controls.rules new file mode 100644 index 0000000..e8349a6 --- /dev/null +++ b/sdgyrodsu/usr/lib/udev/rules.d/51-deck-controls.rules @@ -0,0 +1,2 @@ +SUBSYSTEMS=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1205", TAG+="uaccess" + diff --git a/sdgyrodsu/usr/share/licenses/sdgyrodsu/LICENSE b/sdgyrodsu/usr/share/licenses/sdgyrodsu/LICENSE new file mode 100644 index 0000000..9b195b9 --- /dev/null +++ b/sdgyrodsu/usr/share/licenses/sdgyrodsu/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 kmicki + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.