Name:            blivet-gui
Version:         2.4.1
Release:         2
Summary:         Tool for data storage configuration
License:         GPL-2.0-or-later
URL:             https://github.com/storaged-project/blivet-gui
Source0:         https://github.com/storaged-project/blivet-gui/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1:         blivet-gui_event.conf

Patch0:          skip-brtfs-raid-test-if-no-support.patch

BuildArch:       noarch
BuildRequires:   desktop-file-utils libappstream-glib python3-devel gettext >= 0.18.3 python3-setuptools make
#required by test
BuildRequires:   python3-six python3-gobject-base python3-blivet xorg-x11-server-Xvfb

Requires:        python3 python3-gobject polkit python3-blivet gtk3
Requires:        PolicyKit-authentication-agent python3-pid libreport

Provides:        %{name}-runtime
Obsoletes:       %{name}-runtime

%description
Graphical (GTK) tool for manipulation and configuration of data storage
(disks, LVMs, RAIDs) based on blivet library. 

%package_help

%prep
%autosetup -p1 -n %{name}-%{version}

%build
%make_build

%install
%make_install

desktop-file-validate %{buildroot}/%{_datadir}/applications/blivet-gui.desktop
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/blivet-gui.appdata.xml
mkdir -p %{buildroot}/%{_sysconfdir}/libreport/events.d/
install -m644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/libreport/events.d/
install -d %{buildroot}/%{_localstatedir}/log/blivet-gui

%check
make test

%files
%defattr(-,root,root)
%doc COPYING
%{_sysconfdir}/libreport/events.d/blivet-gui_event.conf
%{_bindir}/*
%{python3_sitelib}/*
%{_datadir}/locale/*
%{_datadir}/blivet-gui
%{_datadir}/appdata/blivet-gui.appdata.xml
%{_datadir}/applications/blivet-gui.desktop
%{_datadir}/icons/hicolor/*/apps/blivet-gui.png
%{_datadir}/polkit-1/actions/org.fedoraproject.pkexec.blivet-gui.policy
%{_localstatedir}/log/blivet-gui

%files help
%defattr(-,root,root)
%doc ChangeLog README.md
%{_mandir}/man1/blivet-gui.1*

%changelog
* Thu Sep 28 2023 zhouyihang<zhouyihang3@h-partners.com> - 2.4.1-2
- Type:requirements
- CVE:NA
- SUG:NA
- DESC:enable test

* Sat Jul 22 2023 zhouyihang<zhouyihang3@h-partners.com> - 2.4.1-1
- Type:requirements
- CVE:NA
- SUG:NA
- DESC:update blivet-gui to 2.4.1

* Thu Mar 09 2023 zhouyihang<zhouyihang3@h-partners.com> - 2.4.0-1
- Type:requirements
- ID:NA
- SUG:NA
- DESC:update blivet-gui to 2.4.0

* Fri May 13 2022 haomimi <haomimi@uniontech.com> - 2.3.0-2
- fix "bogus date %changelog" for spec file

* Wed Dec 22 2021 xihaochen<xihaochen@huawei.com> - 2.3.0-1
- Type:requirements
- ID:NA
- SUG:NA
- DESC:update blivet-gui to 2.3.0

* Thu Sep 10 2020 hanzhijun <hanzhijun1@huawei.com> - 2.1.15-3
- solve source url problem

* Fri Sep 4 2020 gaihuiying<gaihuiying1@huawei.com> - 2.1.15-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix build error because gettext update to 0.21

* Wed Jul 22 2020 gaihuiying <gaihuiying1@huawei.com> - 2.11.15-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update blivet-gui version to 2.11.15

* Fri Oct 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.1.11-1
- Package init


