You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-boot/raspberrypi-mkimage/raspberrypi-mkimage-0_p2012...

56 lines
1.3 KiB

# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-boot/raspberrypi-mkimage/raspberrypi-mkimage-0_p20120201.ebuild,v 1.3 2014/11/27 13:45:18 pacho Exp $
EAPI=5
PYTHON_COMPAT=( python{2_6,2_7,3_2,3_3,3_4} )
inherit eutils distutils-r1
DESCRIPTION="Raspberry Pi kernel mangling tool mkimage/imagetool-uncompressed.py"
HOMEPAGE="https://github.com/raspberrypi/tools/"
SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
DEPEND=""
RDEPEND="${PYTHON_DEPS}"
src_unpack() {
mkdir "${S}" || die
cp {"${FILESDIR}"/${P}-,"${S}"/}imagetool-uncompressed.py || die
}
python_prepare_all() {
epatch "${FILESDIR}"/${P}-imagetool-uncompressed.patch
sed -e '/^load_to_mem("/s:(":("'${EPREFIX}'/usr/share/'${PN}'/:' \
-e '1s:python2:python:' \
-i imagetool-uncompressed.py || die
python_copy_sources
}
python_prepare() {
cd "${BUILD_DIR}" || die
case ${EPYTHON} in
python3.1|python3.2|python3.3)
epatch "${FILESDIR}"/${P}-imagetool-uncompressed-python3.patch
;;
esac
}
python_compile() { :; }
python_install() {
cd "${BUILD_DIR}" || die
python_doscript imagetool-uncompressed.py
}
python_install_all() {
insinto /usr/share/${PN}
newins {"${FILESDIR}"/${P}-,}args-uncompressed.txt
newins {"${FILESDIR}"/${P}-,}boot-uncompressed.txt
}