%global name_alternative swidGenerator Name: swid_generator Version: 0.3.0 Release: 1%{?dist} Summary: Application which generates SWID-Tags from rpm database Group: System Environment/Base License: MIT URL: https://github.com/strongswan/%{name_alternative} Source0: https://github.com/strongswan/%{name_alternative}/archive/v%{version}.tar.gz BuildArch: noarch Requires: python3-%{name}-libs = %{version}-%{release} BuildRequires: python3-devel BuildRequires: python3-setuptools # for building man page BuildRequires: python-sphinx Patch1: 0001-Python3-README.rst-should-be-openned-as-utf-8.patch %description A small application for Python 3 which generates SWID tags from Linux package managers like dpkg, rpm or pacman. %package -n python3-%{name}-libs Summary: Python3 library for %{name} %description -n python3-%{name}-libs Python3 library to generate SWID tags from Linux package managers like dpkg, rpm or pacman. %prep %setup -q -n %{name_alternative}-%{version} %patch1 -p1 %build CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build cd docs make man cd .. %install CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ install -m 644 -p docs/_build/man/%{name}.1 $RPM_BUILD_ROOT/%{_mandir}/man1/ %files %{_bindir}/%{name} %doc %{_mandir}/man1/* %doc README.rst %files -n python3-swid_generator-libs %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-%{version}-py3.3.egg-info %changelog * Sun Sep 14 2014 Šimon Lukašík - 0.3.0-1 - First attempt to package swid_generator to rpm