Skip to content

Commit 54644df

Browse files
authored
ci: enhancements and updates (flameshot-org#3685)
* ci: update transferwee from upstream * chore: separate RPM spec into two files * ci: enhancements and updates - move to quay from dockerhub due to pull rate limit - add debian 12, ubuntu 24.04, fedora 39/40, opensue leap 15.5/15.6 - the building envrinments of appimage/snap/flatpak update to ubuntu 22.04
1 parent a1e5d2e commit 54644df

File tree

4 files changed

+591
-193
lines changed

4 files changed

+591
-193
lines changed

.github/workflows/Linux-pack.yml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ env:
2020
PRODUCT: flameshot
2121
RELEASE: 1
2222
# dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles
23-
# docker images, see https://hub.docker.com/r/flameshotorg/ci-building-images
24-
# flameshotorg/ci-building-images or packpack/packpack
23+
# docker images, see https://quay.io/repository/flameshot-org/ci-building
2524
DOCKER_REPO: quay.io/flameshot-org/ci-building
25+
# building tool: https://github.com/flameshot-org/packpack
2626
PACKPACK_REPO: flameshot-org/packpack
2727
# available upload services: wetransfer.com, file.io, 0x0.st
2828
UPLOAD_SERVICE: wetransfer.com
2929

3030
jobs:
3131
deb-pack:
3232
name: Build deb on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
33-
runs-on: ubuntu-22.04
33+
runs-on: ubuntu-latest
3434
strategy:
3535
fail-fast: false
3636
matrix:
@@ -175,6 +175,7 @@ jobs:
175175
repository: ${{ env.PACKPACK_REPO }}
176176
path: tools
177177
ref: multiarch
178+
set-safe-directory: $GITHUB_WORKSPACE/tools
178179
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
179180
env:
180181
OS: ${{ matrix.dist.os }}
@@ -242,7 +243,7 @@ jobs:
242243

243244
rpm-pack:
244245
name: Build rpm on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
245-
runs-on: ubuntu-22.04
246+
runs-on: ubuntu-latest
246247
strategy:
247248
fail-fast: false
248249
matrix:
@@ -259,6 +260,12 @@ jobs:
259260
symbol: 40,
260261
arch: x86_64
261262
}
263+
- {
264+
name: opensuse-leap-15.5,
265+
os: opensuse-leap,
266+
symbol: 15.5,
267+
arch: x86_64
268+
}
262269
- {
263270
name: opensuse-leap-15.6,
264271
os: opensuse-leap,
@@ -295,9 +302,21 @@ jobs:
295302
repository: ${{ env.PACKPACK_REPO }}
296303
path: tools
297304
ref: master
305+
set-safe-directory: $GITHUB_WORKSPACE/tools
298306
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
307+
if: matrix.dist.os == 'fedora'
299308
run: |
300-
cp -r $GITHUB_WORKSPACE/packaging/rpm $GITHUB_WORKSPACE
309+
mkdir $GITHUB_WORKSPACE/rpm
310+
cp $GITHUB_WORKSPACE/packaging/rpm/fedora/flameshot.spec $GITHUB_WORKSPACE/rpm
311+
bash $GITHUB_WORKSPACE/tools/packpack
312+
env:
313+
OS: ${{ matrix.dist.os }}
314+
DIST: ${{ matrix.dist.symbol }}
315+
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
316+
if: matrix.dist.os == 'opensuse-leap'
317+
run: |
318+
mkdir $GITHUB_WORKSPACE/rpm
319+
cp $GITHUB_WORKSPACE/packaging/rpm/opensuse/flameshot.spec $GITHUB_WORKSPACE/rpm
301320
bash $GITHUB_WORKSPACE/tools/packpack
302321
env:
303322
OS: ${{ matrix.dist.os }}
@@ -359,17 +378,17 @@ jobs:
359378

360379
appimage-pack:
361380
name: Build appimage on ${{ matrix.config.name }}
362-
runs-on: ubuntu-22.04
381+
runs-on: ubuntu-latest
363382
strategy:
364383
fail-fast: false
365384
matrix:
366385
config:
367386
- {
368-
name: ubuntu-20.04,
387+
name: ubuntu-22.04,
369388
os: ubuntu,
370-
symbol: focal,
389+
symbol: jammy,
371390
arch: amd64,
372-
image_repo: flameshotorg/ci-building-images
391+
image_repo: quay.io/flameshot-org/ci-building
373392
}
374393
container:
375394
image: ${{ matrix.config.image_repo }}:${{ matrix.config.os }}-${{ matrix.config.symbol }}
@@ -414,7 +433,9 @@ jobs:
414433
cmake \
415434
extra-cmake-modules \
416435
build-essential \
417-
qt5-default \
436+
qt5-qmake \
437+
qtbase5-dev \
438+
qtbase5-dev-tools \
418439
qttools5-dev-tools \
419440
qttools5-dev \
420441
libqt5dbus5 \
@@ -494,8 +515,8 @@ jobs:
494515
overwrite: true
495516

496517
flatpak-pack:
497-
name: Build flatpak on ubuntu-20.04
498-
runs-on: ubuntu-20.04
518+
name: Build flatpak on ubuntu 22.04
519+
runs-on: ubuntu-22.04
499520
steps:
500521
- name: Checkout Source code
501522
if: github.event_name == 'push'
@@ -561,8 +582,8 @@ jobs:
561582
overwrite: true
562583

563584
snap-pack:
564-
name: Build snap on ubuntu-20.04
565-
runs-on: ubuntu-20.04
585+
name: Build snap on ubuntu 22.04
586+
runs-on: ubuntu-22.04
566587
steps:
567588
- name: Checkout Source code
568589
if: github.event_name == 'push'
Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
#
2-
# spec file for package flameshot on fedora, rehl, opensuse leap 15.x
2+
# spec file for package flameshot on fedora, rehl
33
#
4-
5-
# fedora >= 30, rhel >=7
6-
%define is_rhel_or_fedora (0%{?fedora} && 0%{?fedora} >= 30) || (0%{?rhel} && 0%{?rhel} >= 7)
7-
# openSUSE Leap >= 15.2
8-
%define is_suse_leap (0%{?is_opensuse} && 0%{?sle_version} >= 150200)
9-
104
Name: flameshot
115
Version: 12.1.0
12-
%if %{is_rhel_or_fedora}
136
Release: 1%{?dist}
14-
%endif
15-
%if %{is_suse_leap}
16-
Release: 1
17-
%endif
187
License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art
198
Summary: Powerful yet simple to use screenshot software
209
URL: https://github.com/flameshot-org/flameshot
@@ -23,20 +12,12 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
2312
BuildRequires: cmake >= 3.13.0
2413
BuildRequires: gcc-c++ >= 7
2514
BuildRequires: fdupes
26-
%if %{is_suse_leap}
27-
BuildRequires: update-desktop-files
28-
BuildRequires: appstream-glib
29-
%endif
30-
%if %{is_rhel_or_fedora}
3115
BuildRequires: libappstream-glib
3216
BuildRequires: ninja-build
33-
%endif
3417
BuildRequires: desktop-file-utils
3518

3619
BuildRequires: cmake(Qt5Core) >= 5.9.0
37-
%if %{is_rhel_or_fedora}
3820
BuildRequires: cmake(KF5GuiAddons) >= 5.89.0
39-
%endif
4021
BuildRequires: cmake(Qt5DBus) >= 5.9.0
4122
BuildRequires: cmake(Qt5Gui) >= 5.9.0
4223
BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0
@@ -46,16 +27,10 @@ BuildRequires: cmake(Qt5Widgets) >= 5.9.0
4627

4728

4829
Requires: hicolor-icon-theme
49-
%if %{is_rhel_or_fedora}
5030
Requires: qt5-qtbase >= 5.9.0
5131
Requires: qt5-qttools >= 5.9.0
5232
Requires: qt5-qtsvg%{?_isa} >= 5.9.0
53-
%endif
54-
%if %{is_suse_leap}
55-
Requires: libQt5Core5 >= 5.9.0
56-
Requires: libqt5-qttools >= 5.9.0
57-
Requires: libQt5Svg5 >= 5.9.0
58-
%endif
33+
5934
Recommends: xdg-desktop-portal%{?_isa}
6035
Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
6136
Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
@@ -77,33 +52,19 @@ Features:
7752
%autosetup -p1
7853

7954
%build
80-
%if %{is_suse_leap}
81-
%cmake -DCMAKE_BUILD_TYPE=Release
82-
%endif
83-
%if %{is_rhel_or_fedora}
84-
8555
%cmake -G Ninja \
8656
-DCMAKE_BUILD_TYPE=Release \
8757
-DUSE_WAYLAND_CLIPBOARD:BOOL=ON \
88-
%endif
8958
%cmake_build
9059

9160
%install
9261
%cmake_install
9362
# https://fedoraproject.org/wiki/PackagingDrafts/find_lang
9463
%find_lang Internationalization --with-qt
95-
%if %{is_suse_leap}
96-
%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
97-
%endif
9864
%fdupes %{buildroot}%{_datadir}/icons
9965

10066
%check
101-
%if %{is_rhel_or_fedora}
10267
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
103-
%endif
104-
%if %{is_suse_leap}
105-
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
106-
%endif
10768
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
10869

10970
%files -f Internationalization.lang
@@ -116,12 +77,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
11677
%dir %{_datadir}/zsh/site-functions
11778
%{_bindir}/%{name}
11879
%{_datadir}/applications/org.flameshot.Flameshot.desktop
119-
%if %{is_suse_leap}
120-
%{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
121-
%endif
122-
%if %{is_rhel_or_fedora}
12380
%{_metainfodir}/org.flameshot.Flameshot.metainfo.xml
124-
%endif
12581
%{_datadir}/bash-completion/completions/%{name}
12682
%{_datadir}/zsh/site-functions/_%{name}
12783
%{_datadir}/fish/vendor_completions.d/%{name}.fish
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
#
2+
# spec file for package flameshot on opensuse leap 15.x
3+
#
4+
Name: flameshot
5+
Version: 12.1.0
6+
Release: 1
7+
License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art
8+
Summary: Powerful yet simple to use screenshot software
9+
URL: https://github.com/flameshot-org/flameshot
10+
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
11+
12+
BuildRequires: cmake >= 3.13.0
13+
BuildRequires: gcc-c++ >= 7
14+
BuildRequires: fdupes
15+
BuildRequires: update-desktop-files
16+
BuildRequires: appstream-glib
17+
BuildRequires: desktop-file-utils
18+
19+
BuildRequires: cmake(Qt5Core) >= 5.9.0
20+
BuildRequires: cmake(Qt5DBus) >= 5.9.0
21+
BuildRequires: cmake(Qt5Gui) >= 5.9.0
22+
BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0
23+
BuildRequires: cmake(Qt5Network) >= 5.9.0
24+
BuildRequires: cmake(Qt5Svg) >= 5.9.0
25+
BuildRequires: cmake(Qt5Widgets) >= 5.9.0
26+
27+
28+
Requires: hicolor-icon-theme
29+
Requires: libQt5Core5 >= 5.9.0
30+
Requires: libqt5-qttools >= 5.9.0
31+
Requires: libQt5Svg5 >= 5.9.0
32+
33+
Recommends: xdg-desktop-portal%{?_isa}
34+
Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
35+
Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
36+
Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa})
37+
38+
%description
39+
Powerful and simple to use screenshot software with built-in
40+
editor with advanced features.
41+
42+
Features:
43+
44+
* Customizable appearance.
45+
* Easy to use.
46+
* In-app screenshot edition.
47+
* DBus interface.
48+
* Upload to Imgur
49+
50+
%prep
51+
%autosetup -p1
52+
53+
%build
54+
%cmake -DCMAKE_BUILD_TYPE=Release
55+
%cmake_build
56+
57+
%install
58+
%cmake_install
59+
# https://fedoraproject.org/wiki/PackagingDrafts/find_lang
60+
%find_lang Internationalization --with-qt
61+
%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
62+
%fdupes %{buildroot}%{_datadir}/icons
63+
64+
%check
65+
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
66+
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
67+
68+
%files -f Internationalization.lang
69+
%{_datadir}/%{name}/translations/Internationalization_grc.qm
70+
%doc README.md
71+
%license LICENSE
72+
%dir %{_datadir}/%{name}
73+
%dir %{_datadir}/%{name}/translations
74+
%dir %{_datadir}/bash-completion/completions
75+
%dir %{_datadir}/zsh/site-functions
76+
%{_bindir}/%{name}
77+
%{_datadir}/applications/org.flameshot.Flameshot.desktop
78+
%{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
79+
%{_datadir}/bash-completion/completions/%{name}
80+
%{_datadir}/zsh/site-functions/_%{name}
81+
%{_datadir}/fish/vendor_completions.d/%{name}.fish
82+
%{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml
83+
%{_datadir}/dbus-1/services/org.flameshot.Flameshot.service
84+
%{_datadir}/icons/hicolor/*/apps/*.png
85+
%{_datadir}/icons/hicolor/scalable/apps/*.svg
86+
%{_mandir}/man1/%{name}.1*
87+
88+
%changelog
89+
* Wed Jun 21 2022 Jeremy Borgman <[email protected]> - 12.0.0-1
90+
- Update for 12.0 release.
91+
92+
* Fri Jan 14 2022 Jeremy Borgman <[email protected]> - 11.0.0-1
93+
- Update for 11.0 release.
94+
95+
* Sun Aug 29 2021 Zetao Yang <[email protected]> - 0.10.1-2
96+
- Minor SPEC fixes.
97+
98+
* Sun Jul 25 2021 Jeremy Borgman <[email protected]> - 0.10.1-1
99+
- Updated for flameshot 0.10.1
100+
101+
* Mon May 17 2021 Jeremy Borgman <[email protected]> - 0.10.0-1
102+
- Updated for flameshot 0.10.0
103+
104+
* Sat Feb 27 2021 Jeremy Borgman <[email protected]> - 0.9.0-1
105+
- Updated for flameshot 0.9.0
106+
107+
* Wed Oct 14 2020 Jeremy Borgman <[email protected]> - 0.8.5-1
108+
- Updated for flameshot 0.8.5
109+
110+
* Sat Oct 10 2020 Jeremy Borgman <[email protected]> - 0.8.4-1
111+
- Updated for flameshot 0.8.4
112+
113+
* Sat Sep 19 2020 Jeremy Borgman <[email protected]> - 0.8.3-1
114+
- Updated for flameshot 0.8.3
115+
116+
* Mon Sep 07 2020 Zetao Yang <[email protected]> - 0.8.0-1
117+
- Updated for flameshot 0.8.0
118+
- More details, please see https://flameshot.org/changelog/#v080
119+
120+
* Sat Aug 18 2018 Zetao Yang <[email protected]> - 0.6.0-1
121+
- Updated for flameshot 0.6.0
122+
- More details, please see https://flameshot.org/changelog/#v060
123+
124+
* Tue Jan 09 2018 Zetao Yang <[email protected]> - 0.5.0-1
125+
- Initial package for flameshot 0.5.0
126+
- More details, please see https://flameshot.org/changelog/#v050

0 commit comments

Comments
 (0)