commit 1c919123388b5c6c178895783b71018f67b51b45 Author: Ward Nakchbandi (Cosmic Fusion) Date: Sat Jul 15 15:59:35 2023 +0300 first commit diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ee019f4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: PikaOS Package Release + +on: + workflow_dispatch + +jobs: + build: + runs-on: self-hosted + container: + image: ghcr.io/pikaos-linux/pika-package-container:latest + volumes: + - /proc:/proc + options: --privileged -it + + steps: + - uses: actions/checkout@v3 + + - name: Import GPG key + id: import_gpg + uses: crazy-max/ghaction-import-gpg@v5 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.PASSPHRASE }} + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.KNOWN_HOSTS }} + if_key_exists: replace + + - name: Update apt cache + run: apt update -y + + - name: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh + + - name: Purge cache + uses: jakejarvis/cloudflare-purge-action@master + env: + # Zone is required by both authentication methods + CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }} + + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + PURGE_URLS: '["https://ppa.pika-os.com/dists/lunar/InRelease", "https://ppa.pika-os.com/dists/lunar/main/binary-i386/Packages.gz", "https://ppa.pika-os.com/dists/lunar/main/binary-amd64/Packages.gz", "https://ppa.pikaos.com/dists/lunar/pika-sources.deb", "https://ppa.pika-os.com/dists/lunar/main/source/Sources.gz" ]' + diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..a91e951 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +sdgyrodsu (1.14-99pika1-lunar) lunar; urgency=low + + * Initial Creation + + -- Ward Nakchbandi Sat, 01 Oct 2022 14:50:00 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..6a2bd6f --- /dev/null +++ b/debian/control @@ -0,0 +1,15 @@ +Source: sdgyrodsu +Section: games +Priority: optional +Maintainer: Ward Nakchbandi +Standards-Version: 4.6.1 +Build-Depends: debhelper-compat (= 13), build-essential, dh-cmake, cmake, pkg-config +Rules-Requires-Root: no +Homepage: https://github.com/kmicki/SteamDeckGyroDSU + +Package: sdgyrodsu +Architecture: linux-any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: DSU (cemuhook protocol) server for motion data for Steam Deck. + + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..9b195b9 --- /dev/null +++ b/debian/copyright @@ -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. diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..abde6ef --- /dev/null +++ b/debian/rules @@ -0,0 +1,5 @@ +#!/usr/bin/make -f + +%: + dh $@ + diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) diff --git a/main.sh b/main.sh new file mode 100755 index 0000000..2b756ea --- /dev/null +++ b/main.sh @@ -0,0 +1,16 @@ +# Clone Upstream +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 + +# Get build deps +apt-get build-dep ./ -y + +# Build package +dpkg-buildpackage --no-sign + +# Move the debs to output +cd ../ +mkdir -p ./output +mv ./*.deb ./output/ diff --git a/patches/fedora.patch b/patches/fedora.patch new file mode 100644 index 0000000..3be595e --- /dev/null +++ b/patches/fedora.patch @@ -0,0 +1,18 @@ +--- 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/release.sh b/release.sh new file mode 100755 index 0000000..98eac6c --- /dev/null +++ b/release.sh @@ -0,0 +1,11 @@ +# Sign the packages +dpkg-sig --sign builder ./output/*.deb + +# Pull down existing ppa repo db files etc +rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo + +# Add the new package to the repo +reprepro -V --basedir ./output/repo/ includedeb lunar ./output/*.deb + +# Push the updated ppa repo to the server +rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/