1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="Command line programmer for Teensy microcontrollers"
11 HOMEPAGE="http://pjrc.com/teensy/loader_cli.html"
12 SRC_URI="http://pjrc.com/teensy/${MY_PN}.${PV}.tar.gz"
17 IUSE="-examples +udev"
19 DEPEND="dev-libs/libusb"
22 S="${WORKDIR}/${MY_PN}"
25 use udev && enewgroup teensy
26 #groupdel in pkg_postrm()?
32 # Don't strip the binary (remove -s flag)
33 sed -i 's/$(CFLAGS) -s /$(CFLAGS) /' Makefile
37 emake OS=LINUX "CFLAGS=${CFLAGS}" "LDFLAGS=${LDFLAGS}"
41 dobin teensy_loader_cli
46 insinto /lib/udev/rules.d
47 doins "${FILESDIR}/49-teensy.rules"
53 elog "To be able to use Teensy devices, you need to be a"
54 elog "member of the group 'teensy' which has just been added"
55 elog "to your system. You can add your user to the group by"
56 elog "running the following command as root:"
58 elog " usermod -a -G teensy youruser"
60 elog "Please be aware that you need to either re-login or run"
62 elog " newgrp - teensy"
64 elog "for the group membership to take effect."