/[gentoo-x86]/sys-apps/usbutils/usbutils-004.ebuild
Gentoo

Contents of /sys-apps/usbutils/usbutils-004.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Fri May 4 09:17:26 2012 UTC (2 years, 3 months ago) by jdhore
Branch: MAIN
Changes since 1.7: +2 -2 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

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/usbutils/usbutils-004.ebuild,v 1.7 2012/01/05 10:02:29 ssuominen Exp $
4
5 EAPI="3"
6
7 PYTHON_DEPEND="python? 2:2.6"
8
9 inherit python
10
11 DESCRIPTION="USB enumeration utilities"
12 HOMEPAGE="http://linux-usb.sourceforge.net/"
13 SRC_URI="mirror://kernel/linux/utils/usb/usbutils/${P}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
18 IUSE="network-cron python zlib"
19
20 RDEPEND="virtual/libusb:1
21 zlib? ( sys-libs/zlib )"
22 DEPEND="${RDEPEND}
23 virtual/pkgconfig"
24
25 pkg_setup() {
26 if use python; then
27 python_set_active_version 2
28 python_pkg_setup
29 fi
30 }
31
32 src_prepare() {
33 if use python; then
34 python_convert_shebangs 2 lsusb.py
35 sed -i -e '/^usbids/s:/usr/share:/usr/share/misc:' lsusb.py || die
36 fi
37 }
38
39 src_configure() {
40 econf \
41 --datarootdir=/usr/share \
42 --datadir=/usr/share/misc \
43 $(use_enable zlib)
44 }
45
46 src_install() {
47 emake DESTDIR="${D}" install || die
48 use python || rm -f "${D}"/usr/bin/lsusb.py
49 mv "${D}"/usr/sbin/update-usbids{.sh,} || die
50 newbin "${FILESDIR}"/usbmodules.sh usbmodules || die
51 dodoc AUTHORS ChangeLog NEWS README
52
53 use network-cron || return 0
54 exeinto /etc/cron.monthly
55 newexe "${FILESDIR}"/usbutils.cron update-usbids || die
56 }

  ViewVC Help
Powered by ViewVC 1.1.20