updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / mkinitcpio-encrypt-sc / openct.patch
blobed935c70cb09cad818dfa3abd305210400480d6f
1 diff -ur openct-0.6.18/etc/openct.conf.in openct-0.6.18-static/etc/openct.conf.in
2 --- openct-0.6.18/etc/openct.conf.in 2009-07-29 10:04:36.000000000 +0300
3 +++ openct-0.6.18-static/etc/openct.conf.in 2009-12-19 18:02:16.000000000 +0200
4 @@ -6,26 +6,26 @@
7 # Path to ifdhandler
8 -ifdhandler {
9 - program = @sbindir@/ifdhandler;
10 +#ifdhandler {
11 +# program = @sbindir@/ifdhandler;
13 # Safe to disable force_poll:
14 # >=linux-2.6.27.14
15 # >=linux-2.6.28.3
17 - force_poll = 1;
18 -@ENABLE_NON_PRIVILEGED@ user = @daemon_user@;
19 -@ENABLE_NON_PRIVILEGED@ groups = {
20 -@ENABLE_NON_PRIVILEGED@ @daemon_groups@,
21 -@ENABLE_NON_PRIVILEGED@ };
22 -};
23 +# force_poll = 1;
24 +#@ENABLE_NON_PRIVILEGED@ user = @daemon_user@;
25 +#@ENABLE_NON_PRIVILEGED@ groups = {
26 +#@ENABLE_NON_PRIVILEGED@ @daemon_groups@,
27 +#@ENABLE_NON_PRIVILEGED@ };
28 +#};
31 # Configuration for ifdproxy (if you use it)
32 -ifdproxy {
33 +#ifdproxy {
34 # server-port = @OPENCT_SOCKET_PATH@/.ifdproxy,
35 # device-port = :6666;
36 -};
37 +#};
39 # Configure static, non-hotplug aware readers here
41 diff -ur openct-0.6.18/etc/openct_usb.in openct-0.6.18-static/etc/openct_usb.in
42 --- openct-0.6.18/etc/openct_usb.in 2008-12-27 17:51:56.000000000 +0200
43 +++ openct-0.6.18-static/etc/openct_usb.in 2009-12-19 18:05:17.000000000 +0200
44 @@ -4,6 +4,9 @@
45 [ "$ACTION" = "add" ] || exit 0
46 [ -e "@OPENCT_SOCKET_PATH@/status" ] || exit 0
48 +# try to get the device path
49 +cd /sys$DEVPATH && cd .. && DEVPATH=`pwd`
51 # try to get the device node from the parent device
52 if [ -z "$DEVNAME" ]; then
54 @@ -15,7 +18,7 @@
55 else
56 UDEVINFO="udevadm info"
58 - DEVNAME=/dev/$($UDEVINFO --query=name --path=$(dirname $DEVPATH))
59 + DEVNAME=/dev/$($UDEVINFO --query=name --path=$DEVPATH)
62 # if udev supplied a device node directly from the usb-device, we use it,
63 @@ -31,9 +34,9 @@
66 if [ -z "$PRODUCT" ]; then
67 - V=$(cat /sys$(dirname $DEVPATH)/idVendor | sed -e 's/^0*//')
68 - P=$(cat /sys$(dirname $DEVPATH)/idProduct | sed -e 's/^0*//')
69 - D=$(cat /sys$(dirname $DEVPATH)/bcdDevice | sed -e 's/^0*//')
70 + V=$(cat $DEVPATH/idVendor | sed -e 's/^0*//')
71 + P=$(cat $DEVPATH/idProduct | sed -e 's/^0*//')
72 + D=$(cat $DEVPATH/bcdDevice | sed -e 's/^0*//')
73 PRODUCT="$V/$P/$D"
76 diff -ur openct-0.6.18/src/ifd/Makefile.am openct-0.6.18-static/src/ifd/Makefile.am
77 --- openct-0.6.18/src/ifd/Makefile.am 2008-12-27 17:51:56.000000000 +0200
78 +++ openct-0.6.18-static/src/ifd/Makefile.am 2009-12-19 18:02:16.000000000 +0200
79 @@ -27,12 +27,14 @@
80 -I$(top_srcdir)/src/include \
81 -I$(top_builddir)/src/include \
82 $(OPTIONAL_PCSC_CFLAGS) $(OPTIONAL_LIBUSB_CFLAGS) $(LTLIB_CFLAGS)
83 +libifd_la_LDFLAGS = -all-static
85 ifdhandler_SOURCES = ifdhandler.c
86 -ifdhandler_LDADD = libifd.la
87 +ifdhandler_LDADD = libifd.la -ldl
88 ifdhandler_CFLAGS = $(AM_CFLAGS) \
89 -I$(top_srcdir)/src/include \
90 -I$(top_builddir)/src/include
91 +ifdhandler_LDFLAGS = -all-static
93 ifdproxy_SOURCES = ifdproxy.c ria-device.c ria-server.c
94 ifdproxy_LDADD = libifd.la
95 diff -ur openct-0.6.18/src/tools/Makefile.am openct-0.6.18-static/src/tools/Makefile.am
96 --- openct-0.6.18/src/tools/Makefile.am 2008-07-27 12:54:36.000000000 +0300
97 +++ openct-0.6.18-static/src/tools/Makefile.am 2009-12-19 18:02:16.000000000 +0200
98 @@ -11,7 +11,8 @@
99 -I$(top_builddir)/src/include
101 openct_control_SOURCES = openct-control.c
102 -openct_control_LDADD = $(top_builddir)/src/ifd/libifd.la $(top_builddir)/src/ct/libopenct.la
103 +openct_control_LDADD = $(top_builddir)/src/ifd/libifd.la $(top_builddir)/src/ct/libopenct.la -ldl
104 openct_control_CFLAGS = $(AM_CFLAGS) \
105 -I$(top_srcdir)/src/include \
106 -I$(top_builddir)/src/include
107 +openct_control_LDFLAGS = -all-static