summaryrefslogtreecommitdiff
blob: 51efe0cd19d728c9480aa62b2cb70da19dfb5fe0 (plain)
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
# Copyright 2019-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit systemd toolchain-funcs

DESCRIPTION="A network-backed floppy emulator for DOS"
HOMEPAGE="http://ethflop.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
S="${WORKDIR}"

LICENSE="ISC"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="tsr"

BDEPEND="
	app-arch/unzip
	tsr? ( dev-lang/nasm )
"

PATCHES=( "${FILESDIR}/${P}-makefile.patch" )

src_compile() {
	tc-export CC
	default

	use tsr && emake tsr
}

src_install() {
	dobin ethflopd

	if use tsr; then
		insinto /usr/share/ethflop
		doins ethflop.com
	fi

	newinitd "${FILESDIR}"/ethflopd.initd ethflopd
	newconfd "${FILESDIR}"/ethflopd.confd ethflopd
	systemd_newunit "${FILESDIR}"/ethflopd.service-r1 ethflopd.service

	dodoc ethflop.txt
}