net-misc/etherdfs: New package
authorConrad Kostecki <conikost@gentoo.org>
Fri, 27 Dec 2019 01:19:05 +0000 (02:19 +0100)
committerConrad Kostecki <conikost@gentoo.org>
Fri, 27 Dec 2019 14:07:25 +0000 (15:07 +0100)
EtherDFS is an 'installable filesystem' TSR for DOS.
It maps a drive from a remote computer
to a local drive letter, using raw ethernet frames to communicate.

Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
net-misc/etherdfs/Manifest [new file with mode: 0644]
net-misc/etherdfs/etherdfs-20180203.ebuild [new file with mode: 0644]
net-misc/etherdfs/files/etherdfs-20180203-makefile.patch [new file with mode: 0644]
net-misc/etherdfs/files/etherdfs.confd [new file with mode: 0644]
net-misc/etherdfs/files/etherdfs.initd [new file with mode: 0644]
net-misc/etherdfs/files/etherdfs.service [new file with mode: 0644]
net-misc/etherdfs/metadata.xml [new file with mode: 0644]

diff --git a/net-misc/etherdfs/Manifest b/net-misc/etherdfs/Manifest
new file mode 100644 (file)
index 0000000..b4852cf
--- /dev/null
@@ -0,0 +1,2 @@
+DIST etherdfs-20180203.zip 13081 BLAKE2B 53b0d12c272aa8a64a1980b6c4aae8c6789647026590ee948bc4d84be265479a816d8ae4df033a9a8be4038eb10b934b6ee8d188bf88e47c21f2e81123a572f0 SHA512 c254647fb35b7456b08eb27e6bc6b339d65c55ffd28fdc658f54bb1346a94a7056959a6e3e0b1a97add9e7919a224a0cef831ee14fc19219885274c9649a3439
+DIST ethersrv-linux-20180203.tar.xz 18160 BLAKE2B 45293b596489a290146bfb5ec5ca89c06a01bd0377cb29f33f604ac84c3d1d8f18f09058dded28e38f611a19d690c0a190ec38d45498cacd90a4cbff841115e1 SHA512 522f5ce5353c6eabaac2106d43d09cf341a2da96e56ffb06c5b2d705a997986117246cf3cb2b4a4e5b2c6f1caf96dfd68d1ddc56bb6db8140aa3761c7e6e6f7e
diff --git a/net-misc/etherdfs/etherdfs-20180203.ebuild b/net-misc/etherdfs/etherdfs-20180203.ebuild
new file mode 100644 (file)
index 0000000..5a35f39
--- /dev/null
@@ -0,0 +1,53 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+MY_PN="ethersrv-linux"
+MY_PV_TSR="0.8.2"
+MY_P="${MY_PN}-${PV}"
+
+inherit systemd toolchain-funcs
+
+DESCRIPTION="An ethernet-based file system for DOS"
+HOMEPAGE="http://etherdfs.sourceforge.net/"
+SRC_URI="
+       mirror://sourceforge/${PN}/${MY_P}.tar.xz
+       tsr? ( mirror://sourceforge/${PN}/v${MY_PV_TSR}/${PN}.zip -> ${P}.zip )
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="tsr"
+
+BDEPEND="tsr? ( app-arch/unzip )"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${P}-makefile.patch" )
+
+DOCS=( "ethersrv-linux.txt" "history.txt" )
+
+src_compile() {
+       tc-export CC
+
+       default
+}
+
+src_install() {
+       dobin ethersrv-linux
+
+       if use tsr; then
+               insinto /usr/share/etherdfs
+               newins ../ETHERDFS.EXE etherdfs.exe
+
+               DOCS+=( "../ETHERDFS.TXT" "../HISTORY.TXT" )
+       fi
+
+       newinitd "${FILESDIR}"/etherdfs.initd etherdfs
+       newconfd "${FILESDIR}"/etherdfs.confd etherdfs
+       systemd_dounit "${FILESDIR}"/etherdfs.service
+
+       einstalldocs
+}
diff --git a/net-misc/etherdfs/files/etherdfs-20180203-makefile.patch b/net-misc/etherdfs/files/etherdfs-20180203-makefile.patch
new file mode 100644 (file)
index 0000000..1cbf51c
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/Makefile 2018-02-03 21:21:51.518384435 +0100
++++ b/Makefile 2019-12-27 01:23:37.030323263 +0100
+@@ -5,9 +5,9 @@
+ # Copyright (C) 2017, 2018 Mateusz Viste\r
+ #\r
\r
+-CFLAGS = -O2 -Wall -std=gnu89 -pedantic -Wextra -s -Wno-long-long -Wno-variadic-macros -Wformat-security -D_FORTIFY_SOURCE=1\r
++CFLAGS += -Wall -std=gnu89 -pedantic -Wextra -Wno-long-long -Wno-variadic-macros -Wformat-security -D_FORTIFY_SOURCE=1\r
\r
+-CC = gcc\r
++CC ?= gcc\r
\r
+ ethersrv-linux: ethersrv-linux.c fs.c fs.h lock.c lock.h debug.h\r
+       $(CC) ethersrv-linux.c fs.c lock.c -o ethersrv-linux $(CFLAGS)\r
diff --git a/net-misc/etherdfs/files/etherdfs.confd b/net-misc/etherdfs/files/etherdfs.confd
new file mode 100644 (file)
index 0000000..1a5a116
--- /dev/null
@@ -0,0 +1,9 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+# Network interface, which should be used for serving mapped drives
+INTERFACE="lo"
+
+# Storage directories, which are being mapped and served to the client.
+# Multiple directories can be specified, by whitespace separated.
+STORAGEDIR="/tmp"
diff --git a/net-misc/etherdfs/files/etherdfs.initd b/net-misc/etherdfs/files/etherdfs.initd
new file mode 100644 (file)
index 0000000..dd3b0b2
--- /dev/null
@@ -0,0 +1,11 @@
+#!/sbin/openrc-run
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+name="etherdfs daemon"
+command="/usr/bin/ethersrv-linux"
+command_args="${INTERFACE} ${STORAGEDIR}"
+
+depend() {
+       need net
+}
diff --git a/net-misc/etherdfs/files/etherdfs.service b/net-misc/etherdfs/files/etherdfs.service
new file mode 100644 (file)
index 0000000..d5a6ed4
--- /dev/null
@@ -0,0 +1,10 @@
+[Unit]
+Description=etherdfs daemon
+After=network-online.target
+
+[Service]
+EnvironmentFile=/etc/conf.d/etherdfs
+ExecStart=/usr/bin/ethersrv-linux ${INTERFACE} ${STORAGEDIR}
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-misc/etherdfs/metadata.xml b/net-misc/etherdfs/metadata.xml
new file mode 100644 (file)
index 0000000..e9a40ff
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <maintainer type="person">
+               <email>conikost@gentoo.org</email>
+               <name>Conrad Kostecki</name>
+       </maintainer>
+       <longdescription>
+               EtherDFS is an 'installable filesystem' TSR for DOS.
+               It maps a drive from a remote computer
+               to a local drive letter, using raw ethernet frames to communicate.
+       </longdescription>
+       <use>
+               <flag name="tsr">Build the TSR program for DOS, which acts as a client.</flag>
+       </use>
+       <upstream>
+               <remote-id type="sourceforge">etherdfs</remote-id>
+       </upstream>
+</pkgmetadata>