forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
heimdall-1.4.0.ebuild
61 lines (49 loc) · 1.37 KB
/
heimdall-1.4.0.ebuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI=5
inherit autotools eutils qt4-r2 udev
if [[ ${PV} != 9999 ]]; then
SRC_URI="https://github.com/Benjamin-Dobell/Heimdall/archive/v${PV}.tar.gz -> ${P}.tar.gz"
KEYWORDS="~amd64"
S="${WORKDIR}/Heimdall-${PV}"
else
inherit git-2
EGIT_REPO_URI="https://github.com/Benjamin-Dobell/Heimdall.git"
fi
DESCRIPTION="Tool suite used to flash firmware onto Samsung Galaxy S devices"
HOMEPAGE="http://www.glassechidna.com.au/products/heimdall/"
LICENSE="MIT"
SLOT="0"
IUSE="qt4"
# virtual/libusb is not precise enough
RDEPEND=">=dev-libs/libusb-1.0.18:1=
qt4? ( dev-qt/qtcore:4= dev-qt/qtgui:4= )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
src_prepare() {
rm -r libusbx-1.0 || die
cd "${S}/heimdall" || die
edos2unix configure.ac Makefile.am || die
sed -i -e /sudo/d Makefile.am || die
eautoreconf
}
src_configure() {
cd "${S}/libpit" || die
econf
cd "${S}/heimdall" || die
econf
if use qt4; then
cd "${S}/heimdall-frontend" || die
eqmake4 heimdall-frontend.pro OUTPUTDIR=/usr/bin || die
fi
}
src_compile() {
emake -C libpit
emake -C heimdall
use qt4 && emake -C heimdall-frontend
}
src_install() {
emake -C heimdall DESTDIR="${D}" udevrulesdir="$(get_udevdir)/rules.d" install
dodoc Linux/README
use qt4 && emake -C heimdall-frontend INSTALL_ROOT="${D}" install
}