blob: b14ce2634795ef495f20cd78049cd820a51e4117 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/cyberjack/cyberjack-3.3.5-r2.ebuild,v 1.4 2011/08/07 02:57:17 phajdan.jr Exp $
EAPI=2
inherit autotools eutils flag-o-matic
MY_P=ctapi-${P}
DESCRIPTION="REINER SCT cyberJack pinpad/e-com USB user space driver library"
HOMEPAGE="http://www.reiner-sct.de/ http://www.libchipcard.de/"
SRC_URI="http://support.reiner-sct.de/downloads/LINUX/V${PV}/${MY_P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="fox pcsc-lite +udev"
RDEPEND="virtual/libusb:1
fox? ( >=x11-libs/fox-1.6 )
pcsc-lite? ( sys-apps/pcsc-lite )"
DEPEND="${RDEPEND}
pcsc-lite? ( dev-util/pkgconfig )"
S=${WORKDIR}/${MY_P}
pkg_setup() {
use udev && enewgroup ${PN}
}
src_prepare() {
if use udev; then
epatch "${FILESDIR}"/${PN}-3.3.2-udev.patch
cp "${FILESDIR}"/cyberjack.sh etc/udev/ || die
cp "${FILESDIR}"/cyberjack.rules-r1 etc/udev/rules.new || die
AT_M4DIR="m4" eautoreconf
fi
}
src_configure() {
append-flags -fno-strict-aliasing
local with_usbdropdir
use pcsc-lite && with_usbdropdir="--with-usbdropdir=$(pkg-config libpcsclite --variable=usbdropdir)"
econf \
--sysconfdir=/etc/${PN} \
--disable-dependency-tracking \
--disable-hal \
$(use_enable pcsc-lite pcsc) \
$(use_enable fox) \
$(use_enable udev) \
${with_usbdropdir}
}
src_install() {
emake DESTDIR="${D}" install || die
dodoc ChangeLog NEWS doc/README.txt
use udev && rm -rf "${D}"/usr/hotplug
}
pkg_postinst() {
local conf="/etc/${PN}/${PN}.conf"
elog
elog "To configure logging, key beep behaviour etc. you need to"
elog "copy ${conf}.default"
elog "to ${conf}"
elog "and modify the latter as needed."
elog
if use udev; then
elog "To be able to use the cyberJack device, you need to"
elog "be a member of the group 'cyberjack' which has just"
elog "been added to your system. You can add your user to"
elog "the group by running the following command as root:"
elog
elog " gpasswd -a youruser cyberjack"
elog
elog "Please be aware that you need to re-login to your"
elog "system for the group membership to take effect."
elog
fi
}
|