%{!?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: 27%{?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*.so
%{python3_sitearch}/*egg-info
%endif
%doc COPYING README.txt
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-27
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.0.1-24
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.1-21
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
* Thu Jul 26 2012 David Malcolm <dmalcolm@redhat.com> - 1.0.1-20
- generalize file globbing to ease transition to Python 3.3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Dec 29 2010 David Malcolm <dmalcolm@redhat.com> - 1.0.1-16
- rework python3-smbpasswd manifest for PEP 3149, and rebuild for the newer
python3
* Sun Aug 22 2010 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-15
- Rebuild to fix brocken dependencies on rawhide
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> 1.0.1-14
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Tue Feb 2 2010 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-13
- Port for python-3
* Mon Aug 3 2009 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-12
- Rebuild for python-2.6.2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0.1-9
- Rebuild for Python 2.6
* Sun Feb 10 2008 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-8
- Rebuild for gcc-4.3
* Sun Jan 6 2008 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-7
- Add .egg-info file into package
* Wed Aug 8 2007 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-6
- Changing license tag
* Mon Dec 11 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-5
- New Build to solve broken deps
* Sun Sep 3 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-4
- Rebuild for FC-6
* Mon Jul 24 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-3
- Change Permissions of smbwasswd.c
* Sun Jul 23 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-2
- Remove Python(ABI) Require.
* Tue Jun 27 2006 Jochen Schmitt <Jochen herr-schmitt de> 1.0.1-1
- Initial RPM