%global date 20180529 %global commit0 f5a05f9a3b516645d7c76d8c38d03fc0c0b41cd0 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: LibScanner Version: 0.git.1.%{date}.%{shortcommit0} Release: 1%{?dist} Summary: RPM/SWID vulnerability scanner Group: System Environment/Base License: GPLv3 URL: https://github.com/DanBeard/LibScanner Source0: %{url}/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz BuildArch: noarch BuildRequires: python2-devel %global python %{__python2} %description A small application that parses RPM or SWID package lists and runs them through the National Vulnerability Database. %package -n python2-%{name}-cli Summary: Python library for %{name} Requires: python2-defusedxml %description -n python2-%{name}-cli A small application that parses RPM or SWID package lists and runs them through the National Vulnerability Database. %prep %setup -q -n %{name}-%{commit0} %build touch __init__.py python -m compileall __init__.py python -m compileall cve_lookup.py sed -i 's/from cve_lookup/from LibScanner.cve_lookup/' cli.py %install install -d %{buildroot}/%{python_sitelib}/%{name} %{buildroot}/%{_bindir} install -m 644 __init__.py* %{buildroot}/%{python_sitelib}/%{name}/ install -m 644 cve_lookup.py* %{buildroot}/%{python_sitelib}/%{name}/ install -m 755 cli.py %{buildroot}/%{_bindir}/package-cve-lookup install -m 755 download_xml.sh %{buildroot}/%{_bindir}/package-cve-download-xml %files -n python2-%{name}-cli %{_bindir}/package-cve-download-xml %{_bindir}/package-cve-lookup %{python_sitelib}/%{name}/__init__.py* %{python_sitelib}/%{name}/cve_lookup.py* %changelog * Mon May 29 2018 Jan Pazdziora - 0.git.1.xxx - Initial packaging of LibScanner git master.