From 97cdf0dd85611c7216bb7a564d2e4531345c1b7e Mon Sep 17 00:00:00 2001 From: Jan Grulich Date: Mon, 9 May 2022 11:08:36 +0200 Subject: [PATCH] Update to 5.0 --- CMakeLists.txt | 6 +- dist/fedora/mediawriter.spec | 76 +++++++++++++------ .../org.fedoraproject.MediaWriter.appdata.xml | 2 +- ...g.fedoraproject.MediaWriter.appdata.xml.in | 2 +- 4 files changed, 58 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84458c4b..491a8d55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,10 +2,10 @@ project(MediaWriter) cmake_minimum_required(VERSION 3.17) -set(MEDIAWRITER_MAJOR_VERSION "4") -set(MEDIAWRITER_MINOR_VERSION "99") +set(MEDIAWRITER_MAJOR_VERSION "5") +set(MEDIAWRITER_MINOR_VERSION "0") # MICRO_VERSION >= 50 means a development version -set(MEDIAWRITER_MICRO_VERSION "50") +set(MEDIAWRITER_MICRO_VERSION "0") set(MEDIAWRITER_VERSION "${MEDIAWRITER_MAJOR_VERSION}.${MEDIAWRITER_MINOR_VERSION}.${MEDIAWRITER_MICRO_VERSION}") set(QT_MIN_VERSION "6.2.0") diff --git a/dist/fedora/mediawriter.spec b/dist/fedora/mediawriter.spec index 72fd1370..cdff3d6a 100644 --- a/dist/fedora/mediawriter.spec +++ b/dist/fedora/mediawriter.spec @@ -1,25 +1,39 @@ Name: mediawriter -Version: 4.0 +Version: 5.0.0 Release: 1%{?dist} Summary: Fedora Media Writer License: GPLv2+ -URL: https://github.com/MartinBriza/MediaWriter -Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +URL: https://github.com/FedoraQt/MediaWriter +Source0: https://github.com/FedoraQt/MediaWriter/archive/MediaWriter-%{version}.tar.gz + +Provides: liveusb-creator = %{version}-%{release} +Obsoletes: liveusb-creator <= 3.95.4-2 -BuildRequires: qt5-qtbase-devel -BuildRequires: qt5-qtdeclarative-devel -BuildRequires: gettext -#BuildRequires: libappstream-glib BuildRequires: gcc-c++ +BuildRequires: gettext +BuildRequires: cmake +BuildRequires: make +BuildRequires: libappstream-glib +BuildRequires: libadwaita-qt6-devel +BuildRequires: qt6-qtbase-devel +BuildRequires: qt6-qtdeclarative-devel +BuildRequires: xz-devel + +Requires: qt6-qtsvg +Requires: qt6-qtdeclarative + +%if !0%{?flatpak} +Requires: polkit +%endif +Requires: xz-libs -Requires: qt5-qtbase%{?_isa} -Requires: qt5-qtquickcontrols%{?_isa} >= 5.3.0 -Requires: polkit%{?_isa} -%if 0%{?fedora} && 0%{?fedora} < 25 -Requires: udisks2%{?_isa} +%if !0%{?flatpak} +%if 0%{?fedora} && 0%{?fedora} != 25 +Requires: storaged %else -Requires: storaged%{?_isa} +Requires: udisks +%endif %endif %description @@ -27,24 +41,40 @@ A tool to write images of Fedora media to portable drives like flash drives or memory cards. %prep -%autosetup -p1 -n MediaWriter-%{commit} -mkdir %{_target_platform} +%autosetup -p1 -n MediaWriter-%{version} + +# Install the theme into correct prefix when building for /app +sed -i 's@\${QT6_INSTALL_QML}@%{_qt6_qmldir}@' src/theme/CMakeLists.txt %build -pushd %{_target_platform} -%{qmake_qt5} PREFIX=%{_prefix} MEDIAWRITER_VERSION=%{version}-%{dist} .. -popd -%make_build -C %{_target_platform} +%cmake + +%cmake_build %install -make install INSTALL_ROOT=%{buildroot} -C %{_target_platform} +%cmake_install +%check +appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/metainfo/org.fedoraproject.MediaWriter.appdata.xml %files %{_bindir}/%{name} %{_libexecdir}/%{name}/ +%{_datadir}/metainfo/org.fedoraproject.MediaWriter.appdata.xml +%{_datadir}/applications/org.fedoraproject.MediaWriter.desktop +%{_datadir}/icons/hicolor/16x16/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/22x22/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/24x24/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/32x32/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/48x48/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/64x64/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/128x128/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/256x256/apps/org.fedoraproject.MediaWriter.png +%{_datadir}/icons/hicolor/512x512/apps/org.fedoraproject.MediaWriter.png +%{_qt6_qmldir}/QtQuick/Controls/org/fedoraproject/AdwaitaTheme/ +%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/libadwaitathemeplugin.so +%{_qt6_qmldir}/org/fedoraproject/AdwaitaTheme/qmldir %changelog -* Tue Aug 9 2016 Martin Bříza 4.0 -- Initial release - +* Mon May 09 06 2022 Jan Grulich - 5.0.0-1 +- 5.0.0 diff --git a/src/app/data/org.fedoraproject.MediaWriter.appdata.xml b/src/app/data/org.fedoraproject.MediaWriter.appdata.xml index 9a315818..bdecdc43 100644 --- a/src/app/data/org.fedoraproject.MediaWriter.appdata.xml +++ b/src/app/data/org.fedoraproject.MediaWriter.appdata.xml @@ -158,6 +158,6 @@ jgrulich@redhat.com - + diff --git a/src/app/data/org.fedoraproject.MediaWriter.appdata.xml.in b/src/app/data/org.fedoraproject.MediaWriter.appdata.xml.in index 1c3a8920..a2f8d2ee 100644 --- a/src/app/data/org.fedoraproject.MediaWriter.appdata.xml.in +++ b/src/app/data/org.fedoraproject.MediaWriter.appdata.xml.in @@ -29,6 +29,6 @@ jgrulich@redhat.com - +