File libp11.spec of Package libp11

#
# spec file for package libp11 (Version 0.2.4)
#
# Copyright (c) 2008 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


Name:           libp11
Version:        0.2.4
Release:        3
Url:            http://www.opensc-project.org/libp11/
Group:          Productivity/Security
License:        LGPL v2.1 or later
Summary:        Library Implementing a Small Layer on Top of PKCS#11 API
Source:         %{name}-%{version}.tar.bz2
# All three following patches were sent to upstream:
Patch:          libp11-strict-aliasing.patch
Patch1:         libp11-api-fix.patch
Patch2:         libp11-api-update.patch
BuildRequires:  doxygen openssl-devel pkg-config zlib-devel
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Libp11 is a library implementing a small layer on top of PKCS#11 API to
make using PKCS#11 implementations easier.

The official name for PKCS#11 is "RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)".

Libp11 source code includes the official header files (version 2.20)
and thus is "derived from the RSA Security Inc. PKCS #11 Cryptographic
Token Interface (Cryptoki)".



Authors:
--------
    Andreas Jellinghaus
    Kevin Stefanik
    Ludovic Rousseau
    Nils Larsch
    Olaf Kirch
    Stef Hoeben

%package -n libp11-1
License:        LGPL v2.1 or later
Group:          Productivity/Security
Summary:        Library Implementing a Small Layer on Top of PKCS#11 API
Provides:       %{name} = %{version}
Obsoletes:      %{name} <= %{version}

%description -n libp11-1
Libp11 is a library implementing a small layer on top of PKCS#11 API to
make using PKCS#11 implementations easier.

The official name for PKCS#11 is "RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)".

Libp11 source code includes the official header files (version 2.20)
and thus is "derived from the RSA Security Inc. PKCS #11 Cryptographic
Token Interface (Cryptoki)".



Authors:
--------
    Andreas Jellinghaus
    Kevin Stefanik
    Ludovic Rousseau
    Nils Larsch
    Olaf Kirch
    Stef Hoeben

%package devel
License:        LGPL v2.1 or later
Group:          Development/Libraries/C and C++
Summary:        Library Implementing a Small Layer on Top of PKCS#11 API
Requires:       libp11-1 = %{version} openssl-devel

%description devel
Libp11 is a library implementing a small layer on top of PKCS#11 API to
make using PKCS#11 implementations easier.

The official name for PKCS#11 is "RSA Security Inc. PKCS #11
Cryptographic Token Interface (Cryptoki)".

Libp11 source code include the official header files (version 2.20) and
thus is "derived from the RSA Security Inc. PKCS #11 Cryptographic
Token Interface (Cryptoki)".



Authors:
--------
    Andreas Jellinghaus
    Kevin Stefanik
    Ludovic Rousseau
    Nils Larsch
    Olaf Kirch
    Stef Hoeben

%prep
%setup -q
%patch
%patch1
%patch2

%build
autoreconf -f -i
%configure --disable-static --with-pic \
	--enable-doc\
	--docdir=%{_docdir}/libp11-1\
	--enable-api-doc\
	--with-apidocdir=%{_docdir}/%{name}-devel
make %{?jobs:-j%jobs}

%install
%makeinstall
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name} $RPM_BUILD_ROOT%{_docdir}/libp11-1
rm -f %{buildroot}%{_libdir}/*.la

%clean
rm -rf $RPM_BUILD_ROOT

%post -n libp11-1 -p /sbin/ldconfig

%postun -n libp11-1 -p /sbin/ldconfig

%files -n libp11-1
%defattr (-, root, root)
%doc %{_docdir}/libp11-1
%{_libdir}/*.so.*

%files devel
%defattr (-, root, root)
%doc %{_docdir}/%{name}-devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc

%changelog
* Tue Sep 02 2008 sbrabec@suse.cz
- Call autoreconf to build correctly with new libtool.
* Tue Sep 02 2008 crrodriguez@suse.de
- fix build, doxygen required.
- kill ".la" files and static libraries
- fix -devel package requires
* Tue Aug 19 2008 sbrabec@suse.cz
- Updated to version 0.2.4:
  * Build system rewritten
  * added PKCS11_CTX_init_args
  * fix segfault in init_args code
  * implemented PKCS11_private_encrypt
- Fixed incorrect API.
- Fixed x86_64 issues.
* Thu Apr 10 2008 ro@suse.de
- added baselibs.conf file to build xxbit packages
  for multilib support
* Mon Jul 30 2007 ro@suse.de
- provide old name
* Wed Jul 25 2007 sbrabec@suse.cz
- Updated to version 0.2.3:
  * update wiki export script.
  * replaced rsa header files from rsalabs (official) with scute
  (open source).
  * allow CKR_USER_ALREADY_LOGGED_IN on C_Login.
  * mark internal functions as static.
  * add code to store public keys and generate keys.
- Name package according to shared library packaging policy.
* Fri Mar 30 2007 ro@suse.de
- added zlib-devel to buildreq
* Tue Oct 03 2006 sbrabec@suse.cz
- Updated to version 0.2.2:
  * bug fixes
  * code cleanup
* Fri May 12 2006 sbrabec@suse.cz
- New SuSE package, version 0.2.1.
openSUSE Build Service is sponsored by