forked from pool/python-icoextract
- Cleanup the SPEC file.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-icoextract?expand=0&rev=2
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 16 11:15:56 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Cleanup the SPEC file.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 16 05:20:53 UTC 2022 - Imo Hester <vortex@z-ray.de>
|
||||
|
||||
|
||||
@@ -26,9 +26,13 @@ License: MIT
|
||||
Group: System/GUI/Other
|
||||
URL: https://github.com/jlu5/icoextract
|
||||
Source: https://github.com/jlu5/icoextract/archive/%{version}/icoextract-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
# BuildRequires: %%{python_module devel}
|
||||
BuildRequires: %{python_module pefile}
|
||||
BuildRequires: %{python_module Pillow}
|
||||
BuildRequires: %{python_module packaging}
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: ImageMagick
|
||||
BuildRequires: cmake
|
||||
BuildRequires: fdupes
|
||||
@@ -39,7 +43,7 @@ BuildRequires: pkgconfig
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: %{python_module pefile}
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
Suggests: %{python_module Pillow}
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
@@ -52,24 +56,28 @@ desktops.
|
||||
%prep
|
||||
%setup -q -n icoextract-%{version}
|
||||
|
||||
find . -name \*.py -exec sed -i -e '1{\@^#!%{_bindir}/env python@d}' '{}' \;
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
mkdir -p %{buildroot}%{_datadir}/thumbnailers/
|
||||
cp exe-thumbnailer.thumbnailer %{buildroot}%{_datadir}/thumbnailers/
|
||||
%python_clone -a %{buildroot}%{_bindir}/exe-thumbnailer
|
||||
%python_clone -a %{buildroot}%{_bindir}/icoextract
|
||||
%python_clone -a %{buildroot}%{_bindir}/icolist
|
||||
%python_clone -a %{buildroot}%{_datadir}/thumbnailers/exe-thumbnailer.thumbnailer
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
cd tests
|
||||
%cmake_build
|
||||
%endif
|
||||
%make_build
|
||||
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||
$python test_extract.py
|
||||
$python test_thumbnailer.py
|
||||
}
|
||||
|
||||
%post
|
||||
update-alternatives --install \
|
||||
@@ -91,7 +99,8 @@ update-alternatives --install \
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
%{python_sitelib}/icoextract
|
||||
%{python_sitelib}/icoextract-%{version}*-info
|
||||
%python_alternative %{_bindir}/exe-thumbnailer
|
||||
%python_alternative %{_bindir}/icoextract
|
||||
%python_alternative %{_bindir}/icolist
|
||||
|
||||
Reference in New Issue
Block a user