summaryrefslogtreecommitdiff
path: root/flx/init/init-0.1.35.ebuild
blob: 23e9a750d578327516a7770a03fa299397154750 (plain) (blame)
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
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7
inherit git-r3 flag-o-matic toolchain-funcs

DESCRIPTION="Formilux Tools"
HOMEPAGE="http://git.formilux.org/?p=dist/src/flxutils.git"
EGIT_REPO_URI="http://master.formilux.org/git/dist/src/flxutils.git"
EGIT_COMMIT="v${PV}"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 mips x86"
IUSE="debug static symlink"

PATCHES=(
	"${FILESDIR}/${PV}-init-fix-a-major-bug-in-interactive-mode.patch"
	"${FILESDIR}/${PV}-MEDIUM-Remove-strip-and-uclibc.patch"
	"${FILESDIR}/${PV}-MEDIUM-Respect-CFLAGS-and-LDFLAGS.patch"
	"${FILESDIR}/${PV}-init-implicit-declaration-of-makedev.patch"
)

src_prepare () {
	default

	tc-export CC
}

src_compile () {
	use debug  && append-cflags -DDEBUG -DI_AM_REALLY_DEBUGGING
	use static && append-ldflags -static

	append-cflags -D_GNU_SOURCE

	emake -C init
	mv init/init init/flx-init
}

src_install () {
	into /
	dosbin init/flx-init
	use symlink \
		&& dosym /sbin/flx-init /init

	dodoc init/README{,.2} init/test.cfg
	dodoc -r init/examples
}