opensc/MacOSX/scripts/postinstall
David Ward bddef2485f macOS: Remove unused build code for the CryptoTokenKit app extension
OpenSCToken (https://github.com/frankmorgner/OpenSCToken) is now a
standalone package that provides the CryptoTokenKit app extension.
It includes its own 'build-package' script, which handles building
the OpenSC library and statically linking against it.

The 'MacOSX/' directory in OpenSC itself is only used to build the
macOS tokend. Remove unused code for building a CryptoTokenKit app
extension from this directory (which no longer works). This should
help to avoid confusion when building OpenSC for macOS.
2018-04-25 13:01:49 +02:00

23 lines
785 B
Bash
Executable File

#!/bin/bash
cp /Library/OpenSC/lib/opensc-pkcs11.so /usr/local/lib/opensc-pkcs11.so
cp /Library/OpenSC/lib/onepin-opensc-pkcs11.so /usr/local/lib/onepin-opensc-pkcs11.so
if [ -e "/Library/OpenSC/etc/opensc.conf.md5" ]
then
read cs_fromfile file < "/Library/OpenSC/etc/opensc.conf.md5"
cs_calculated=$( md5 -q "/Library/OpenSC/etc/opensc.conf")
if [ "$cs_fromfile" = "$cs_calculated" ]
then
mv /Library/OpenSC/etc/opensc.conf.orig /Library/OpenSC/etc/opensc.conf
md5 -r /Library/OpenSC/etc/opensc.conf > /Library/OpenSC/etc/opensc.conf.md5
fi
else
mv /Library/OpenSC/etc/opensc.conf.orig /Library/OpenSC/etc/opensc.conf
md5 -r /Library/OpenSC/etc/opensc.conf > /Library/OpenSC/etc/opensc.conf.md5
fi
for f in /Library/OpenSC/bin/*
do
ln -sf $f /usr/local/bin
done
exit 0