From 379931b5d9deff6593302246177282b1c6391b0d Mon Sep 17 00:00:00 2001 From: Ward Nakchbandi Date: Sat, 25 Feb 2023 16:08:00 +0300 Subject: [PATCH] add github builder --- .github/workflows/release.yml | 40 +++++++++++++++++++ {gamescope-master/debian => debian}/changelog | 2 +- {gamescope-master/debian => debian}/control | 0 {gamescope-master/debian => debian}/copyright | 0 {gamescope-master/debian => debian}/files | 0 .../debian => debian}/gamescope.links | 0 {gamescope-master/debian => debian}/gbp.conf | 0 .../patches/0001_remove-forcefallback.patch | 0 .../patches/openvr_api-fix.patch | 0 .../debian => debian}/patches/series | 0 {gamescope-master/debian => debian}/rules | 0 .../debian => debian}/salsa-ci.yml | 0 .../debian => debian}/source/format | 0 .../debian => debian}/upstream/metadata | 0 {gamescope-master/debian => debian}/watch | 0 main.sh | 21 ++++++++++ orig.source.txt | 3 +- release.sh | 14 +++++++ 18 files changed, 77 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/release.yml rename {gamescope-master/debian => debian}/changelog (86%) rename {gamescope-master/debian => debian}/control (100%) rename {gamescope-master/debian => debian}/copyright (100%) rename {gamescope-master/debian => debian}/files (100%) rename {gamescope-master/debian => debian}/gamescope.links (100%) rename {gamescope-master/debian => debian}/gbp.conf (100%) rename {gamescope-master/debian => debian}/patches/0001_remove-forcefallback.patch (100%) rename {gamescope-master/debian => debian}/patches/openvr_api-fix.patch (100%) rename {gamescope-master/debian => debian}/patches/series (100%) rename {gamescope-master/debian => debian}/rules (100%) rename {gamescope-master/debian => debian}/salsa-ci.yml (100%) rename {gamescope-master/debian => debian}/source/format (100%) rename {gamescope-master/debian => debian}/upstream/metadata (100%) rename {gamescope-master/debian => debian}/watch (100%) create mode 100755 main.sh create mode 100755 release.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2cf8ce8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: PikaOS Package Release + +on: + workflow_dispatch + +jobs: + build: + runs-on: self-hosted + container: + image: ubuntu:22.10 + volumes: + - /proc:/proc + options: --privileged -it + + steps: + - uses: actions/checkout@v3 + + - name: Install needed packages + run: apt update && apt install software-properties-common sudo git bc gpg gpg-agent bison build-essential ccache cpio fakeroot flex git kmod libelf-dev libncurses5-dev libssl-dev lz4 qtbase5-dev rsync schedtool wget zstd tar reprepro dpkg-sig devscripts dh-make -y + + - 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: Build Package + run: ./main.sh + + - name: Release Package + run: ./release.sh diff --git a/gamescope-master/debian/changelog b/debian/changelog similarity index 86% rename from gamescope-master/debian/changelog rename to debian/changelog index 4ab75ff..18d9ee7 100644 --- a/gamescope-master/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -gamescope (3.11.58.d6c1df4.openvr-99pika15) kinetic; urgency=medium +gamescope (3.11.52-beta2~99pika20) kinetic; urgency=medium * Fix missing deps diff --git a/gamescope-master/debian/control b/debian/control similarity index 100% rename from gamescope-master/debian/control rename to debian/control diff --git a/gamescope-master/debian/copyright b/debian/copyright similarity index 100% rename from gamescope-master/debian/copyright rename to debian/copyright diff --git a/gamescope-master/debian/files b/debian/files similarity index 100% rename from gamescope-master/debian/files rename to debian/files diff --git a/gamescope-master/debian/gamescope.links b/debian/gamescope.links similarity index 100% rename from gamescope-master/debian/gamescope.links rename to debian/gamescope.links diff --git a/gamescope-master/debian/gbp.conf b/debian/gbp.conf similarity index 100% rename from gamescope-master/debian/gbp.conf rename to debian/gbp.conf diff --git a/gamescope-master/debian/patches/0001_remove-forcefallback.patch b/debian/patches/0001_remove-forcefallback.patch similarity index 100% rename from gamescope-master/debian/patches/0001_remove-forcefallback.patch rename to debian/patches/0001_remove-forcefallback.patch diff --git a/gamescope-master/debian/patches/openvr_api-fix.patch b/debian/patches/openvr_api-fix.patch similarity index 100% rename from gamescope-master/debian/patches/openvr_api-fix.patch rename to debian/patches/openvr_api-fix.patch diff --git a/gamescope-master/debian/patches/series b/debian/patches/series similarity index 100% rename from gamescope-master/debian/patches/series rename to debian/patches/series diff --git a/gamescope-master/debian/rules b/debian/rules similarity index 100% rename from gamescope-master/debian/rules rename to debian/rules diff --git a/gamescope-master/debian/salsa-ci.yml b/debian/salsa-ci.yml similarity index 100% rename from gamescope-master/debian/salsa-ci.yml rename to debian/salsa-ci.yml diff --git a/gamescope-master/debian/source/format b/debian/source/format similarity index 100% rename from gamescope-master/debian/source/format rename to debian/source/format diff --git a/gamescope-master/debian/upstream/metadata b/debian/upstream/metadata similarity index 100% rename from gamescope-master/debian/upstream/metadata rename to debian/upstream/metadata diff --git a/gamescope-master/debian/watch b/debian/watch similarity index 100% rename from gamescope-master/debian/watch rename to debian/watch diff --git a/main.sh b/main.sh new file mode 100755 index 0000000..945f736 --- /dev/null +++ b/main.sh @@ -0,0 +1,21 @@ +# Add dependent repositories +wget -q -O - https://ppa.pika-os.com/key.gpg | sudo apt-key add - +add-apt-repository https://ppa.pika-os.com +add-apt-repository ppa:pikaos/pika +add-apt-repository ppa:kubuntu-ppa/backports +# Clone Upstream +git clone https://github.com/Plagman/gamescope -b 3.11.52-beta2 +cp -rvf ./debian ./gamescope +cd ./gamescope + +# Get build deps +apt-get build-dep ./ -y + +# Build package +LOGNAME=root dh_make --createorig -y -l -p wlroots_3.11.52-beta2 +dpkg-buildpackage + +# Move the debs to output +cd ../ +mkdir -p ./output +mv ./*.deb ./output/ diff --git a/orig.source.txt b/orig.source.txt index e0cec25..05f0823 100644 --- a/orig.source.txt +++ b/orig.source.txt @@ -1,2 +1 @@ -gamescope_3.11.47.orig.tar.gz -#https://github.com/Plagman/gamescope +https://github.com/Plagman/gamescope diff --git a/release.sh b/release.sh new file mode 100755 index 0000000..529f831 --- /dev/null +++ b/release.sh @@ -0,0 +1,14 @@ +# Sign the packages +dpkg-sig --sign builder ./output/gamescope*.deb + +# Pull down existing ppa repo db files etc +rsync -azP --exclude '*.deb' ferreo@direct.pika-os.com:/srv/www/pikappa/ ./output/repo + +# Remove our existing package from the repo +reprepro -V --basedir ./output/repo/ removefilter kinetic 'Package (% gamescope*)' + +# Add the new package to the repo +reprepro -V --basedir ./output/repo/ includedeb kinetic ./output/gamescope*.deb + +# Push the updated ppa repo to the server +rsync -azP ./output/repo/ ferreo@direct.pika-os.com:/srv/www/pikappa/