net-im/wemeet: Wemeet - Tencent Video Conferencing (#1186)
[gentoo-zh.git] / app-crypt / etoken-sac / etoken-sac-10.3.ebuild
blob89a9f8c01c2682a891e30b14cce10a1fdf0e6753
1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=7
6 inherit eutils multilib
8 DESCRIPTION="SafeNet (Aladdin) eTokens Middleware (PRO, NG OTP, Flash, Java)"
10 MY_PN="SafenetAuthenticationClient"
11 MY_PV="${PV/_p/-}"
13 MY_P_STD="${MY_PN}-${MY_PV}"
14 SRC_URI="http://repositorio.serpro.gov.br/drivers/safenet/linux/SafenetAuthenticationClient-BR-10.3_Linux_Ubuntu-RedHat(32-64bits).zip"
16 HOMEPAGE="http://aladdin-rd.ru"
17 LICENSE="EULA"
18 SLOT="0"
19 KEYWORDS="~amd64"
20 IUSE="+ssl"
22 RDEPEND="
23         dev-libs/atk
24         dev-libs/glib:2
25         dev-libs/openssl
26         media-libs/fontconfig
27         media-libs/freetype
28         sys-apps/dbus
29         sys-apps/pcsc-lite
30         virtual/libusb:0
31         x11-libs/cairo
32         x11-libs/gdk-pixbuf
33         x11-libs/pango
34         ssl? ( dev-libs/libp11 )
35         !app-crypt/pkiclient
37 DEPEND="${RDEPEND}"
39 S="${WORKDIR}"
41 src_unpack() {
42         default
44         cd "$S";
46         if use amd64 ; then
47                 unpack "$S/SafenetAuthenticationClient-BR-10.0.37-0_amd64.deb"
48         elif use x86 ; then
49                 unpack "$S/SafenetAuthenticationClient-BR-10.0.37-0_i386.deb"
50         fi
52         unpack "$S/data.tar.xz"
54         rm -rf usr/lib
56         mv lib usr/$(get_libdir)
59 src_prepare() {
60         default
62         cp "${FILESDIR}/SACSrv.init" etc/init.d/SACSrv
66 src_install() {
67         local usb_readers_dir="usr/$(get_libdir)/readers/usb"
69         mkdir -p "${usb_readers_dir}"
70         ln -s "../../../share/eToken/drivers/aks-ifdh.bundle" "${usb_readers_dir}/aks-ifdh.bundle"
72         pushd usr/share/eToken/drivers/aks-ifdh.bundle/Contents/Linux
73                 # TODO glob
74                 ln -s libAksIfdh.so{.$(ver_cut 1-2),}
75         popd
77         mkdir -p etc/conf.d/
78         touch etc/conf.d/SACSrv
80         mv etc "${D}/"
81         mv usr "${D}/"
82         mv var "${D}/"
85 pkg_postinst() {
86         einfo "usermod -aG usb pcscd"
87         einfo ""
88         einfo "rc-update add SACSrv default"
89         einfo ""
90         einfo "If you need some help, you can ask the help in that article:"
91         einfo "http://www.it-lines.ru/blogs/linux/nastrojka-etoken-v-gentoo-linux"