summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Reider <[email protected]>2022-11-13 15:58:24 +0100
committerGitHub <[email protected]>2022-11-13 15:58:24 +0100
commit7990b32dd28be4e42979074212a3f2e7938aadee (patch)
tree6f56e161e747f17a8ccba1d3b7b784ead9866a9c
parentc82adeb7c09cf9200e6f0ca217443c9d8bcd20bd (diff)
Add PKGBUILD stable and -git, AUR publish and Arch build GitHub Actions (#31)
* Create AUR_publish.yml * Added PKGBUILD * Switched AUR publish addon * Added arch-build action * Remove useless step in arch-build * Checkout latest tag instead of master for Arch and Fedora publish actions * Added -git PKGBUILD and added wlroots < 0.16 as dependency * Checkout master before running swayfx-git aur script * Check build for stable PKGBUILD after -git version * Removed spaces in wlroots depends version
-rw-r--r--.github/workflows/AUR_publish.yml54
-rw-r--r--.github/workflows/arch-build.yml35
-rw-r--r--.github/workflows/fedora-build.yml2
-rw-r--r--.github/workflows/fedora-copr.yml8
-rw-r--r--build-scripts/aur-git/50-systemd-user.conf7
-rw-r--r--build-scripts/aur-git/PKGBUILD78
-rw-r--r--build-scripts/aur-git/sway.install31
-rw-r--r--build-scripts/aur/50-systemd-user.conf7
-rw-r--r--build-scripts/aur/PKGBUILD73
-rw-r--r--build-scripts/aur/sway.install31
10 files changed, 324 insertions, 2 deletions
diff --git a/.github/workflows/AUR_publish.yml b/.github/workflows/AUR_publish.yml
new file mode 100644
index 00000000..2fbc9ab3
--- /dev/null
+++ b/.github/workflows/AUR_publish.yml
@@ -0,0 +1,54 @@
+name: Package for the AUR
+
+on:
+ release:
+ types: [published]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+jobs:
+ aur-publish:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check out sources
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ # Checks out the latest tag
+ - run: |
+ git stash save "Action stashing changes"
+ latestTag=$(git describe --abbrev=0 --tags)
+ git checkout $latestTag
+
+ - name: Publish AUR Stable package
+ uses: ulises-jeremias/github-actions-aur-publish@v1
+ with:
+ pkgname: swayfx
+ pkgbuild: ./build-scripts/aur/PKGBUILD
+ assets: |
+ ./build-scripts/aur/50-systemd-user.conf
+ ./build-scripts/aur/sway.install
+ commit_username: ${{ secrets.AUR_USERNAME }}
+ commit_email: ${{ secrets.AUR_EMAIL }}
+ ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
+ commit_message: Update AUR package
+ ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
+ update_pkgver: false
+
+ # Checks out the the Master branch
+ - run: |
+ git checkout master
+ - name: Publish AUR -git package
+ uses: ulises-jeremias/github-actions-aur-publish@v1
+ with:
+ pkgname: swayfx-git
+ pkgbuild: ./build-scripts/aur-git/PKGBUILD
+ assets: |
+ ./build-scripts/aur-git/50-systemd-user.conf
+ ./build-scripts/aur-git/sway.install
+ commit_username: ${{ secrets.AUR_USERNAME }}
+ commit_email: ${{ secrets.AUR_EMAIL }}
+ ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
+ commit_message: Update AUR package
+ ssh_keyscan_types: rsa,dsa,ecdsa,ed25519
+ update_pkgver: false
diff --git a/.github/workflows/arch-build.yml b/.github/workflows/arch-build.yml
new file mode 100644
index 00000000..97222207
--- /dev/null
+++ b/.github/workflows/arch-build.yml
@@ -0,0 +1,35 @@
+name: Check build for Arch.
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ arch-build:
+ container: archlinux:latest
+ runs-on: ubuntu-latest
+
+ steps:
+ # It is necessary to checkout into sub-directory, because of some weird ownership problems cause by using containers
+ - name: Check out sources
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+ path: swayfx
+
+ - name: Git makepkg build and check
+ id: makepkg
+ uses: edlanglois/pkgbuild-action@v1
+ with:
+ pkgdir: ./swayfx/build-scripts/aur-git
+
+ - name: Stable makepkg build and check
+ id: makepkg
+ uses: edlanglois/pkgbuild-action@v1
+ with:
+ pkgdir: ./swayfx/build-scripts/aur
diff --git a/.github/workflows/fedora-build.yml b/.github/workflows/fedora-build.yml
index 3ce383ba..97ecf79f 100644
--- a/.github/workflows/fedora-build.yml
+++ b/.github/workflows/fedora-build.yml
@@ -10,7 +10,7 @@ on:
workflow_dispatch:
jobs:
- package:
+ fedora-build:
container: fedora:37
runs-on: ubuntu-latest
diff --git a/.github/workflows/fedora-copr.yml b/.github/workflows/fedora-copr.yml
index c84f699e..ba1c8b6d 100644
--- a/.github/workflows/fedora-copr.yml
+++ b/.github/workflows/fedora-copr.yml
@@ -8,7 +8,7 @@ on:
workflow_dispatch:
jobs:
- package:
+ fedora-copr:
container: fedora:latest
runs-on: ubuntu-latest
@@ -31,6 +31,12 @@ jobs:
with:
fetch-depth: 0
path: swayfx
+ # Checks out the latest tag
+ - run: |
+ cd swayfx
+ git stash save "Action stashing changes"
+ latestTag=$(git describe --abbrev=0 --tags)
+ git checkout $latestTag
- name: Copy spec into root dir
run: |
diff --git a/build-scripts/aur-git/50-systemd-user.conf b/build-scripts/aur-git/50-systemd-user.conf
new file mode 100644
index 00000000..d75ccdb2
--- /dev/null
+++ b/build-scripts/aur-git/50-systemd-user.conf
@@ -0,0 +1,7 @@
+# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
+# See FS#63021
+# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.
+
+exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
+exec hash dbus-update-activation-environment 2>/dev/null && \
+ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
diff --git a/build-scripts/aur-git/PKGBUILD b/build-scripts/aur-git/PKGBUILD
new file mode 100644
index 00000000..1b153338
--- /dev/null
+++ b/build-scripts/aur-git/PKGBUILD
@@ -0,0 +1,78 @@
+# Maintainer: Erik Reider <[email protected]>
+_pkgname=swayfx
+pkgname="$_pkgname-git"
+pkgver=r6905.e2ef3ceb
+pkgrel=1
+license=("MIT")
+pkgdesc="SwayFX: Sway, but with eye candy!"
+makedepends=(
+ "git"
+ "meson"
+ "scdoc"
+ "wayland-protocols"
+)
+depends=(
+ "cairo"
+ "gdk-pixbuf2"
+ "libevdev.so"
+ "libinput"
+ "libjson-c.so"
+ "libudev.so"
+ "libwayland-server.so"
+ "libwlroots.so"
+ "libxcb"
+ "libxkbcommon.so"
+ "pango"
+ "pcre"
+ "ttf-font"
+ "wlroots<0.16"
+)
+optdepends=(
+ "alacritty: Terminal emulator used by the default config"
+ "dmenu: Application launcher"
+ "grim: Screenshot utility"
+ "i3status: Status line"
+ "mako: Lightweight notification daemon"
+ "slurp: Select a region"
+ "swayidle: Idle management daemon"
+ "swaylock: Screen locker"
+ "wallutils: Timed wallpapers"
+ "waybar: Highly customizable bar"
+)
+backup=(etc/sway/config)
+arch=("i686" "x86_64")
+url="https://github.com/WillPower3309/swayfx"
+source=("${pkgname%-*}::git+${url}.git"
+ 50-systemd-user.conf)
+sha512sums=(
+ "SKIP"
+ "c2b7d808f4231f318e03789015624fd4cf32b81434b15406570b4e144c0defc54e216d881447e6fd9fc18d7da608cccb61c32e0e1fab2f1fe2750acf812d3137")
+provides=("sway" "swayfx")
+conflicts=("sway" "swayfx")
+options=(debug)
+install=sway.install
+
+pkgver() {
+ cd "$_pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ arch-meson \
+ -Dsd-bus-provider=libsystemd \
+ -Dwerror=false \
+ "$_pkgname" build
+ meson compile -C build
+}
+
+package() {
+ install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/"
+
+ DESTDIR="$pkgdir" meson install -C build
+
+ cd "$_pkgname"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do
+ install -Dm755 "contrib/$util" -t "$pkgdir/usr/share/$pkgname/scripts"
+ done
+}
diff --git a/build-scripts/aur-git/sway.install b/build-scripts/aur-git/sway.install
new file mode 100644
index 00000000..ef4fe013
--- /dev/null
+++ b/build-scripts/aur-git/sway.install
@@ -0,0 +1,31 @@
+post_install() {
+cat << EOD
+Sway requires additional setup for privilege escalation. Without this setup,
+sway will fail to start with session activation permission failures. Choose one
+of the two available options (In alphabetical, not recommended, order):
+
+1. polkit: This will make sway "just work" right after installation but may be
+ a weightier solution than desired.
+
+2. seatd: Already required as a sway dependency, this is a lighter-weight
+ solution but requires some user configuration: Enabling the service,
+ adding your user to the "seat" group, then logging out/in again.
+
+Either option should provide the same functionality/stability. Refer to the
+Sway wiki page for information.
+EOD
+}
+
+post_upgrade() {
+cat << EOD
+Sway's necessary privileges can now be obtained through seatd as well as the
+incumbent polkit package. As such, polkit has been relegated to an optional
+dependency.
+
+Note that using seatd instead of polkit means that a user must be a part of the
+"seat" group: Otherwise, the user will not be able to achieve the appropriate
+privileged actions.
+
+For more information, refer to the Sway wiki page.
+EOD
+}
diff --git a/build-scripts/aur/50-systemd-user.conf b/build-scripts/aur/50-systemd-user.conf
new file mode 100644
index 00000000..d75ccdb2
--- /dev/null
+++ b/build-scripts/aur/50-systemd-user.conf
@@ -0,0 +1,7 @@
+# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment
+# See FS#63021
+# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal.
+
+exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
+exec hash dbus-update-activation-environment 2>/dev/null && \
+ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
diff --git a/build-scripts/aur/PKGBUILD b/build-scripts/aur/PKGBUILD
new file mode 100644
index 00000000..bf8ae551
--- /dev/null
+++ b/build-scripts/aur/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Erik Reider <[email protected]>
+_pkgname=swayfx
+pkgname="$_pkgname"
+pkgver=0.1
+pkgrel=1
+license=("MIT")
+pkgdesc="SwayFX: Sway, but with eye candy!"
+makedepends=(
+ "git"
+ "meson"
+ "scdoc"
+ "wayland-protocols"
+)
+depends=(
+ "cairo"
+ "gdk-pixbuf2"
+ "libevdev.so"
+ "libinput"
+ "libjson-c.so"
+ "libudev.so"
+ "libwayland-server.so"
+ "libwlroots.so"
+ "libxcb"
+ "libxkbcommon.so"
+ "pango"
+ "pcre"
+ "ttf-font"
+ "wlroots<0.16"
+)
+optdepends=(
+ "alacritty: Terminal emulator used by the default config"
+ "dmenu: Application launcher"
+ "grim: Screenshot utility"
+ "i3status: Status line"
+ "mako: Lightweight notification daemon"
+ "slurp: Select a region"
+ "swayidle: Idle management daemon"
+ "swaylock: Screen locker"
+ "wallutils: Timed wallpapers"
+ "waybar: Highly customizable bar"
+)
+backup=(etc/sway/config)
+arch=("i686" "x86_64")
+url="https://github.com/WillPower3309/swayfx"
+source=("${url}/releases/download/$pkgver/swayfx-$pkgver.tar.gz"
+ 50-systemd-user.conf)
+sha512sums=(
+ "SKIP"
+ "c2b7d808f4231f318e03789015624fd4cf32b81434b15406570b4e144c0defc54e216d881447e6fd9fc18d7da608cccb61c32e0e1fab2f1fe2750acf812d3137")
+provides=("sway" "swayfx")
+conflicts=("sway" "swayfx")
+options=(debug)
+install=sway.install
+
+build() {
+ arch-meson \
+ -Dsd-bus-provider=libsystemd \
+ -Dwerror=false \
+ "$_pkgname" build
+ meson compile -C build
+}
+
+package() {
+ install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/"
+
+ DESTDIR="$pkgdir" meson install -C build
+
+ cd "$_pkgname"
+ install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do
+ install -Dm755 "contrib/$util" -t "$pkgdir/usr/share/$pkgname/scripts"
+ done
+}
diff --git a/build-scripts/aur/sway.install b/build-scripts/aur/sway.install
new file mode 100644
index 00000000..ef4fe013
--- /dev/null
+++ b/build-scripts/aur/sway.install
@@ -0,0 +1,31 @@
+post_install() {
+cat << EOD
+Sway requires additional setup for privilege escalation. Without this setup,
+sway will fail to start with session activation permission failures. Choose one
+of the two available options (In alphabetical, not recommended, order):
+
+1. polkit: This will make sway "just work" right after installation but may be
+ a weightier solution than desired.
+
+2. seatd: Already required as a sway dependency, this is a lighter-weight
+ solution but requires some user configuration: Enabling the service,
+ adding your user to the "seat" group, then logging out/in again.
+
+Either option should provide the same functionality/stability. Refer to the
+Sway wiki page for information.
+EOD
+}
+
+post_upgrade() {
+cat << EOD
+Sway's necessary privileges can now be obtained through seatd as well as the
+incumbent polkit package. As such, polkit has been relegated to an optional
+dependency.
+
+Note that using seatd instead of polkit means that a user must be a part of the
+"seat" group: Otherwise, the user will not be able to achieve the appropriate
+privileged actions.
+
+For more information, refer to the Sway wiki page.
+EOD
+}