opensc/opensc.spec

205 lines
6.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package opensc (Version 0.11.13)
#
# Copyright (c) 2010 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: opensc
BuildRequires: libassuan-devel >= 2.0.0
BuildRequires: libusb-devel
BuildRequires: openct-devel
BuildRequires: openssl-devel
BuildRequires: pcsc-lite-devel
BuildRequires: pkg-config
BuildRequires: readline-devel
BuildRequires: xorg-x11-devel
BuildRequires: libgpg-error-devel
# bug437293
%ifarch ppc64
Obsoletes: opensc-64bit
%endif
#
Url: http://www.opensc-project.org/opensc/
Version: 0.11.13
Release: 4
Group: Productivity/Security
Summary: OpenSC Smart Card Library
License: LGPLv2.1+
Requires: libopensc2 = %{version}
Requires: pcsc-lite
Requires: pinentry
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: %{name}-%{version}.tar.bz2
Source1: %{name}-ADVISORIES
# Supress all ugly warnings related to required .so and .la files in the main package:
Source2: %{name}-rpmlintrc
# and also skip-check-libtool-deps (and add these dependencies to the devel package)
Source3: baselibs.conf
# PATCH-FIX-UPSTREAM opensc-libassuan-2.patch http://www.opensc-project.org/opensc/ticket/217 puzel@novell.com -- allows to build with libassuan2
Patch0: opensc-libassuan-2.patch
# PATCH-FIX-UPSTREAM opensc-fix-gcc-warnings.patch http://www.opensc-project.org/opensc/ticket/249 reddwarf@opensuse.org -- the card-myeid.c part has an equivalent fix in upstream's trunk
Patch1: opensc-fix-gcc-warnings.patch
# PATCH-FIX-UPSTREAM opensc-plugindir.patch https://www.opensc-project.org/opensc/ticket/251 sbrabec@suse.cz -- clean plugin installation
Patch2: opensc-plugindir.patch
%description
OpenSC provides a set of libraries and utilities to access smart cards.
It mainly focuses on cards that support cryptographic operations. It
facilitates their use in security applications such as mail encryption,
authentication, and digital signature. OpenSC implements the PKCS#11
API. Applications supporting this API, such as Mozilla Firefox and
Thunderbird, can use it. OpenSC implements the PKCS#15 standard and
aims to be compatible with every software that does so, too.
Before purchasing any cards, please read carefully documentation in
/usr/share/doc/packages/opensc/wiki/index.html - only some cards are
supported. Not only card type matters, but also card version, card OS
version and preloaded applet. Only subset of possible operations may be
supported for your card. Card initialization may require third party
proprietary software.
Authors:
--------
Juha Yrj<EFBFBD>l<EFBFBD> <jyrjola@cc.hut.fi>
Antti Tapaninen <aet@cc.hut.fi>
Timo Ter<EFBFBD>s <timo.teras@iki.fi>
Olaf Kirch <okir@suse.de>
%package -n libopensc2
License: LGPLv2.1+
Group: System/Libraries
Summary: OpenSC Smart Card Library
%description -n libopensc2
OpenSC provides a set of libraries and utilities to access smart cards.
It mainly focuses on cards that support cryptographic operations. It
facilitates their use in security applications such as mail encryption,
authentication, and digital signature. OpenSC implements the PKCS#11
API. Applications supporting this API, such as Mozilla Firefox and
Thunderbird, can use it. OpenSC implements the PKCS#15 standard and
aims to be compatible with every software that does so, too.
Before purchasing any cards, please read carefully documentation in
/usr/share/doc/packages/opensc/wiki/index.html - only some cards are
supported. Not only card type matters, but also card version, card OS
version and preloaded applet. Only subset of possible operations may be
supported for your card. Card initialization may require third party
proprietary software.
Authors:
--------
Juha Yrj<EFBFBD>l<EFBFBD> <jyrjola@cc.hut.fi>
Antti Tapaninen <aet@cc.hut.fi>
Timo Ter<EFBFBD>s <timo.teras@iki.fi>
Olaf Kirch <okir@suse.de>
%package devel
License: GPLv2+
Group: Development/Libraries/C and C++
Summary: Additional files needed for OpenSC development
# FIXME: Change to libtool-devel for the next libtool version:
Requires: %{name} = %{version} glibc-devel openct-devel libopenssl-devel zlib-devel libtool
%description devel
This package contains files required to develop applications using the
OpenSC framework.
Authors:
--------
Juha Yrj<EFBFBD>l<EFBFBD> <juha.yrjola@iki.fi>
Antti Tapaninen <aet@cc.hut.fi>
Timo Ter<EFBFBD>s <timo.teras@iki.fi>
Olaf Kirch <okir@caldera.de>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
tr -d '\r' <doc/nonpersistent/wiki.out/trac.css >doc/nonpersistent/wiki.out/trac.css~
touch -r doc/nonpersistent/wiki.out/trac.css doc/nonpersistent/wiki.out/trac.css~
mv doc/nonpersistent/wiki.out/trac.css~ doc/nonpersistent/wiki.out/trac.css
cp -a %{S:1} ADVISORIES
%build
%if %suse_version > 1100
autoreconf -f -i
%endif
%configure\
--docdir=%{_docdir}/%{name}\
--disable-static\
--enable-doc\
--enable-pcsc\
--enable-openct\
--enable-nsplugin\
--with-pinentry=/usr/bin/pinentry\
--with-plugindir=%{_libdir}/browser-plugins
make %{?jobs:-j%jobs}
%install
%makeinstall
rm $RPM_BUILD_ROOT%{_libdir}/browser-plugins/*.la
cp COPYING ADVISORIES doc/nonpersistent/ChangeLog $RPM_BUILD_ROOT%{_docdir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libopensc2 -p /sbin/ldconfig
%postun -n libopensc2 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc %dir %{_docdir}/%{name}
%doc %{_docdir}/%{name}/ADVISORIES
%doc %{_docdir}/%{name}/ChangeLog
%doc %{_docdir}/%{name}/COPYING
%doc %{_docdir}/%{name}/NEWS
%doc %{_docdir}/%{name}/README
%doc %{_docdir}/%{name}/tools.html
%doc %{_docdir}/%{name}/wiki
%{_bindir}/*
%exclude %{_bindir}/*-config
%{_datadir}/opensc
# Note: .la and .so must be in the main package, required by ltdl:
%{_libdir}/*.la
%{_libdir}/*.so
%{_libdir}/browser-plugins/*.so
%dir %{_libdir}/pkcs11
%{_libdir}/pkcs11/*.so
%doc %{_mandir}/man?/*.*
%config %{_sysconfdir}/opensc.conf
%files -n libopensc2
%defattr(-,root,root)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root)
%doc %{_docdir}/%{name}/api.html
%{_bindir}/*-config
%{_includedir}/opensc
%{_libdir}/pkgconfig/*.pc
%changelog