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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (hide annotations) (download)
Fri May 4 09:17:26 2012 UTC (12 months, 2 weeks ago) by jdhore
Branch: MAIN
Changes since 1.3: +2 -2 lines
dev-util/pkgconfig -> virtual/pkgconfig

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

1 vapier 1.3 # Copyright 1999-2012 Gentoo Foundation
2 ssuominen 1.1 # Distributed under the terms of the GNU General Public License v2
3 jdhore 1.4 # $Header: /var/cvsroot/gentoo-x86/sys-apps/usbutils/usbutils-005.ebuild,v 1.3 2012/01/31 16:17:50 vapier Exp $
4 ssuominen 1.1
5     EAPI="4"
6    
7     PYTHON_DEPEND="python? 2:2.6"
8    
9 ssuominen 1.2 inherit autotools eutils python
10 ssuominen 1.1
11     DESCRIPTION="USB enumeration utilities"
12     HOMEPAGE="http://linux-usb.sourceforge.net/"
13     SRC_URI="mirror://debian/pool/main/u/${PN}/${PN}_${PV}.orig.tar.gz"
14     #SRC_URI="mirror://kernel/linux/utils/usb/${PN}/${P}.tar.gz"
15    
16     LICENSE="GPL-2"
17     SLOT="0"
18     KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
19     IUSE="network-cron python zlib"
20    
21     RDEPEND="virtual/libusb:1
22     zlib? ( sys-libs/zlib )"
23     DEPEND="${RDEPEND}
24 jdhore 1.4 virtual/pkgconfig"
25 ssuominen 1.1
26     pkg_setup() {
27     if use python; then
28     python_set_active_version 2
29     python_pkg_setup
30     fi
31     }
32    
33     src_prepare() {
34 ssuominen 1.2 epatch "${FILESDIR}"/${P}-missing-includes.patch
35    
36 ssuominen 1.1 eautoreconf
37    
38     if use python; then
39     python_convert_shebangs 2 lsusb.py
40     sed -i -e '/^usbids/s:/usr/share:/usr/share/misc:' lsusb.py || die
41     fi
42     }
43    
44     src_configure() {
45     econf \
46     --datarootdir=/usr/share \
47     --datadir=/usr/share/misc \
48     $(use_enable zlib)
49     }
50    
51     src_install() {
52 vapier 1.3 default
53     newdoc usbhid-dump/NEWS NEWS.usbhid-dump
54 ssuominen 1.1
55 vapier 1.3 # the package (currently) lacks plumbing to use the gzipped file
56     rm -f "${ED}"/usr/share/misc/usb.ids.gz
57 ssuominen 1.1
58     use python || rm -f "${ED}"/usr/bin/lsusb.py
59    
60     mv -vf "${ED}"/usr/sbin/update-usbids{.sh,} || die
61     newbin "${FILESDIR}"/usbmodules.sh usbmodules
62    
63     use network-cron || return 0
64     exeinto /etc/cron.monthly
65     newexe "${FILESDIR}"/${PN}.cron update-usbids
66     }

  ViewVC Help
Powered by ViewVC 1.1.13