net-misc/ubridge: New package
authorThomas Deutschmann <whissi@gentoo.org>
Sat, 3 Mar 2018 02:06:34 +0000 (03:06 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Sat, 3 Mar 2018 02:07:21 +0000 (03:07 +0100)
Closes: https://bugs.gentoo.org/642070
Package-Manager: Portage-2.3.24, Repoman-2.3.6

net-misc/ubridge/Manifest [new file with mode: 0644]
net-misc/ubridge/metadata.xml [new file with mode: 0644]
net-misc/ubridge/ubridge-0.9.14.ebuild [new file with mode: 0644]

diff --git a/net-misc/ubridge/Manifest b/net-misc/ubridge/Manifest
new file mode 100644 (file)
index 0000000..9af6c7d
--- /dev/null
@@ -0,0 +1 @@
+DIST ubridge-0.9.14.tar.gz 63492 BLAKE2B 4c19bb79c264c9bec2ca39fea8b386817f6eb41d23b35f9fbd0a1407b45398ad5362bd76cbb81597438367a2af8d80308f13d3e8faa4e75c6173bbeb23da177d SHA512 7e92ca6ee8dd5815991c5d157278487cfad69710f0a63fc217d5d0e61678d272bf5a0d31b6afe25b1060df1ad13e229f1d573c03fecb1453167a9ff364283a5f
diff --git a/net-misc/ubridge/metadata.xml b/net-misc/ubridge/metadata.xml
new file mode 100644 (file)
index 0000000..3a39499
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+       <!-- maintainer-needed -->
+       <upstream>
+               <bugs-to>https://github.com/GNS3/ubridge/issues</bugs-to>
+               <remote-id type="github">GNS3/ubridge</remote-id>
+       </upstream>
+</pkgmetadata>
diff --git a/net-misc/ubridge/ubridge-0.9.14.ebuild b/net-misc/ubridge/ubridge-0.9.14.ebuild
new file mode 100644 (file)
index 0000000..2b8f85f
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit fcaps user
+
+DESCRIPTION="Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces."
+HOMEPAGE="https://github.com/GNS3/ubridge"
+SRC_URI="https://github.com/GNS3/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+
+DEPEND="net-libs/libpcap:="
+
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+       enewgroup ubridge
+}
+
+src_prepare() {
+       default
+
+       sed -i -e "s/CFLAGS  =/CFLAGS  ?=/g" Makefile || die "Failed to fix Makefile"
+}
+
+src_install() {
+       insinto /usr/bin
+       insopts -m 750 -g ubridge
+       doins ubridge
+       dodoc README.rst
+}
+
+pkg_postinst() {
+       fcaps -g ubridge -m 4710 -M 0710 cap_net_raw,cap_net_admin \
+               "${EROOT%/}"/usr/bin/ubridge
+
+       ewarn "NOTE: To read packets from the network interfaces with ubridge as"
+       ewarn "normal user you have to add the appropriate user to the ubridge group."
+}