File ca-certificates-cacert.spec of Package ca-certificates-cacert

#
# spec file for package ca-certificates-cacert
#
# Copyright (c) 2014 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/
#


%if 0%{?suse_version} < 1310
%bcond_with trustedcerts
%define trustdir_static %{_datadir}/ca-certificates/cacert
%else
%bcond_without trustedcerts
%define certdir %{trustdir_static}/anchors
BuildRequires:  p11-kit-devel
%endif

BuildRequires:  ca-certificates
BuildRequires:  openssl

Name:           ca-certificates-cacert
Version:        1
Release:        0
Summary:        CAcert root certificates
License:        SUSE-CacertRoot
Group:          Productivity/Networking/Security
Url:            http://www.cacert.org
Source:         CAcert_class3.pem
Source1:        CAcert.pem
Source2:        LICENSE.cacert
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
PreReq:         ca-certificates

%description
This package contains the root certificates from cacert.org

%prep
%setup -qcT
cp %SOURCE2 LICENSE

%build

%install
install -d -m 755 %{buildroot}/%{certdir}
for i in %{SOURCE0} %{SOURCE1}; do openssl x509 -in $i -out \
	%{buildroot}/%{certdir}/${i##*/}; done

%clean
rm -rf %{buildroot}

%post
update-ca-certificates || true

%postun
update-ca-certificates || true

%files
%defattr(-, root, root)
%doc LICENSE
%{certdir}

%changelog
openSUSE Build Service is sponsored by