File WoeUSB-ng.spec of Package WoeUSB-ng
#
# spec file for package WoeUSB-ng
#
# Copyright (c) 2024 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: WoeUSB-ng
Version: 0.2.12
Release: 0
Summary: Tool to create a windows installer USB/DVD
License: GPL-3.0-only
URL: https://github.com/WoeUSB/WoeUSB-ng
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: fix-shebangs.patch
BuildRequires: fdupes
BuildRequires: polkit
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: python3-wheel
BuildRequires: update-desktop-files
Requires: python3-termcolor
Requires: python3-wxPython
BuildArch: noarch
Conflicts: WoeUSB
%description
A Linux program to create a Windows USB stick installer from a real Windows DVD or image.
This package contains two programs:
woeusb: A command-line utility that enables you to create your own bootable Windows installation USB storage
device from an existing Windows Installation disc or disk image
woeusbgui: Graphic version of woeusb
%prep
%autosetup -p1
%build
%python3_build
%install
install -d %{buildroot}%{_bindir}
install -d %{buildroot}%{_datadir}/applications
install -d %{buildroot}%{_datadir}/polkit-1/actions
install -d %{buildroot}%{_datadir}/icons/%{name}
# fix setup.py install directories
sed -i 's@/usr/local/bin/woeusbgui@%{buildroot}%{_bindir}/woeusbgui@g' setup.py
sed -i 's@/usr/share/polkit-1/actions@%{buildroot}%{_datadir}/polkit-1/actions@g' setup.py
sed -i 's@/usr/share/icons/WoeUSB-ng@%{buildroot}%{_datadir}/icons/%{name}@g' setup.py
sed -i 's@/usr/share/applications@%{buildroot}%{_datadir}/applications@g' setup.py
python3 setup.py install --root %{buildroot} --prefix %{_prefix}
%fdupes %{buildroot}%{python_sitelib}/Woe*
%files
%license COPYING
%doc README.md CONTRIBUTING.md
%{_bindir}/woeusb
%{_bindir}/woeusbgui
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/%{name}
%{_datadir}/polkit-1/actions/com.github.woeusb.woeusb-ng.policy
%{python_sitelib}/WoeUSB*
%changelog