ccid-emulator: Build libopensc from source code
There is no longer an external (or stable) interface for libopensc. Linking this program with an existing version of libopensc that is pre-installed in the system library paths is not practical. However, a specific snapshot of the OpenSC source code is embedded here as a Git submodule (and included in the source distributions). Build libopensc from this and statically link it into this program. (Options such as '--enable-openpace' that are passed to ./configure will be forwarded to control the build configuration of libopensc.) Remove code that existed for compatibility when dynamically linking with older versions of libopensc.
This commit is contained in:
@@ -265,6 +265,9 @@ modern Windows and Unix-like systems by default.
|
||||
|
||||
.. include:: autotools.txt
|
||||
|
||||
The USB CCID Emulator depends on :program:`libopensc`, which is automatically
|
||||
built from a snapshot of the OpenSC source code and then statically linked.
|
||||
|
||||
|
||||
=================
|
||||
Hints on GadgetFS
|
||||
@@ -302,33 +305,6 @@ loading the module, you maybe want to check out `this patch
|
||||
<http://comments.gmane.org/gmane.linux.usb.general/47440>`_.
|
||||
|
||||
|
||||
===============
|
||||
Hints on OpenSC
|
||||
===============
|
||||
|
||||
USB CCID Emulator needs the OpenSC components to be
|
||||
installed (especially :file:`libopensc.so`). Here is an example of how to get
|
||||
the standard installation of OpenSC without |PACE|::
|
||||
|
||||
PREFIX=/tmp/install
|
||||
VSMARTCARD=$PWD/vsmartcard
|
||||
git clone https://github.com/frankmorgner/vsmartcard.git $VSMARTCARD
|
||||
cd $VSMARTCARD
|
||||
git submodule init
|
||||
git submodule update
|
||||
cd $VSMARTCARD/ccid/src/opensc
|
||||
autoreconf --verbose --install
|
||||
./configure --prefix=$PREFIX
|
||||
make install && cd -
|
||||
|
||||
Now :file:`libopensc.so` should be located in ``$PREFIX/lib``. Here is how to
|
||||
configure the USB CCID Emulator to use it::
|
||||
|
||||
cd $VSMARTCARD/ccid
|
||||
./configure --prefix=$PREFIX OPENSC_LIBS="-L$PREFIX/lib -lopensc"
|
||||
make install && cd -
|
||||
|
||||
|
||||
*****
|
||||
Usage
|
||||
*****
|
||||
|
||||
@@ -109,7 +109,6 @@
|
||||
<li><a class="reference internal" href="#installation">Installation</a><ul>
|
||||
<li><a class="reference internal" href="#installation-on-linux-unix-and-similar">Installation on Linux, Unix and similar</a></li>
|
||||
<li><a class="reference internal" href="#hints-on-gadgetfs">Hints on GadgetFS</a></li>
|
||||
<li><a class="reference internal" href="#hints-on-opensc">Hints on OpenSC</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference internal" href="#usage">Usage</a></li>
|
||||
@@ -491,6 +490,8 @@ make
|
||||
make install
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>The USB CCID Emulator depends on <strong class="program">libopensc</strong>, which is automatically
|
||||
built from a snapshot of the OpenSC source code and then statically linked.</p>
|
||||
</div>
|
||||
<div class="section" id="hints-on-gadgetfs">
|
||||
<h3>Hints on GadgetFS<a class="headerlink" href="#hints-on-gadgetfs" title="Permalink to this headline">¶</a></h3>
|
||||
@@ -522,31 +523,6 @@ patch is needed</a>.</p>
|
||||
<p>If you are using a more recent version of <strong class="program">dummy_hcd</strong> and get an error
|
||||
loading the module, you maybe want to check out <a class="reference external" href="http://comments.gmane.org/gmane.linux.usb.general/47440">this patch</a>.</p>
|
||||
</div>
|
||||
<div class="section" id="hints-on-opensc">
|
||||
<h3>Hints on OpenSC<a class="headerlink" href="#hints-on-opensc" title="Permalink to this headline">¶</a></h3>
|
||||
<p>USB CCID Emulator needs the OpenSC components to be
|
||||
installed (especially <tt class="file docutils literal"><span class="pre">libopensc.so</span></tt>). Here is an example of how to get
|
||||
the standard installation of OpenSC without <abbr title="Password Authenticated Connection Establishment">PACE</abbr>:</p>
|
||||
<div class="highlight-sh"><div class="highlight"><pre><span class="nv">PREFIX</span><span class="o">=</span>/tmp/install
|
||||
<span class="nv">VSMARTCARD</span><span class="o">=</span><span class="nv">$PWD</span>/vsmartcard
|
||||
git clone https://github.com/frankmorgner/vsmartcard.git <span class="nv">$VSMARTCARD</span>
|
||||
<span class="nb">cd</span> <span class="nv">$VSMARTCARD</span>
|
||||
git submodule init
|
||||
git submodule update
|
||||
<span class="nb">cd</span> <span class="nv">$VSMARTCARD</span>/ccid/src/opensc
|
||||
autoreconf --verbose --install
|
||||
./configure --prefix<span class="o">=</span><span class="nv">$PREFIX</span>
|
||||
make install <span class="o">&&</span> <span class="nb">cd</span> -
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Now <tt class="file docutils literal"><span class="pre">libopensc.so</span></tt> should be located in <tt class="docutils literal"><span class="pre">$PREFIX/lib</span></tt>. Here is how to
|
||||
configure the USB CCID Emulator to use it:</p>
|
||||
<div class="highlight-sh"><div class="highlight"><pre><span class="nb">cd</span> <span class="nv">$VSMARTCARD</span>/ccid
|
||||
./configure --prefix<span class="o">=</span><span class="nv">$PREFIX</span> <span class="nv">OPENSC_LIBS</span><span class="o">=</span><span class="s2">"-L</span><span class="nv">$PREFIX</span><span class="s2">/lib -lopensc"</span>
|
||||
make install <span class="o">&&</span> <span class="nb">cd</span> -
|
||||
</pre></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="usage">
|
||||
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
|
||||
|
||||
Reference in New Issue
Block a user