Blob Blame Raw
%global debug_package   %{nil}

Name:           WoeUSB
Version:        2.2.2
Release:        1%{?dist}
Summary:        Windows USB installation media creator
License:        GPLv3+
URL:            https://github.com/slacka/WoeUSB
Source0:        https://github.com/slacka/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  wxGTK3-devel
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  libtool
BuildRequires:  gettext
BuildRequires:  desktop-file-utils

%description
A utility that enables you to create your own bootable Windows installation
USB storage device from an existing Windows Installation disc or disk image.

%prep
%autosetup

%build
# Replace the version placeholders
find . -type f -print0 | xargs -0 sed -i "s/@@WOEUSB_VERSION@@/%{version}/"
autoreconf -fiv
%configure
%make_build

%install
%make_install
sed -i '1!b;s/env bash/bash/' %{buildroot}%{_bindir}/woeusb
sed -i '1!b;s/env bash/bash/' %{buildroot}%{_prefix}/share/woeusb/data/listDvdDrive
sed -i '1!b;s/env bash/bash/' %{buildroot}%{_prefix}/share/woeusb/data/listUsb
desktop-file-validate %{buildroot}/%{_datadir}/applications/woeusbgui.desktop


%files
%license COPYING
# CLI
%{_bindir}/woeusb
%{_mandir}/man1/woeusb.1.gz
# GUI
%{_mandir}/man1/woeusbgui.1.gz
%{_bindir}/woeusbgui
%{_datadir}/applications/woeusbgui.desktop
%{_datadir}/pixmaps/woeusbgui-icon.png
%{_datadir}/woeusb/data/woeusbgui-screenshot.png
%dir %{_datadir}/woeusb
%dir %{_datadir}/woeusb/data
%{_datadir}/woeusb/data/c501-logo.png
%{_datadir}/woeusb/data/icon.png
%{_datadir}/woeusb/data/listDvdDrive
%{_datadir}/woeusb/data/listUsb
%{_datadir}/woeusb/data/woeusb-logo.png
%dir %{_datadir}/woeusb/locale
%dir %{_datadir}/woeusb/locale/fr
%dir %{_datadir}/woeusb/locale/fr/LC_MESSAGES
%dir %{_datadir}/woeusb/locale/zh_TW
%dir %{_datadir}/woeusb/locale/zh_TW/LC_MESSAGES
%lang(fr) %{_datadir}/woeusb/locale/fr/LC_MESSAGES/woeusb.mo
%lang(fr) %{_datadir}/woeusb/locale/fr/LC_MESSAGES/wxstd.mo
%lang(zh) %{_datadir}/woeusb/locale/zh_TW/LC_MESSAGES/woeusb.mo


%changelog
* Mon Oct 9 2017 Matt Prahl <mprahl@redhat.com> - 2.2.2-1
- Update to v2.2.2

* Wed Sep 20 2017 Matt Prahl <mprahl@redhat.com> - 2.1.3-1
- Initial release