File multibootusb.spec of Package multibootusb

#
# spec file for package multibootusb
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           multibootusb
Version:        9.2.0
Release:        0
Summary:        Create multi boot live Linux on a USB disk
License:        GPL-2.0-only
Group:          System/Management
URL:            https://multibootusb.org/
Source0:        https://github.com/mbusb/%{name}/archive/v%{version}.tar.gz
Source99:       %{name}-rpmlintrc
#BuildRequires:  config(polkit)
BuildRequires:  pkgconfig(polkit-gobject-1)
#BuildRequires:  python3-dbus-python
BuildRequires:  dbus-1-python3
BuildRequires:  desktop-file-utils
BuildRequires:  dos2unix
BuildRequires:  mtools
BuildRequires:  p7zip
BuildRequires:  parted
BuildRequires:  python3-devel
BuildRequires:  python3-pyudev
BuildRequires:  python3-qt5
BuildRequires:  python3-six
BuildRequires:  update-desktop-files
BuildRequires:  util-linux
Requires:       p7zip-full
Requires:       polkit
Requires(post): desktop-file-utils
Requires(post): hicolor-icon-theme
Requires(postun): desktop-file-utils
Requires(postun): hicolor-icon-theme

%description
MultiBootUSB is a cross platform software written in python which allows you to install
multiple live linux on a USB disk non destructively and option to uninstall distros.
Try out the world's first true cross platform multi boot live usb creator for free.

%prep
%setup -q
find . -type f -exec sed -i -e 's|\/usr\/bin\/env python3|\/usr\/bin\/python3|g' {} \;
find . -type f -name org.debian.pkexec.run-multibootusb.policy -exec sed -i -e 's|%{_prefix}/local/bin/multibootusb|%{_bindir}/multibootusb|g' {} \;
# rpmlintrc
dos2unix scripts/admin.py
dos2unix scripts/mbusb_gui.py

%build
python3 setup.py build

%install
python3 setup.py install -O1 --root=%{buildroot} --record=INSTALLED_FILES
%suse_update_desktop_file -r -i %{name} System Filesystem

%post
%icon_theme_cache_post
%desktop_database_post

%postun
%icon_theme_cache_postun
%desktop_database_postun

%files
%doc
%{_bindir}/%{name}
%{_bindir}/%{name}-pkexec
%{_datadir}/%{name}
%{_datadir}/applications/multibootusb.desktop
%{_datadir}/pixmaps/multibootusb.png
%{_datadir}/polkit-1/actions/*multibootusb*.policy
%{python3_sitelib}/*

%changelog
openSUSE Build Service is sponsored by