Blob Blame History Raw
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

Name:           python-nss
Version:        0.5
Release:        1%{?dist}
Summary:        Python bindings for Network Security Services (NSS)

Group:          Development/Languages
License:        MPLv1.1 or GPLv2+ or LGPLv2+
URL:            :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot/mozilla/security/python/nss
Source0:        %{name}-%{version}.tar.bz2 
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%define docdir %{_docdir}/%{name}-%{version}

BuildRequires: python-devel
BuildRequires: python-setuptools-devel
BuildRequires: epydoc
BuildRequires: python-docutils
BuildRequires: nspr-devel
BuildRequires: nss-devel


%description
This package provides Python bindings for Network Security Services
(NSS) and the Netscape Portable Runtime (NSPR).

NSS is a set of libraries supporting security-enabled client and
server applications. Applications built with NSS can support SSL v2
and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3
certificates, and other security standards. Specific NSS
implementations have been FIPS-140 certified.


%prep
%setup -q


%build
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
%{__python} setup.py build_doc


%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install  -O1 --install-platlib %{python_sitearch} --skip-build --root $RPM_BUILD_ROOT 
%{__python} setup.py install_doc --docdir %{docdir} --skip-build --root $RPM_BUILD_ROOT

# Include httplib ported to NSS as example
cp lib/httplib.py $RPM_BUILD_ROOT/%{docdir}/examples

# Remove execution permission from any example scripts
find $RPM_BUILD_ROOT/%{docdir}/examples -type f | xargs chmod a-x

# Set correct permissions on .so files
chmod 0755 $RPM_BUILD_ROOT/%{python_sitearch}/nss/*.so
 

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc %{docdir}
%{python_sitearch}/*


%changelog
* Wed Jul  1 2009 John Dennis <jdennis@redhat.com> - 0.5-1
- restore ssl.nss_init and ssl.nss_shutdown but make them deprecated
  add __version__ string to nss module

* Tue Jun 30 2009 John Dennis <jdennis@redhat.com> - 0.4-1
- add binding for NSS_NoDB_Init(), bug #509002
  move nss_init and nss_shutdown from ssl module to nss module
- installed source code in Mozilla CVS repository
  update URL tag to point to CVS repositoy
  (not yet a valid URL, still have to coordinate with Mozilla)
  minor tweak to src directory layout
- Convert licensing to MPL tri-license
- apply patch from bug #472805, (Miloslav Trma─Ź)
  Don't allow closing a socket twice, that causes crashes.
  New function nss.io.Socket.new_socket_pair()
  New function nss.io.Socket.poll()
  New function nss.io.Socket.import_tcp_socket()
  New method nss.nss.Certificate.get_subject_common_name()
  New function nss.nss.generate_random()
  Fix return value creation in SSLSocket.get_security_status
  New function nss.ssl.SSLSocket.import_tcp_socket()  

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.1-2
- Rebuild for Python 2.6

* Tue Sep  9 2008 John Dennis <jdennis@redhat.com> - 0.1-1
- clean up ssl_example.py, fix arg list in get_cert_nicknames,
   make certdir cmd line arg consistent with other NSS tools
- update httplib.py to support client auth, add httplib_example.py which illustrates it's use
- fix some documentation
- fix some type usage which were unsafe on 64-bit

* Wed Jul  9 2008 John Dennis <jdennis@redhat.com> - 0.0-2
- add docutils to build requires so restructured text works

* Fri Jun 27 2008 John Dennis <jdennis@redhat.com> - 0.0-1
- initial release