SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "ccid"

# SliTaz package receipt.

PACKAGE="ccid"
VERSION="1.5.0"
CATEGORY="base-system"
SHORT_DESC="Chip and Smart Card Interface Devices driver."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="LGPL2.1"
WEB_SITE="https://ccid.apdu.fr/"

TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="${WEB_SITE}files/$TARBALL"

DEPENDS="gcc83-lib-base libusb pcsc-lite"
BUILD_DEPENDS="gcc83 libusb-dev pcsc-lite-dev"

# What is the latest version available today?
current_version()
{
    wget -O - ${WEB_SITE}files 2>/dev/null | \
    sed '/ccid-/!d;s|.*ccid-||;s|.tar.*||' | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    ./configure                        \
        CC=gcc-83                    \
        CXX=g++-83                    \
        LDFLAGS="$LDFLAGS -lrt"                \
        --prefix=/usr                    \
        --sysconfdir=/etc                \
        --enable-serialconfdir=/etc/reader.conf.d    \
        --enable-usbdropdir=/usr/lib/pcsc/drivers    \
        --enable-twinserial                \
        $CONFIGURE_ARGS &&
    make &&
    make install DESTDIR=$DESTDIR &&
    make install_ccidtwin DESTDIR=$DESTDIR -C src
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/etc/udev/rules.d
    mkdir -p $fs/usr/bin
    mkdir -p $fs/usr/sbin

    cp -a $install/*        $fs/
    cp $src/src/92_pcscd_ccid.rules    $fs/etc/udev/rules.d/
    mv $fs/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist \
                    $fs/etc/libccid_Info.plist
    ln -s /etc/libccid_Info.plist \
        $fs/usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist
    cp $src/contrib/RSA_SecurID/RSA_SecurID_getpasswd \
                    $fs/usr/bin
    cp $src/contrib/Kobil_mIDentity_switch/Kobil_mIDentity_switch \
                    $fs/usr/sbin
}

post_install()
{
    # addgroup pcscd if needed                                                                                                                
    if ! grep -q pcscd "$1/etc/group"
      then
        echo
        echo -n "Adding group pcscd..."
        chroot "$1/" addgroup pcscd
        status
    fi
}
6063 packages and 233209 files in current database (Sat Dec 21 00:00:03 2024)