Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] RFC ebuild for a non-standard Python package
Date: Mon, 03 May 2010 09:04:00
Message-Id: tkrat.d83c8d472de24695@igpm.rwth-aachen.de
1 Hi,
2
3 I'd like to install the new package expy on sourceforge
4 http://expy.sourceforge.net/
5
6 Unfortunately, the contents of it are a bit non-standard.
7 First, the tarball has the unusual name expy.6.6.tgz.
8
9 Second, it untars in to the current directory (no subdirectory
10 expy-6.6)
11
12 Third, it has setup.py and some helper modules in a subdirectory
13 'src'.
14
15 My current (working) ebuild is a litte bit brute force.
16 I'd appreciate any comments on streamlining and standardizing it.
17 Many thanks,
18 Helmut.
19
20 # Copyright 1999-2010 Gentoo Foundation
21 # Distributed under the terms of the GNU General Public License v2
22
23 EAPI="2"
24 SUPPORT_PYTHON_ABIS="1"
25
26 inherit distutils flag-o-matic
27
28 DESCRIPTION="USB support for Python."
29 HOMEPAGE="http://expy.sourceforge.net/"
30 MY_P=${P/-/.}
31 SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tgz"
32
33 S=${WORKDIR}/${P}
34 LICENSE="BSD"
35 SLOT="0"
36 KEYWORDS="~amd64 ~ppc ~x86"
37 IUSE="examples"
38
39 RESTRICT_PYTHON_ABIS="3*"
40
41 src_unpack() {
42 mkdir -p ${S}
43 cd ${S}
44 unpack ${A}
45 ln src/* .
46 }
47
48 src_install() {
49 distutils_src_install
50 if use examples; then
51 insinto /usr/share/doc/${PF}
52 fi
53 }