Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from flameshot-org:master #81

Merged
merged 2 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 48 additions & 20 deletions .github/workflows/Linux-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ env:
PRODUCT: flameshot
RELEASE: 1
# dockerfiles, see https://github.com/flameshot-org/flameshot-dockerfiles
# docker images, see https://hub.docker.com/r/flameshotorg/ci-building-images
# flameshotorg/ci-building-images or packpack/packpack
# docker images, see https://quay.io/repository/flameshot-org/ci-building
DOCKER_REPO: quay.io/flameshot-org/ci-building
# building tool: https://github.com/flameshot-org/packpack
PACKPACK_REPO: flameshot-org/packpack
# available upload services: wetransfer.com, file.io, 0x0.st
UPLOAD_SERVICE: wetransfer.com

jobs:
deb-pack:
name: Build deb on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -175,6 +175,7 @@ jobs:
repository: ${{ env.PACKPACK_REPO }}
path: tools
ref: multiarch
set-safe-directory: $GITHUB_WORKSPACE/tools
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
env:
OS: ${{ matrix.dist.os }}
Expand Down Expand Up @@ -232,16 +233,17 @@ jobs:
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.${{ matrix.dist.name }}.${{ matrix.dist.arch }}.deb.sha256sum
overwrite: true

rpm-pack:
name: Build rpm on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -258,6 +260,12 @@ jobs:
symbol: 40,
arch: x86_64
}
- {
name: opensuse-leap-15.5,
os: opensuse-leap,
symbol: 15.5,
arch: x86_64
}
- {
name: opensuse-leap-15.6,
os: opensuse-leap,
Expand Down Expand Up @@ -294,9 +302,21 @@ jobs:
repository: ${{ env.PACKPACK_REPO }}
path: tools
ref: master
set-safe-directory: $GITHUB_WORKSPACE/tools
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
if: matrix.dist.os == 'fedora'
run: |
cp -r $GITHUB_WORKSPACE/packaging/rpm $GITHUB_WORKSPACE
mkdir $GITHUB_WORKSPACE/rpm
cp $GITHUB_WORKSPACE/packaging/rpm/fedora/flameshot.spec $GITHUB_WORKSPACE/rpm
bash $GITHUB_WORKSPACE/tools/packpack
env:
OS: ${{ matrix.dist.os }}
DIST: ${{ matrix.dist.symbol }}
- name: Packaging on ${{ matrix.dist.name }} ${{ matrix.dist.arch }}
if: matrix.dist.os == 'opensuse-leap'
run: |
mkdir $GITHUB_WORKSPACE/rpm
cp $GITHUB_WORKSPACE/packaging/rpm/opensuse/flameshot.spec $GITHUB_WORKSPACE/rpm
bash $GITHUB_WORKSPACE/tools/packpack
env:
OS: ${{ matrix.dist.os }}
Expand Down Expand Up @@ -339,33 +359,36 @@ jobs:
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
if: matrix.dist.os == 'fedora'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/
overwrite: true

- name: Artifact Upload
if: matrix.dist.os == 'opensuse-leap'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-lp${{ matrix.dist.symbol }}.${{ matrix.dist.arch }}.rpm.sha256sum
overwrite: true

appimage-pack:
name: Build appimage on ${{ matrix.config.name }}
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- {
name: ubuntu-20.04,
name: ubuntu-22.04,
os: ubuntu,
symbol: focal,
symbol: jammy,
arch: amd64,
image_repo: flameshotorg/ci-building-images
image_repo: quay.io/flameshot-org/ci-building
}
container:
image: ${{ matrix.config.image_repo }}:${{ matrix.config.os }}-${{ matrix.config.symbol }}
Expand Down Expand Up @@ -410,7 +433,9 @@ jobs:
cmake \
extra-cmake-modules \
build-essential \
qt5-default \
qt5-qmake \
qtbase5-dev \
qtbase5-dev-tools \
qttools5-dev-tools \
qttools5-dev \
libqt5dbus5 \
Expand Down Expand Up @@ -481,16 +506,17 @@ jobs:
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/Flameshot-${VERSION}.x86_64.AppImage)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/Flameshot-*.x86_64.AppImage
${{ github.workspace }}/Flameshot-*.x86_64.AppImage.sha256sum
overwrite: true

flatpak-pack:
name: Build flatpak on ubuntu-20.04
runs-on: ubuntu-20.04
name: Build flatpak on ubuntu 22.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
Expand Down Expand Up @@ -547,16 +573,17 @@ jobs:
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.x86_64.flatpak)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak
${{ github.workspace }}/org.flameshot.Flameshot-*.x86_64.flatpak.sha256sum
overwrite: true

snap-pack:
name: Build snap on ubuntu-20.04
runs-on: ubuntu-20.04
name: Build snap on ubuntu 22.04
runs-on: ubuntu-22.04
steps:
- name: Checkout Source code
if: github.event_name == 'push'
Expand Down Expand Up @@ -604,9 +631,10 @@ jobs:
echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/build/${PRODUCT}-${VERSION}-${RELEASE}.amd64.snap)
echo "======no operation for you can see link in the log console====="
- name: Artifact Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux-distribution-artifact
path: |
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap
${{ github.workspace }}/build/${{ env.PRODUCT }}-*-${{ env.RELEASE }}.amd64.snap.sha256sum
overwrite: true
3 changes: 2 additions & 1 deletion .github/workflows/MacOS-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ jobs:
echo "=====no operation for you can see link in the log console====="

- name: Artifact Upload
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MacOS-artifact
path: ${{ github.workspace }}/build/src/flameshot.dmg
overwrite: true

- name: Notarization status
shell: bash
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Windows-pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,4 @@ jobs:
with:
name: Windows-${{ matrix.config.arch }}-${{ matrix.type }}-artifact
path: ${{ github.workspace }}/build/Package/*
overwrite: true
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
#
# spec file for package flameshot on fedora, rehl, opensuse leap 15.x
# spec file for package flameshot on fedora, rehl
#

# fedora >= 30, rhel >=7
%define is_rhel_or_fedora (0%{?fedora} && 0%{?fedora} >= 30) || (0%{?rhel} && 0%{?rhel} >= 7)
# openSUSE Leap >= 15.2
%define is_suse_leap (0%{?is_opensuse} && 0%{?sle_version} >= 150200)

Name: flameshot
Version: 12.1.0
%if %{is_rhel_or_fedora}
Release: 1%{?dist}
%endif
%if %{is_suse_leap}
Release: 1
%endif
License: GPLv3+ and ASL 2.0 and GPLv2 and LGPLv3 and Free Art
Summary: Powerful yet simple to use screenshot software
URL: https://github.com/flameshot-org/flameshot
Expand All @@ -23,20 +12,12 @@ Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: cmake >= 3.13.0
BuildRequires: gcc-c++ >= 7
BuildRequires: fdupes
%if %{is_suse_leap}
BuildRequires: update-desktop-files
BuildRequires: appstream-glib
%endif
%if %{is_rhel_or_fedora}
BuildRequires: libappstream-glib
BuildRequires: ninja-build
%endif
BuildRequires: desktop-file-utils

BuildRequires: cmake(Qt5Core) >= 5.9.0
%if %{is_rhel_or_fedora}
BuildRequires: cmake(KF5GuiAddons) >= 5.89.0
%endif
BuildRequires: cmake(Qt5DBus) >= 5.9.0
BuildRequires: cmake(Qt5Gui) >= 5.9.0
BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0
Expand All @@ -46,16 +27,10 @@ BuildRequires: cmake(Qt5Widgets) >= 5.9.0


Requires: hicolor-icon-theme
%if %{is_rhel_or_fedora}
Requires: qt5-qtbase >= 5.9.0
Requires: qt5-qttools >= 5.9.0
Requires: qt5-qtsvg%{?_isa} >= 5.9.0
%endif
%if %{is_suse_leap}
Requires: libQt5Core5 >= 5.9.0
Requires: libqt5-qttools >= 5.9.0
Requires: libQt5Svg5 >= 5.9.0
%endif

Recommends: xdg-desktop-portal%{?_isa}
Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa})
Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa})
Expand All @@ -77,33 +52,19 @@ Features:
%autosetup -p1

%build
%if %{is_suse_leap}
%cmake -DCMAKE_BUILD_TYPE=Release
%endif
%if %{is_rhel_or_fedora}

%cmake -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DUSE_WAYLAND_CLIPBOARD:BOOL=ON \
%endif
%cmake_build

%install
%cmake_install
# https://fedoraproject.org/wiki/PackagingDrafts/find_lang
%find_lang Internationalization --with-qt
%if %{is_suse_leap}
%suse_update_desktop_file -r org.flameshot.Flameshot Utility X-SuSE-DesktopUtility
%endif
%fdupes %{buildroot}%{_datadir}/icons

%check
%if %{is_rhel_or_fedora}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml
%endif
%if %{is_suse_leap}
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/*.metainfo.xml
%endif
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

%files -f Internationalization.lang
Expand All @@ -116,12 +77,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop
%dir %{_datadir}/zsh/site-functions
%{_bindir}/%{name}
%{_datadir}/applications/org.flameshot.Flameshot.desktop
%if %{is_suse_leap}
%{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml
%endif
%if %{is_rhel_or_fedora}
%{_metainfodir}/org.flameshot.Flameshot.metainfo.xml
%endif
%{_datadir}/bash-completion/completions/%{name}
%{_datadir}/zsh/site-functions/_%{name}
%{_datadir}/fish/vendor_completions.d/%{name}.fish
Expand Down
Loading
Loading