File openssl-certs.spec of Package openssl-certs

#
# spec file for package openssl-certs (Version 0.9.8h)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

BuildRequires:  openssl

Name:           openssl-certs
%define ssletcdir %{_sysconfdir}/ssl
License:        Other uncritical OpenSource License; MPL 1.1/GPL 2.0/LGPL 2.1
Group:          Productivity/Networking/Security
AutoReqProv:    on
Version:        0.9.8h
Release:        25.<RELEASE2>
Summary:        CA certificates for OpenSSL
Url:            http://www.mozilla.org
# wget -O certdata.txt "http://mxr.mozilla.org/mozilla/source//security/nss/lib/ckfw/builtins/certdata.txt?raw=1"
Source:         certdata.txt
Source1:        extractcerts.pl
Source2:        %{name}.COPYING
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
# for c_rehash
PreReq:         openssl

%description
This package contains some CA root certificates for OpenSSL extracted
from MozillaFirefox



%prep
%setup -qcT
cp -a %{S:1} COPYING

%build
perl %{SOURCE1} < %{SOURCE0}

%install
mkdir -p %{buildroot}/%{ssletcdir}/certs
for i in *.pem; do openssl x509 -in $i -out %{buildroot}/%{ssletcdir}/certs/$i; done

%clean
rm -rf %{buildroot}

%post
# need to do that here so c_rehash can deal with hash collisions
c_rehash %{ssletcdir}/certs > /dev/null

%postun
c_rehash %{ssletcdir}/certs > /dev/null || true

%files
%defattr(-, root, root)
%dir %{ssletcdir}/certs
%doc COPYING
%{ssletcdir}/certs/*

%changelog
* Tue Dec 02 2008 cfarrell@suse.de
- Add openssl-certs.COPYING to fix bnc#441356
* Thu Oct 09 2008 lnussel@suse.de
- use certificates from MozillaFirefox
* Wed Jul 09 2008 mkoenig@suse.de
- split out the CA root certificates from the openssl certs
  subpackage into a package of its own.
openSUSE Build Service is sponsored by