%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %if 0%{?fedora} > 12 %global with_python3 1 %endif Name: python-smbpasswd Version: 1.0.1 Release: 17%{?dist} Summary: Python SMB Password Hash Generator Module Group: Development/Languages License: GPLv2 URL: http://barryp.org/software/py-smbpasswd Source0: http://barryp.org/software/py-smbpasswd/files/py-smbpasswd-%{version}.tar.gz Patch1: python-smbpasswd-1.0.1-py3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python3-devel BuildRequires: python2-devel %description This package contains a python module, which is able to generate LANMAN and NT password hashes suiteable to us with Samba. %if 0%{?with_python3} %package -n python3-smbpasswd Summary: Python SMB Password Hst Generator Module for Python 3 Group: Development/Languages %description -n python3-smbpasswd This package contains a python module, which is able to generate LANMAN and NT password hashes suiteable to us with Samba. This is a ported release for python 3.1 %endif %prep %setup -q -n py-smbpasswd-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} cd %{py3dir} %patch1 -p1 -b .org %endif %build CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build %if 0%{?with_python3} cd %{py3dir} %{__python3} setup.py build %endif %install rm -rf $RPM_BUILD_ROOT %{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %if 0%{?with_python3} cd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %endif %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{python_sitearch}/smbpasswd.so %{python_sitearch}/*egg-info %doc COPYING README.txt %if 0%{?with_python3} %files -n python3-smbpasswd %defattr(-,root,root,-) %{python3_sitearch}/smbpasswd.cpython-3?mu.so %{python3_sitearch}/*egg-info %endif %doc COPYING README.txt %changelog * Wed Feb 09 2011 Fedora Release Engineering - 1.0.1-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Dec 29 2010 David Malcolm - 1.0.1-16 - rework python3-smbpasswd manifest for PEP 3149, and rebuild for the newer python3 * Sun Aug 22 2010 Jochen Schmitt 1.0.1-15 - Rebuild to fix brocken dependencies on rawhide * Thu Jul 22 2010 David Malcolm 1.0.1-14 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Tue Feb 2 2010 Jochen Schmitt 1.0.1-13 - Port for python-3 * Mon Aug 3 2009 Jochen Schmitt 1.0.1-12 - Rebuild for python-2.6.2 * Sun Jul 26 2009 Fedora Release Engineering - 1.0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 1.0.1-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Nov 29 2008 Ignacio Vazquez-Abrams - 1.0.1-9 - Rebuild for Python 2.6 * Sun Feb 10 2008 Jochen Schmitt 1.0.1-8 - Rebuild for gcc-4.3 * Sun Jan 6 2008 Jochen Schmitt 1.0.1-7 - Add .egg-info file into package * Wed Aug 8 2007 Jochen Schmitt 1.0.1-6 - Changing license tag * Mon Dec 11 2006 Jochen Schmitt 1.0.1-5 - New Build to solve broken deps * Sun Sep 3 2006 Jochen Schmitt 1.0.1-4 - Rebuild for FC-6 * Mon Jul 24 2006 Jochen Schmitt 1.0.1-3 - Change Permissions of smbwasswd.c * Sun Jul 23 2006 Jochen Schmitt 1.0.1-2 - Remove Python(ABI) Require. * Tue Jun 27 2006 Jochen Schmitt 1.0.1-1 - Initial RPM