sys-apps/man-db: Added live ebuild.
[gentoo.git] / app-crypt / asedriveiiie-serial / asedriveiiie-serial-3.5.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 DESCRIPTION="ASEDriveIIIe Serial Card Reader"
7 HOMEPAGE="http://www.athena-scs.com"
8 SRC_URI="http://www.athena-scs.com/downloads/${P}.tar.bz2"
9 LICENSE="BSD"
10 SLOT="0"
11 IUSE=""
12 KEYWORDS="~amd64 ~x86"
13 RDEPEND=">=sys-apps/pcsc-lite-1.3.0"
14 DEPEND="${RDEPEND}
15         virtual/pkgconfig"
16
17 src_install() {
18         default
19
20         local conf="/etc/reader.conf.d/${PN}.conf"
21
22         dodir "$(dirname "${conf}")"
23         insinto "$(dirname "${conf}")"
24         newins "etc/reader.conf" "$(basename "${conf}")"
25 }
26
27 pkg_postinst() {
28         elog "NOTICE:"
29         elog "1. Update ${conf} file"
30         elog "2. Run update-reader.conf, yes this is a command..."
31         elog "3. Restart pcscd"
32 }
33
34 pkg_postrm() {
35         #
36         # Without this, pcscd will not start next time.
37         #
38         local conf="/etc/reader.conf.d/${PN}.conf"
39         if ! [ -f "$(grep LIBPATH "${conf}" | sed 's/LIBPATH *//' | sed 's/ *$//g' | head -n 1)" ]; then
40                 rm "${conf}"
41                 update-reader.conf
42                 elog "NOTICE:"
43                 elog "You need to restart pcscd"
44         fi
45 }