diff options
author | 2019-09-03 17:00:01 +0200 | |
---|---|---|
committer | 2019-09-03 17:00:01 +0200 | |
commit | 67f78a6bee38a23d748e7326d2dd7127c7572b7c (patch) | |
tree | 1aa1a168b8f706f70ffddc1f0fc83791a267549f | |
parent | updated ebuild Manifests to BLAKE2b. (diff) | |
download | darkelf-67f78a6bee38a23d748e7326d2dd7127c7572b7c.tar.gz darkelf-67f78a6bee38a23d748e7326d2dd7127c7572b7c.tar.bz2 darkelf-67f78a6bee38a23d748e7326d2dd7127c7572b7c.zip |
added net-dialup/simple-rt.
Signed-off-by: Simon the Sorcerer <neuron@mail.uni-paderborn.de>
-rw-r--r-- | net-dialup/simple-rt/Manifest | 4 | ||||
-rw-r--r-- | net-dialup/simple-rt/files/simple-rt-1.2.2-un_install.patch | 76 | ||||
-rw-r--r-- | net-dialup/simple-rt/metadata.xml | 9 | ||||
-rw-r--r-- | net-dialup/simple-rt/simple-rt-1.2.2.ebuild | 51 |
4 files changed, 140 insertions, 0 deletions
diff --git a/net-dialup/simple-rt/Manifest b/net-dialup/simple-rt/Manifest new file mode 100644 index 0000000..b2202d7 --- /dev/null +++ b/net-dialup/simple-rt/Manifest @@ -0,0 +1,4 @@ +AUX simple-rt-1.2.2-un_install.patch 2279 BLAKE2B 27b90e12fe8ce4845d8ff6b707dbb3009d2f362bddce2007cec57d3886ff0815952210761a0c73b53f3e90c9e34f2120e463ce398addd8c55c1af61f2bcbf945 SHA512 7cc3b41909eb5335e21776168b4079321bb87558104c3a64d8d6b0edd6cd6f2f93e1f20e7424e21f7e44351fe2d56cd957ae26035b6e1cfc0bf61a5d6a6f79cd +DIST simple-rt-1.2.2.tgz 2078402 BLAKE2B 47481b8ee095314bc749109abec8e4b685221bbb34e0aa6d9f0cd8958c11238d901c846e1f46b1c597c73552e34d9d53d4ee0da35e48b72dfcef5f1cab0b75cb SHA512 73586d499e98fd9b20ad9ec363e082c9f7b2e4cdd703996219d10e12ac028b41a7c098dac6754e3dadd2266b3e17467363e6dc296e0e4a720997ecaedea3f77b +EBUILD simple-rt-1.2.2.ebuild 1067 BLAKE2B 2e37205f985c5fd0eb14d7602919606c2a3604e1238ee2b38431b2285ed5b8ecedab02d13bcc8e309773495b83732377315f603f807b8e38a453e02213ba315f SHA512 5e0695169ba820c15ecc197f80b3daafb1f8a44e4045dc0466eecd60cdfdba1a04d649736b58d3795862ab4509b6ec84c178bf970c7cc345b2f1844aa0728f47 +MISC metadata.xml 405 BLAKE2B ec54ccbdac327bf69a340a57d789ee83bc4d506b65da6db6f5c5a15c7ed08d6e84c98f630de59b8e6478f9bf66529bee58186c47fde7002202e46bbaf45babdf SHA512 e39e022ddf289f45f9edcf185204a1caf96a4b3dff0aa2e03c6832fd3789c62789fde9d07204bc6fdc85820569509d910d4e7a32d11b0f0b669d7afac92507b2 diff --git a/net-dialup/simple-rt/files/simple-rt-1.2.2-un_install.patch b/net-dialup/simple-rt/files/simple-rt-1.2.2-un_install.patch new file mode 100644 index 0000000..f115609 --- /dev/null +++ b/net-dialup/simple-rt/files/simple-rt-1.2.2-un_install.patch @@ -0,0 +1,76 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2017-10-11 19:27:34.000000000 +0200 ++++ b/Makefile 2019-09-03 16:43:45.930017878 +0200 +@@ -16,14 +16,21 @@ + + TARGET = simple-rt + ++prefix = /usr/local ++exec_prefix = $(prefix) ++sbindir = $(exec_prefix)/sbin ++libexecdir = $(exec_prefix)/libexec ++ ++iface_up_sh_path = $(libexecdir)/simple-rt ++ + CC ?= gcc + LDFLAGS = -lm -lpthread -lresolv +-CFLAGS = -g -std=c11 -D_DEFAULT_SOURCE -Wall -pedantic -Iinclude ++CFLAGS = -g -std=c11 -D_DEFAULT_SOURCE -DIFACE_UP_SH_PATH=\"$(iface_up_sh_path)/iface_up.sh\" -Wall -pedantic -Iinclude + + CFLAGS += `pkg-config --cflags libusb-1.0` + LDFLAGS += `pkg-config --libs libusb-1.0` + +-.PHONY: default all clean ++.PHONY: default all clean install uninstall + + default: $(TARGET) + all: default +@@ -49,6 +56,12 @@ + OBJECTS = $(patsubst %.c, $(OBJ)/%.o, $(wildcard $(SOURCES)/*.c $(UNIX_SRC)/*.c $(PLATFORM_SRC)/*.c)) + HEADERS = $(wildcard include/*.h) + ++$(OBJ)/$(SOURCES)/network.o: $(SOURCES)/network.c $(HEADERS) ++ echo Compiling $< setting iface_up_sh_path in config.mk to $(iface_up_sh_path). ++ echo iface_up_sh_path=$(iface_up_sh_path) > config.mk ++ @mkdir -p `dirname $@` ++ $(CC) $(CFLAGS) -c $< -o $@ ++ + $(OBJ)/%.o: %.c $(HEADERS) + @mkdir -p `dirname $@` + $(CC) $(CFLAGS) -c $< -o $@ +@@ -61,3 +74,21 @@ + clean: + -rm -rf $(OBJ) + -rm -f $(TARGET) ++ -rm -f config.mk ++ -rm -f config.status ++ ++-include config.mk ++ ++install: simple-rt ++ echo iface_up_sh_path is $(iface_up_sh_path) ++ mkdir -p $(DESTDIR)$(sbindir) ++ mkdir -p $(DESTDIR)$(iface_up_sh_path) ++ cp $< $(DESTDIR)$(sbindir) ++ cp iface_up.sh $(DESTDIR)$(iface_up_sh_path)/iface_up.sh ++ echo "SimpleRT installed, make sure $(DESTDIR)$(sbindir)/ is in your PATH-variable." ++ ++uninstall: ++ rm -f $(DESTDIR)$(sbindir)/simple-rt ++ rm -f $(DESTDIR)$(iface_up_sh_path)/iface_up.sh ++ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(iface_up_sh_path) ++ +diff -Naur a/src/network.c b/src/network.c +--- a/src/network.c 2017-10-11 19:27:34.000000000 +0200 ++++ b/src/network.c 2019-09-03 16:28:53.583348099 +0200 +@@ -48,7 +48,9 @@ + #define ACC_ID_FROM_ADDR(addr) \ + ((addr) & 0xff) + +-#define IFACE_UP_SH_PATH "./iface_up.sh" ++#ifndef IFACE_UP_SH_PATH ++ #define IFACE_UP_SH_PATH "./iface_up.sh" ++#endif + + /* tun stuff */ + static int g_tun_fd = 0; diff --git a/net-dialup/simple-rt/metadata.xml b/net-dialup/simple-rt/metadata.xml new file mode 100644 index 0000000..747e9bf --- /dev/null +++ b/net-dialup/simple-rt/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>neuron@mail.uni-paderborn.de</email> + <description>Primary maintainer</description> +</maintainer> +<longdescription>Allows you to share your computer's internet connection with your Android device via a USB cable.</longdescription> +</pkgmetadata> diff --git a/net-dialup/simple-rt/simple-rt-1.2.2.ebuild b/net-dialup/simple-rt/simple-rt-1.2.2.ebuild new file mode 100644 index 0000000..7ac0807 --- /dev/null +++ b/net-dialup/simple-rt/simple-rt-1.2.2.ebuild @@ -0,0 +1,51 @@ +#generated by emake-0.3.3 + +EAPI=6 + +DESCRIPTION="Simple Reverse Tethering utility for Android" +HOMEPAGE="https://github.com/iteratec/SimpleRT" + +SRC_URI="https://github.com/iteratec/SimpleRT/archive/1.2.2.tar.gz -> simple-rt-1.2.2.tgz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 ~x86 ~arm" +IUSE="" + +RDEPEND="" +DEPEND=" + ${RDEPEND} +" + +S=${WORKDIR}/SimpleRT-1.2.2/simple-rt-cli/ + +PATCHES=( + "${FILESDIR}/${P}-un_install.patch" +) + +src_unpack() { + unpack "simple-rt-1.2.2.tgz" +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake prefix=$EPREFIX//usr || die "emake failed" + fi +} + +src_install() { + if [[ -f "Makefile" ]] || [[ -f "GNUmakefile" ]] || [[ -f "makefile" ]] ; then + emake DESTDIR="${D}" prefix=${EPREFIX}//usr install + fi + + if ! declare -p DOCS >/dev/null 2>&1 ; then + local d + for d in README* ChangeLog AUTHORS NEWS TODO CHANGES THANKS BUGS FAQ CREDITS CHANGELOG ; do + [[ -s "${d}" ]] && dodoc "${d}" + done + elif $(declare -p DOCS | grep -q "^declare -a ") ; then + dodoc "${DOCS[@]}" + else + dodoc ${DOCS} + fi +} |