%define scl rh-python36 %{?scl:%scl_package %{name}} %{!?scl:%global pkg_name %{name}} %define name asn1crypto %define version 1.2.0 %define unmangled_version 1.2.0 %define unmangled_version 1.2.0 %define release 1 Summary: Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP %{?scl:Requires: %{scl}-runtime} %{?scl:BuildRequires: %{scl}-runtime} Name: %{?scl_prefix}asn1crypto Version: %{version} Release: %{release} Source0: asn1crypto-%{unmangled_version}.tar.gz License: MIT Group: Development/Libraries BuildRoot: %{_tmppath}/asn1crypto-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: wbond Packager: Martin Juhl Url: https://github.com/wbond/asn1crypto %description Docs for this project are maintained at https://github.com/wbond/asn1crypto#readme. %prep %{?scl:scl enable %{scl} - << \EOF} set -ex %setup -n asn1crypto-%{unmangled_version} -n asn1crypto-%{unmangled_version} %{?scl:EOF} %build %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py build %{?scl:EOF} %install %{?scl:scl enable %{scl} - << \EOF} set -ex python3 setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES %{?scl:EOF} %clean %{?scl:scl enable %{scl} - << \EOF} set -ex rm -rf $RPM_BUILD_ROOT %{?scl:EOF} %files -f INSTALLED_FILES %defattr(-,root,root)