%define name rpm2swidtag %define version 0.7.4 %define unmangled_version 0.7.4 %define unmangled_version 0.7.4 %define release 1%{dist} Summary: Tools for producing SWID tags from rpm package headers and inspecting the SWID tags Name: %{name} Version: %{version} Release: %{release} Source0: %{name}-%{unmangled_version}.tar.gz License: ASL 2.0 Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Jan Pazdziora Requires: python3-rpm python3-lxml dnf-plugins-core xmlsec1-openssl BuildRequires: python3 python3-setuptools python3-rpm python3-lxml openssl xmlsec1-openssl createrepo_c fakechroot fakeroot dnf dnf-plugins-core gzip gnupg2 %description UNKNOWN %prep %setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version} %build python3 setup.py build %install python3 setup.py install --single-version-externally-managed --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES # workaround https://bugs.python.org/issue20337 sed -i 's#^/etc#%config(noreplace) /etc#' INSTALLED_FILES %check ./test.sh %clean rm -rf $RPM_BUILD_ROOT %files -f INSTALLED_FILES %defattr(-,root,root)