summaryrefslogtreecommitdiff
path: root/system/opensc-ceres
diff options
context:
space:
mode:
authorDaniel R <danielrodriguez.es@gmail.com>2010-05-13 01:00:59 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:59 +0200
commitb4572abe58e665b924d81eb7ba0675a019f323b4 (patch)
tree8342fe6f6bf79934af5da760f98c59286b375620 /system/opensc-ceres
parentb96fb91780d69d898f78e20f69975cde8d3e7c88 (diff)
downloadslackbuilds-b4572abe58e665b924d81eb7ba0675a019f323b4.tar.gz
system/opensc-ceres: Added to 13.0 repository
Diffstat (limited to 'system/opensc-ceres')
-rw-r--r--system/opensc-ceres/README16
-rw-r--r--system/opensc-ceres/doinst.sh19
-rw-r--r--system/opensc-ceres/opensc-ceres.SlackBuild69
-rw-r--r--system/opensc-ceres/opensc-ceres.info10
-rw-r--r--system/opensc-ceres/slack-desc19
5 files changed, 133 insertions, 0 deletions
diff --git a/system/opensc-ceres/README b/system/opensc-ceres/README
new file mode 100644
index 0000000000..8e84eb4abc
--- /dev/null
+++ b/system/opensc-ceres/README
@@ -0,0 +1,16 @@
+This package provides opensc support for FNMT CERES cards.
+
+Unfortunately, the developer (FNMT) does not provide the source code for
+this software, but only binary packages for certain distributions.
+Therefore, we just repackage the official binaries for Debian.
+
+If you use firefox, you must manually register /usr/lib/opensc-pkcs11.so
+(or /usr/lib64/opensc-pkcs.11.so) as a security device in firefox.
+
+This requires pcsc-lite, pcsc-tools, pcsc-perl, ccid, openct, and opensc.
+
+Note: opensc-0.11.7 is shown as a required dependency according to the
+upstream author of this software; your mileage may vary, especially since
+we (SlackBuilds.org) currently have a newer version than that, and we
+probably won't be reverting it in order to satisfy the requirements of
+a binary-only package.
diff --git a/system/opensc-ceres/doinst.sh b/system/opensc-ceres/doinst.sh
new file mode 100644
index 0000000000..5d1f522e48
--- /dev/null
+++ b/system/opensc-ceres/doinst.sh
@@ -0,0 +1,19 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/opensc.conf.new
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
diff --git a/system/opensc-ceres/opensc-ceres.SlackBuild b/system/opensc-ceres/opensc-ceres.SlackBuild
new file mode 100644
index 0000000000..2e2fafb91d
--- /dev/null
+++ b/system/opensc-ceres/opensc-ceres.SlackBuild
@@ -0,0 +1,69 @@
+#!/bin/sh
+
+## Written by Daniel R. <danielrodriguez.es@gmail.com>
+
+# Based on scripts by the SlackBuilds.org project
+
+PRGNAM=opensc-ceres
+VERSION=2.1.1
+ARCH=${ARCH:-i386}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "x86_64" ]; then
+ TARGET="x86_64"
+else
+ TARGET="x86"
+fi
+
+if [ "$TARGET" = "x86" ]; then
+ SRCFILE=Debian_Lenny_32bits.zip
+ SRCDEB=${PRGNAM}_$(echo $VERSION | tr "_" "-")_i386.deb
+elif [ "$TARGET" = "x86_64" ]; then
+ SRCFILE=Debian_Lenny_64bits.zip
+ SRCDEB=${PRGNAM}_$(echo $VERSION | tr "_" "-")_amd64.deb
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $PKG
+
+unzip -j $CWD/$SRCFILE */$SRCDEB
+ar x $SRCDEB data.tar.gz
+tar xzf data.tar.gz
+rm $SRCDEB data.tar.gz
+
+if [ "$TARGET" = "x86_64" ]; then
+ mv $PKG/usr/lib $PKG/usr/lib64
+ sed -i "s%= /usr/lib/%= /usr/lib64/%" \
+ $PKG/usr/share/$PRGNAM/opensc.conf.ceres
+ sed -i "s%libdir=\${exec_prefix}/lib%libdir=\${exec_prefix}/lib64%" \
+ $PKG/usr/lib64/pkgconfig/*.pc
+ sed -i "s%/usr/lib%/usr/lib64%g" \
+ $PKG/usr/lib64/*.la
+fi
+
+mkdir -p $PKG/etc
+cp $PKG/usr/share/$PRGNAM/opensc.conf.ceres $PKG/etc/opensc.conf.new
+
+mv $PKG/usr/share/doc $PKG/usr
+mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+chown -R root:root .
+find . -type d -exec chmod 755 {} \;
+chmod -R u+rw,go+r-w,a-s .
+
+/sbin/makepkg -l y -c n -p $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/opensc-ceres/opensc-ceres.info b/system/opensc-ceres/opensc-ceres.info
new file mode 100644
index 0000000000..7ad3de29bb
--- /dev/null
+++ b/system/opensc-ceres/opensc-ceres.info
@@ -0,0 +1,10 @@
+PRGNAM="opensc-ceres"
+VERSION="2.1.1"
+HOMEPAGE="http://www.cert.fnmt.es/"
+DOWNLOAD="http://www.cert.fnmt.es/content/pages_std/software/Debian_Lenny_32bits.zip"
+MD5SUM="8eae3889f53eb6339ee442b65f6134cb"
+DOWNLOAD_x86_64="http://www.cert.fnmt.es/content/pages_std/software/Debian_Lenny_64bits.zip"
+MD5SUM_x86_64="a56239a8aae6d4e6cd9feb6b044470cd"
+MAINTAINER="Daniel R."
+EMAIL="<danielrodriguez.es@gmail.com>"
+APPROVED="rworkman"
diff --git a/system/opensc-ceres/slack-desc b/system/opensc-ceres/slack-desc
new file mode 100644
index 0000000000..ce8fd21199
--- /dev/null
+++ b/system/opensc-ceres/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------------|
+opensc-ceres: opensc-ceres (opensc support for FNMT CERES cards)
+opensc-ceres:
+opensc-ceres: This package provides opensc support for FNMT CERES cards.
+opensc-ceres:
+opensc-ceres: Homepage: http://www.cert.fnmt.es
+opensc-ceres:
+opensc-ceres:
+opensc-ceres:
+opensc-ceres:
+opensc-ceres:
+opensc-ceres: