Skip to content

Commit

Permalink
Update to 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
grulja committed May 9, 2022
1 parent 60715a8 commit 97cdf0d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 28 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
76 changes: 53 additions & 23 deletions dist/fedora/mediawriter.spec
Original file line number Diff line number Diff line change
@@ -1,50 +1,80 @@
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
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 <[email protected]> 4.0
- Initial release

* Mon May 09 06 2022 Jan Grulich <[email protected]> - 5.0.0-1
- 5.0.0
2 changes: 1 addition & 1 deletion src/app/data/org.fedoraproject.MediaWriter.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,6 @@
<update_contact>[email protected]</update_contact>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.0" date="2022-05-10"/>
<release version="5.0.0" date="2022-05-09"/>
</releases>
</application>
2 changes: 1 addition & 1 deletion src/app/data/org.fedoraproject.MediaWriter.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@
<update_contact>[email protected]</update_contact>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.0" date="2022-05-10"/>
<release version="5.0.0" date="2022-05-09"/>
</releases>
</application>

0 comments on commit 97cdf0d

Please sign in to comment.