summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/fedora-copr.yml40
-rw-r--r--build-scripts/swayfx.rpkg.spec18
2 files changed, 49 insertions, 9 deletions
diff --git a/.github/workflows/fedora-copr.yml b/.github/workflows/fedora-copr.yml
index 74528ad1..64f5ab96 100644
--- a/.github/workflows/fedora-copr.yml
+++ b/.github/workflows/fedora-copr.yml
@@ -30,7 +30,7 @@ jobs:
- name: Install tooling for source RPM build
run: |
- dnf -y install copr-cli rpkg git
+ dnf -y install @development-tools @rpm-development-tools copr-cli rpkg git 'dnf-command(builddep)'
# It is necessary to checkout into sub-directory, because of some weird ownership problems cause by using containers
- name: Check out sources
@@ -38,17 +38,47 @@ jobs:
with:
fetch-depth: 0
path: swayfx
- # Checks out the latest tag
- - run: |
+
+ - name: Check out the latest tag
+ run: |
+ cp ./swayfx/build-scripts/swayfx.rpkg.spec ./
cd swayfx
git stash save "Action stashing changes"
latestTag=$(git describe --abbrev=0 --tags)
git checkout $latestTag
- - name: Copy spec into root dir
+ - name: Copy master spec into root dir
+ run: |
+ cd swayfx
+ cp ../swayfx.rpkg.spec ./
+
+ - name: Generate spec
+ run: |
+ cd swayfx
+ mkdir specs
+ rpkg spec --source --outdir specs
+
+ - name: Install build dependencies
+ run: |
+ cd swayfx
+ dnf -y builddep ./specs/swayfx.rpkg.spec
+
+ - name: Local build
run: |
cd swayfx
- cp ./build-scripts/swayfx.rpkg.spec ./
+ mkdir -p out
+ rpkg local --out `pwd`/out
+
+ - name: Test if installation of package is successful
+ run: |
+ cd swayfx/out
+
+ packages=(`rpmspec -q --nodebuginfo --qf \
+ "./%{ARCH}/%{Name}-%{Version}-%{Release}.%{ARCH}.rpm\n" \
+ ../specs/swayfx.rpkg.spec`)
+ for i in "${packages[@]}"; do
+ dnf -y install "$i"
+ done
- name: Submit the build to copr
run: |
diff --git a/build-scripts/swayfx.rpkg.spec b/build-scripts/swayfx.rpkg.spec
index 18b233a7..b69f0882 100644
--- a/build-scripts/swayfx.rpkg.spec
+++ b/build-scripts/swayfx.rpkg.spec
@@ -1,7 +1,14 @@
# vim: syntax=spec
+
+### CHANGE THESE VARIABLES BEFORE RELEASE:
+# Change to current Sway base version!
+%global SwayBaseVersion 1.7
+# Change to current SwayFX tag!
+%global Tag 0.1
+
Name: {{{ git_dir_name }}}
-Version: 0.1
-Release: 1%{?dist}
+Version: %{Tag}
+Release: 2%{?dist}
Summary: SwayFX: Sway, but with eye candy!
License: MIT
URL: https://github.com/WillPower3309/swayfx
@@ -58,6 +65,9 @@ Recommends: foot
Recommends: grim
%{?systemd_requires}
+Conflicts: sway
+Provides: sway = %{SwayBaseVersion}
+
%description
SwayFX: Sway, but with eye candy!
@@ -89,8 +99,8 @@ interface.
%build
%meson \
- -Dsd-bus-provider=libsystemd \
- -Dwerror=false
+ -Dsd-bus-provider=libsystemd \
+ -Dwerror=false
%meson_build