| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/pcsc-lite/pcsc-lite-1.8.4.ebuild,v 1.1 2012/06/26 21:35:46 flameeyes Exp $
|
| 4 |
|
| 5 |
EAPI="4"
|
| 6 |
|
| 7 |
inherit multilib eutils user
|
| 8 |
|
| 9 |
DESCRIPTION="PC/SC Architecture smartcard middleware library"
|
| 10 |
HOMEPAGE="http://pcsclite.alioth.debian.org/"
|
| 11 |
|
| 12 |
STUPID_NUM="3734"
|
| 13 |
MY_P="${PN}-${PV/_/-}"
|
| 14 |
SRC_URI="http://alioth.debian.org/download.php/${STUPID_NUM}/${MY_P}.tar.bz2"
|
| 15 |
S="${WORKDIR}/${MY_P}"
|
| 16 |
|
| 17 |
LICENSE="as-is"
|
| 18 |
SLOT="0"
|
| 19 |
KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
|
| 20 |
|
| 21 |
# This is called libusb so that it doesn't fool people in thinking that
|
| 22 |
# it is _required_ for USB support. Otherwise they'll disable udev and
|
| 23 |
# that's going to be worse.
|
| 24 |
IUSE="libusb +udev"
|
| 25 |
|
| 26 |
REQUIRED_USE="^^ ( udev libusb )"
|
| 27 |
|
| 28 |
CDEPEND="libusb? ( virtual/libusb:1 )
|
| 29 |
udev? ( sys-fs/udev )"
|
| 30 |
DEPEND="${CDEPEND}
|
| 31 |
virtual/pkgconfig"
|
| 32 |
RDEPEND="${CDEPEND}
|
| 33 |
!<app-crypt/ccid-1.4.1-r1"
|
| 34 |
|
| 35 |
pkg_setup() {
|
| 36 |
enewgroup openct # make sure it exists
|
| 37 |
enewgroup pcscd
|
| 38 |
enewuser pcscd -1 -1 /var/run/pcscd pcscd,openct
|
| 39 |
}
|
| 40 |
|
| 41 |
src_configure() {
|
| 42 |
econf \
|
| 43 |
--disable-maintainer-mode \
|
| 44 |
--disable-dependency-tracking \
|
| 45 |
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
|
| 46 |
--enable-usbdropdir="${EPREFIX}/usr/$(get_libdir)/readers/usb" \
|
| 47 |
--without-systemdsystemunitdir \
|
| 48 |
$(use_enable udev libudev) \
|
| 49 |
$(use_enable libusb) \
|
| 50 |
${myconf}
|
| 51 |
}
|
| 52 |
|
| 53 |
DOCS=( AUTHORS DRIVERS HELP README SECURITY ChangeLog )
|
| 54 |
|
| 55 |
src_install() {
|
| 56 |
default
|
| 57 |
find "${D}" -name '*.la' -delete
|
| 58 |
|
| 59 |
newinitd "${FILESDIR}/pcscd-init.5" pcscd
|
| 60 |
|
| 61 |
if use udev; then
|
| 62 |
insinto /lib/udev/rules.d
|
| 63 |
doins "${FILESDIR}"/99-pcscd-hotplug.rules
|
| 64 |
fi
|
| 65 |
}
|
| 66 |
|
| 67 |
pkg_postinst() {
|
| 68 |
elog "Starting from version 1.6.5, pcsc-lite will start as user nobody in"
|
| 69 |
elog "the pcscd group, to avoid running as root."
|
| 70 |
elog ""
|
| 71 |
elog "This also means you need the newest drivers available so that the"
|
| 72 |
elog "devices get the proper owner."
|
| 73 |
elog ""
|
| 74 |
elog "Furthermore, a conf.d file is no longer installed by default, as"
|
| 75 |
elog "the default configuration does not require one. If you need to"
|
| 76 |
elog "pass further options to pcscd, create a file and set the"
|
| 77 |
elog "EXTRA_OPTS variable."
|
| 78 |
elog ""
|
| 79 |
if use udev; then
|
| 80 |
elog "Hotplug support is provided by udev rules; you only need to tell"
|
| 81 |
elog "the init system to hotplug it, by setting this variable in"
|
| 82 |
elog "/etc/rc.conf:"
|
| 83 |
elog ""
|
| 84 |
elog " rc_hotplug=\"pcscd\""
|
| 85 |
fi
|
| 86 |
}
|