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