[packages/libcacard] - updated to 2.5.0 (first really standalone release) - removed obsolete sh,pcsc patches
qboosh
qboosh at pld-linux.org
Fri Oct 2 17:04:41 CEST 2015
commit 8fcba95d769b87befe45fa32d9ab4c4f78378ace
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Oct 2 17:05:41 2015 +0200
- updated to 2.5.0 (first really standalone release)
- removed obsolete sh,pcsc patches
libcacard-pcsc.patch | 94 ----------------------------------------------------
libcacard-sh.patch | 28 ----------------
libcacard.spec | 75 ++++++++++++++++++++++-------------------
3 files changed, 41 insertions(+), 156 deletions(-)
---
diff --git a/libcacard.spec b/libcacard.spec
index 04c237d..135072c 100644
--- a/libcacard.spec
+++ b/libcacard.spec
@@ -1,48 +1,51 @@
-Summary: Virtual Smart Card Emulator library
-Summary(pl.UTF-8): Biblioteka emulator wirtualnych kart procesorowych
+#
+# Conditional build:
+%bcond_without static_libs # static library
+#
+Summary: CAC (Common Access Card) library
+Summary(pl.UTF-8): Biblioteka CAC (Common Access Library) - ogólny dostęp do kart procesorowych
Name: libcacard
-Version: 0.1.2
-Release: 2
-License: GPL v3
+Version: 2.5.0
+Release: 1
+License: LGPL v2.1+
Group: Libraries
-Source0: http://spice-space.org/download/libcacard/%{name}-%{version}.tar.gz
-# Source0-md5: d06480131936ea45a60e98c87b2bb4d9
-Patch0: %{name}-sh.patch
-Patch1: %{name}-pcsc.patch
-URL: http://spice-space.org/
+Source0: http://www.spice-space.org/download/libcacard/%{name}-%{version}.tar.xz
+# Source0-md5: 68638ee98ae654db8e7c0b6dcc6e426b
+URL: http://www.spice-space.org/
BuildRequires: autoconf >= 2.60
+BuildRequires: autoconf-archive >= 2015.09.25
BuildRequires: automake
-BuildRequires: libtool
-BuildRequires: nss-devel
-BuildRequires: pcsc-lite-devel >= 1.6
+BuildRequires: glib2-devel >= 1:2.22
+BuildRequires: libtool >= 2:2
+BuildRequires: nss-devel >= 1:3.12.8
BuildRequires: pkgconfig
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+Requires: glib2 >= 1:2.22
+Requires: nss >= 1:3.12.8
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-This emulator is designed to provide emulation of actual smart cards
-to a virtual card reader running in a guest virtual machine. The
-emulated smart cards can be representations of real smart cards, where
-the necessary functions such as signing, card removal/insertion, etc.
-are mapped to real, physical cards which are shared with the client
-machine the emulator is running on, or the cards could be pure
-software constructs.
+This library provides emulation of smart cards to a virtual card
+reader running in a guest virtual machine.
+
+It implements DoD CAC standard with separate PKI containers
+(compatible coolkey), using certificates read from NSS.
%description -l pl.UTF-8
-Ten pakiet ma na celu zapewnienie emulacji kart procesorowych w
-wirtualnym czytniku kart działającym na wirtualnej maszynie-gościu.
-Emulowane karty procesorowe mogą reprezentować prawdziwe karty
-procesorowe, których potrzebne funkcje, takie jak podpisywanie,
-wyjęcie/włożenie karty itp. są odwzorowywane na prawdziwe karty
-współdzielone z maszyną kliencką, na której działa emulator, lub
-karty czysto programowe.
+Ta biblioteka zapewnia emulację kart procesorowych dla wirtualnego
+czytnika kart działającego na maszynie wirtualnej gościa.
+
+Implementuje standard CAC DoD z osobnymi kontenerami PKI (zgodny
+coolkey) przy użyciu certyfikatów odczytywanych z NSS.
%package devel
Summary: Header files for cacard library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki cacard
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: nss-devel
-Requires: pcsc-lite-devel >= 1.6
+Requires: glib2-devel >= 1:2.22
+Requires: nss-devel >= 1:3.12.8
%description devel
Header files for cacard library.
@@ -64,17 +67,19 @@ Statyczna biblioteka cacard.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
+
+# force new version from autoconf-archive (original one uses non-POSIX ${V:N} syntax)
+%{__rm} m4/ax_compiler_flags_cflags.m4
%build
%{__libtoolize}
-%{__aclocal}
+%{__aclocal} -I m4
%{__autoconf}
%{__autoheader}
%{__automake}
%configure \
- --enable-passthru
+ %{?with_static_libs:--enable-static}
+
%{__make}
%install
@@ -94,7 +99,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS README
+%doc ChangeLog NEWS README.md
%attr(755,root,root) %{_bindir}/vscclient
%attr(755,root,root) %{_libdir}/libcacard.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libcacard.so.0
@@ -105,6 +110,8 @@ rm -rf $RPM_BUILD_ROOT
%{_includedir}/cacard
%{_pkgconfigdir}/libcacard.pc
+%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libcacard.a
+%endif
diff --git a/libcacard-pcsc.patch b/libcacard-pcsc.patch
deleted file mode 100644
index b11b17d..0000000
--- a/libcacard-pcsc.patch
+++ /dev/null
@@ -1,94 +0,0 @@
---- libcacard-0.1.2/passthru.c.orig 2010-12-09 12:36:19.000000000 +0100
-+++ libcacard-0.1.2/passthru.c 2011-07-16 13:10:29.302870462 +0200
-@@ -9,6 +9,8 @@
- #include "mutex.h"
- #include "vcard_emul.h"
- #include "passthru.h"
-+#include <stdint.h>
-+#include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <pcsclite.h>
-@@ -325,8 +327,8 @@
- /*
- * Get the state entry that matches this reader. If none found, return NULL
- */
--static SCARD_READERSTATE_A *
--passthru_get_reader_state(SCARD_READERSTATE_A *reader_states,
-+static SCARD_READERSTATE *
-+passthru_get_reader_state(SCARD_READERSTATE *reader_states,
- int reader_count, char *name)
- {
- int i;
-@@ -349,8 +351,8 @@
- /*
- * find a card slot that has been cleared out
- */
--static SCARD_READERSTATE_A *
--passthru_get_blank_reader(SCARD_READERSTATE_A *reader_states, int reader_count)
-+static SCARD_READERSTATE *
-+passthru_get_blank_reader(SCARD_READERSTATE *reader_states, int reader_count)
- {
- return passthru_get_reader_state(reader_states, reader_count, NULL);
- }
-@@ -365,7 +367,7 @@
- {
- char *reader_list = NULL;
- int reader_list_len = 0;
-- SCARD_READERSTATE_A *reader_states = NULL;
-+ SCARD_READERSTATE *reader_states = NULL;
- int reader_count = 0; /* number of active readers */
- int max_reader_count = 0; /* size of the reader_state array (including
- inactive readers) */
-@@ -414,7 +416,7 @@
- /* count the readers and mark the ones that are still with us */
- for (reader_entry = new_reader_list; *reader_entry;
- reader_entry += strlen(reader_entry)+1) {
-- SCARD_READERSTATE_A *this_state;
-+ SCARD_READERSTATE *this_state;
- new_reader_count++;
- /* if the reader is still on the list, mark it present */
- this_state = passthru_get_reader_state(reader_states,
-@@ -441,7 +443,7 @@
- * array up into those locations vacated by ejected readers. */
- for (i=reader_count-1; i < (new_reader_count -1); i--) {
- if (reader_states[i].szReader) {
-- SCARD_READERSTATE_A *blank_reader;
-+ SCARD_READERSTATE *blank_reader;
- blank_reader =
- passthru_get_blank_reader(reader_states,
- new_reader_count);
-@@ -453,12 +455,12 @@
- }
- /* handle the growing list */
- if (new_reader_count > max_reader_count) {
-- SCARD_READERSTATE_A *new_reader_states;
-+ SCARD_READERSTATE *new_reader_states;
-
- /* grow the list */
- new_reader_states =
-- (SCARD_READERSTATE_A *)realloc(reader_states,
-- sizeof(SCARD_READERSTATE_A)*new_reader_count);
-+ (SCARD_READERSTATE *)realloc(reader_states,
-+ sizeof(SCARD_READERSTATE)*new_reader_count);
- if (new_reader_states) {
- /* successful, update our current state */
- reader_states = new_reader_states;
-@@ -477,7 +479,7 @@
- /* now walk the reader list, updating the state */
- for (reader_entry = new_reader_list; *reader_entry;
- reader_entry += strlen(reader_entry)+1) {
-- SCARD_READERSTATE_A *this_state;
-+ SCARD_READERSTATE *this_state;
- this_state = passthru_get_reader_state(reader_states,
- new_reader_count,
- reader_entry);
-@@ -528,7 +530,7 @@
- return; /* exit thread */
- }
- status = passthru_pcsc_lite_init();
-- assert(status == CARD_DONE);
-+ assert(status == VCARD_DONE);
- sleep(1);
- continue;
- }
diff --git a/libcacard-sh.patch b/libcacard-sh.patch
deleted file mode 100644
index 02e30af..0000000
--- a/libcacard-sh.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- libcacard-0.1.2/configure.ac.orig 2011-02-03 16:03:10.000000000 +0100
-+++ libcacard-0.1.2/configure.ac 2011-07-16 12:54:44.076172146 +0200
-@@ -28,14 +28,14 @@
- dnl =========================================================================
- dnl Check deps
-
--CAC_CARD_NONPKGCONFIG_LIBS+=" -pthread"
-+CAC_CARD_NONPKGCONFIG_LIBS="$CAC_CARD_NONPKGCONFIG_LIBS -pthread"
-
- CAC_CARD_REQUIRES=""
-
- PKG_CHECK_MODULES(NSS, nss)
- AC_SUBST(NSS_CFLAGS)
- AC_SUBST(NSS_LIBS)
--CAC_CARD_REQUIRES+=" nss"
-+CAC_CARD_REQUIRES="$CAC_CARD_REQUIRES nss"
-
-
- AS_IF([test "$_cflags_is_set" = "yes"], [], [
-@@ -78,7 +78,7 @@
- PKG_CHECK_MODULES(PCSC,libpcsclite)
- AC_SUBST(PCSC_CFLAGS)
- AC_SUBST(PCSC_LIBS)
--CAC_CARD_REQUIRES+=" pcsc-lite"
-+CAC_CARD_REQUIRES="$CAC_CARD_REQUIRES libpcsclite"
- USE_PASSTHRU=-DUSE_PASSTHRU
- AC_SUBST(USE_PASSTHRU)
- fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libcacard.git/commitdiff/8fcba95d769b87befe45fa32d9ab4c4f78378ace
More information about the pld-cvs-commit
mailing list