first commit

This commit is contained in:
Ward Nakchbandi (Cosmic Fusion) 2023-07-15 15:59:35 +03:00
commit 1c91912338
9 changed files with 142 additions and 0 deletions

50
.github/workflows/release.yml vendored Normal file
View File

@ -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" ]'

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
sdgyrodsu (1.14-99pika1-lunar) lunar; urgency=low
* Initial Creation
-- Ward Nakchbandi <hotrod.master@hotmail.com> Sat, 01 Oct 2022 14:50:00 +0200

15
debian/control vendored Normal file
View File

@ -0,0 +1,15 @@
Source: sdgyrodsu
Section: games
Priority: optional
Maintainer: Ward Nakchbandi <hotrod.master@hotmail.com>
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.

21
debian/copyright vendored Normal file
View File

@ -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.

5
debian/rules vendored Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/make -f
%:
dh $@

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (native)

16
main.sh Executable file
View File

@ -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/

18
patches/fedora.patch Normal file
View File

@ -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

11
release.sh Executable file
View File

@ -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/