Skip to content

Commit 1534a89

Browse files
authored
Uniformize both spec files + ninja build openSUSE (flameshot-org#4658)
* Uniformize both spec files + ninja build openSUSE * Match same license everywhere
1 parent c549f7b commit 1534a89

5 files changed

Lines changed: 78 additions & 196 deletions

File tree

.github/workflows/Linux-pack.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
if: matrix.dist.os == 'fedora'
198198
run: |
199199
mkdir $GITHUB_WORKSPACE/rpm
200-
cp $GITHUB_WORKSPACE/packaging/rpm/fedora/flameshot.spec $GITHUB_WORKSPACE/rpm
200+
cp $GITHUB_WORKSPACE/packaging/rpm/flameshot.spec $GITHUB_WORKSPACE/rpm
201201
bash $GITHUB_WORKSPACE/tools/packpack
202202
env:
203203
OS: ${{ matrix.dist.os }}
@@ -208,7 +208,7 @@ jobs:
208208
if: matrix.dist.os == 'opensuse-leap'
209209
run: |
210210
mkdir $GITHUB_WORKSPACE/rpm
211-
cp $GITHUB_WORKSPACE/packaging/rpm/opensuse/flameshot.spec $GITHUB_WORKSPACE/rpm
211+
cp $GITHUB_WORKSPACE/packaging/rpm/flameshot.spec $GITHUB_WORKSPACE/rpm
212212
bash $GITHUB_WORKSPACE/tools/packpack
213213
env:
214214
OS: ${{ matrix.dist.os }}

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,13 +356,15 @@ There are packages available in the repository of some Linux distributions:
356356
- [Debian 10+](https://tracker.debian.org/pkg/flameshot): `apt install flameshot`
357357
+ Package for Debian 9 ("Stretch") also [available via stretch-backports](https://backports.debian.org/).
358358
- [Ubuntu](https://launchpad.net/ubuntu/+source/flameshot): `apt install flameshot`
359+
+ A [PPA supporting Ubuntu 22.04 and newer](https://launchpad.net/~quentiumyt/+archive/ubuntu/flameshot) is provided by
360+
[Quentin Lienhardt](https://github.com/QuentiumYT) that offers an up-to-date version of `flameshot`.
359361
- [openSUSE](https://software.opensuse.org/package/flameshot): `zypper install flameshot`
360362
- [Void Linux](https://github.com/void-linux/void-packages/tree/master/srcpkgs/flameshot): `xbps-install flameshot`
361363
- [Solus](https://dev.getsol.us/source/flameshot/): `eopkg it flameshot`
362364
- [Fedora](https://src.fedoraproject.org/rpms/flameshot): `dnf install flameshot`
363365
- [NixOS](https://search.nixos.org/packages?query=flameshot): `nix-env -iA nixos.flameshot`
364366
- [ALT](https://packages.altlinux.org/en/sisyphus/srpms/flameshot/): `su - -c "apt-get install flameshot"`
365-
- [Snap/Flatpak/AppImage](https://github.com/flameshotapp/packages)
367+
- [Snap/Flatpak/AppImage](https://github.com/flameshot-org/packages)
366368
- [Docker](https://github.com/ManuelLR/docker-flameshot)
367369
- [Windows](https://github.com/majkinetor/au-packages/tree/master/flameshot)
368370

@@ -557,15 +559,15 @@ cmake --install "$BUILD_DIR"
557559
558560
## License
559561
560-
- The main code is licensed under [GPLv3](LICENSE)
562+
- The main code is licensed under [GPLv3+](LICENSE)
561563
- The logo of Flameshot is licensed under [Free Art License v1.3](data/img/app/flameshotLogoLicense.txt)
562564
- The button icons are licensed under Apache License 2.0. See: https://github.com/google/material-design-icons
563565
- The code at capture/capturewidget.cpp is based on https://github.com/ckaiser/Lightscreen/blob/master/dialogs/areadialog.cpp (GPLv2)
564566
- The code at capture/capturewidget.h is based on https://github.com/ckaiser/Lightscreen/blob/master/dialogs/areadialog.h (GPLv2)
565567
- I copied a few lines of code from KSnapshot regiongrabber.cpp revision `796531` (LGPL)
566568
- Qt-Color-Widgets taken and modified from https://github.com/mbasaglia/Qt-Color-Widgets (see their license and exceptions in the project) (LGPL/GPL)
567569
568-
Info: If I take code from your project and that implies a relicense to GPLv3, you can reuse my changes with the original previous license of your project applied.
570+
Info: If I take code from your project and that implies a relicense to GPLv3+, you can reuse my changes with the original previous license of your project applied.
569571
570572
## Privacy Policy
571573

data/man/man1/flameshot.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ The following URL gives you a more complete list of contributors:
337337
.SH "LICENSE"
338338
.nh
339339
.PP
340-
• The main code is licensed under GPLv3
340+
• The main code is licensed under GPLv3+
341341
.br
342342
• The logo of Flameshot is licensed under Free Art License v1.3
343343
.br

packaging/rpm/fedora/flameshot.spec

Lines changed: 0 additions & 166 deletions
This file was deleted.
Lines changed: 70 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,28 @@
1-
#
2-
# spec file for package flameshot on opensuse leap 15.x
3-
#
41
Name: flameshot
5-
Version: 13.1.0
6-
Release: 2
7-
License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art
2+
Version: 13.3.0
3+
Release: 1%{?dist}
84
Summary: Powerful yet simple to use screenshot software
5+
6+
License: GPL-3.0-or-later
97
URL: https://github.com/flameshot-org/flameshot
108
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
119
Vendor: Flameshot
1210

13-
BuildRequires: cmake >= 3.22
14-
BuildRequires: gcc-c++ >= 11
15-
BuildRequires: fdupes
11+
BuildRequires: git
12+
BuildRequires: cmake
13+
BuildRequires: desktop-file-utils
14+
BuildRequires: jdupes
15+
16+
%if 0%{?suse_version}
17+
BuildRequires: gcc15-c++
18+
BuildRequires: ninja
1619
BuildRequires: update-desktop-files
1720
BuildRequires: appstream-glib
18-
BuildRequires: desktop-file-utils
21+
%else
22+
BuildRequires: gcc-c++
23+
BuildRequires: ninja-build
24+
BuildRequires: libappstream-glib
25+
%endif
1926

2027
BuildRequires: cmake(Qt6Core) >= 6.2.4
2128
BuildRequires: cmake(Qt6DBus) >= 6.2.4
@@ -25,12 +32,27 @@ BuildRequires: cmake(Qt6Network) >= 6.2.4
2532
BuildRequires: cmake(Qt6Svg) >= 6.2.4
2633
BuildRequires: cmake(Qt6Widgets) >= 6.2.4
2734

35+
%if 0%{?fedora} || 0%{?suse_version} >= 1550 || (0%{?rhel} >= 10 && (0%{?centos} || 0%{?epel}))
36+
%global wayland_clipboard ON
37+
BuildRequires: kf6-kguiaddons-devel >= 6.7.0
38+
%else
39+
%global wayland_clipboard OFF
40+
%endif
41+
2842
Requires: hicolor-icon-theme
29-
Requires: qt6-base >= 6.2.4
30-
Requires: qt6-tools >= 6.2.4
31-
Requires: qt6-svg >= 6.2.4
3243

44+
%if 0%{?suse_version}
45+
Requires: qt6-svg
46+
%else
47+
Requires: qt6-svg%{?_isa}
48+
%endif
49+
50+
%if 0%{?suse_version}
3351
Recommends: qt6-imageformats
52+
%else
53+
Recommends: qt6-qtimageformats%{?_isa}
54+
%endif
55+
3456
Recommends: xdg-desktop-portal%{?_isa}
3557
Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
3658
Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
@@ -51,26 +73,50 @@ Features:
5173
%autosetup -p1
5274

5375
%build
54-
%cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS:BOOL=OFF
76+
%if 0%{?suse_version}
77+
export CXX=/usr/bin/g++-15
78+
79+
cmake -G Ninja -S . -B build \
80+
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
81+
-DCMAKE_BUILD_TYPE=Release \
82+
-DUSE_WAYLAND_CLIPBOARD=%{wayland_clipboard} \
83+
-DBUILD_SHARED_LIBS=OFF
84+
85+
cmake --build build -j $(nproc)
86+
%else
87+
%cmake -G Ninja \
88+
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
89+
-DCMAKE_BUILD_TYPE=Release \
90+
-DUSE_WAYLAND_CLIPBOARD=%{wayland_clipboard} \
91+
-DBUILD_SHARED_LIBS=OFF
5592

5693
%cmake_build
94+
%endif
5795

5896
%install
97+
%if 0%{?suse_version}
98+
DESTDIR=%{buildroot} cmake --install build
99+
%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
100+
%else
59101
%cmake_install
102+
%endif
103+
60104
rm -rf %{buildroot}%{_includedir}/QtColorWidgets
61105
rm -rf %{buildroot}%{_libdir}/cmake/QtColorWidgets
62106
rm -f %{buildroot}%{_libdir}/libQtColorWidgets.*
63107
rm -f %{buildroot}%{_libdir}/pkgconfig/QtColorWidgets.pc
64108
rm -rf %{buildroot}%{_includedir}/kdsingleapplication-qt6
65109
rm -rf %{buildroot}%{_libdir}/cmake/KDSingleApplication-qt6
66110
rm -f %{buildroot}%{_libdir}/libkdsingleapplication-qt6.*
67-
# https://fedoraproject.org/wiki/PackagingDrafts/find_lang
111+
68112
%find_lang Internationalization --with-qt
69-
%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
70-
%fdupes %{buildroot}%{_datadir}/icons
113+
114+
jdupes %{buildroot}%{_datadir}/icons
71115

72116
%check
73-
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
117+
%if ! (0%{?rhel} <= 9)
118+
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml || true
119+
%endif
74120
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
75121

76122
%files -f Internationalization.lang
@@ -94,22 +140,22 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
94140
%{_mandir}/man1/%{name}.1*
95141

96142
%changelog
97-
* Thu Mar 02 2026 Jeremy Borgman <borgman.jeremy@pm.me> - 14.0.rc1
143+
* Mon Mar 02 2026 Jeremy Borgman <borgman.jeremy@pm.me> - 14.0.rc1
98144
- Beta for 14 release
99145

100-
* Sat Oct 28 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.3.0
146+
* Tue Oct 28 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.3.0
101147
- Updated for v13.3.0 release
102148

103-
* Sat Oct 24 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.2.0
149+
* Fri Oct 24 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.2.0
104150
- Updated for v13.2.0 release
105151

106152
* Sat Aug 16 2025 Elliott Tallis <tallis.elliott@gmail.com> - 13.1.0-2
107153
- Minor spec file tweaks
108154

109-
* Sun Aug 15 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.1.0
155+
* Fri Aug 15 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.1.0
110156
- Update for v13.1.0 release
111157

112-
* Sun Aug 06 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.1
158+
* Wed Aug 06 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.1
113159
- Update for v13.0.1 release
114160

115161
* Sun Aug 03 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.0
@@ -118,7 +164,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
118164
* Sun Jul 27 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.rc2
119165
- Beta for 13 release.
120166

121-
* Sun Jul 12 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.rc1
167+
* Sat Jul 12 2025 Jeremy Borgman <borgman.jeremy@pm.me> - 13.0.rc1
122168
- Beta for 13 release.
123169

124170
* Sun Jul 03 2022 Jeremy Borgman <borgman.jeremy@pm.me> - 12.1.0-1

0 commit comments

Comments
 (0)