%define name python3-keyczar %define srcname python3-keyczar %define version 0.71rc0 %define release 1 #%{!?dotests: %define dotests 1} %define is_python3_32 %(test -e /usr/bin/python3_32 && echo 1 || echo 0) %if %{is_python3_32} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib64 %define is_python3_64 %(test -e /usr/bin/python3_64 && echo 1 || echo 0) %if %{is_python3_64} %define python_sitelib64 %(python3_64 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %endif Summary: Toolkit for safe and simple cryptography Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: http://www.apache.org/licenses/LICENSE-2.0 Group: Development/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Prefix: %{_prefix} BuildArch: noarch Vendor: Google, Inc. Url: http://www.keyczar.org/ BuildRequires: python3 >= 3.7.4-1 , python3-devel >= 3.7.4-1 Requires: python3 >= 3.7.4-1 Requires: python3-pycrypto > 2.0 Requires: python3-pyasn1 %description Toolkit for safe and simple cryptography %prep %setup -q -n %{srcname}-%{version} %build python3_64 setup.py build %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} #renaming the files in bindir to avoid conflict with python-keyczar cd ${RPM_BUILD_ROOT}/%{_bindir} for file in ${RPM_BUILD_ROOT}/%{_bindir}/*; do mv $file $file-3 done cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc ChangeLog LICENSE PKG-INFO README %doc doc %{_bindir}/* %{python_sitelib}/* %changelog * Tue Jan 21 2020 Rishita Saha - 0.71rc0-1 - Updated to the latest version * Thu Aug 8 2013 Tristan Delhalle - 0.71c-1 - first version for AIX V6.1 and higher