opensnitch-1.3.5.ebuild

This commit is contained in:
blshkv 2021-01-14 18:16:23 +08:00
parent 17d31da2fe
commit d6e1f421b9
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
2 changed files with 82 additions and 0 deletions

View file

@ -12,3 +12,4 @@ DIST github.com-grpc-grpc-go-v1.11.3.tar.gz 414427 BLAKE2B 5c6bada923f01c82208fc
DIST github.com-vishvananda-netlink-v1.1.0.tar.gz 147026 BLAKE2B 146936d2a959f1a9509e94a50dfd36a1bee9599d158d41a29ac65d305520f85def91df78b6c7b5475915e7aef11b150de6aefd7e2fd8856550624281555ef8b0 SHA512 55f184870a9ce85314d278722f49e0c2f51939841f37aee8f50bb150afa545fd18a9a43556d428fb8e960eb063a14c50c920de20f2a375bd780432cb26155918
DIST github.com-vishvananda-netns-0a2b9b5464df.tar.gz 8008 BLAKE2B ce175a1ffce3ab0a62fccc56836e39c4c90d0df28fb60ca3317a4814fea26f1817e0be8cd424c127ff1060b4a7e28907a9cd65dbd85dbf28a5fe8b010e53368e SHA512 187e10380398f7243624b9725e6166be392bc048b74bdfc3d3c61fcb397b28a16d83f5111fceab6cb79e1045075cba00a48ca15bb5c73127ef26c0f50a05f053
DIST opensnitch-1.3.0.tar.gz 885678 BLAKE2B 87b7eda25f15fbc4199b9a36d0fc1dd19b76b350dba6123c2790dbf09243a851beae9de49cf2c9568acb791830e637f37c001d8e3f15fd20e4675e323051fae1 SHA512 fb540614f8ce6799ed1a9af561bcf302f3778e706f5913206ed978402ee65a5577b1a17c5c2ec1805998606f056c3513b87e997133d03985ffccf00bb52f1176
DIST opensnitch-1.3.5.tar.gz 933473 BLAKE2B 9cffb67e85a5b6e666c576f8af0061ee7b2f8980379db50681e33962929da8ad70df217b7fd28f4e0af486a9f927aca900efbc97241c1345d4491a60a74400ad SHA512 dda1f717c98248db236b2b68698aac04f5d3a51d65ce28b42a8f66a839e33b99e679296eb5afac42d983ca64000835be11a53d859464a1695c5b5b8019705693

View file

@ -0,0 +1,81 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7..8} )
inherit distutils-r1
# go mod vendor && grep "# g" ./vendor/modules.txt | sort
EGO_PN="github.com/evilsocket/opensnitch"
EGO_VENDOR=(
"github.com/evilsocket/ftrace v1.2.0"
"github.com/fsnotify/fsnotify v1.4.7"
"github.com/golang/glog 23def4e6c14b"
"github.com/golang/protobuf v1.0.0"
"github.com/google/gopacket v1.1.14"
"github.com/vishvananda/netlink v1.1.0"
"github.com/vishvananda/netns 0a2b9b5464df"
"golang.org/x/net 8d16fa6dc9a8 github.com/golang/net"
"golang.org/x/sync 6e8e738ad208 github.com/golang/sync"
"golang.org/x/sys 7fc4e5ec1444 github.com/golang/sys"
"golang.org/x/text v0.3.0 github.com/golang/text"
"google.golang.org/genproto 7fd901a49ba6 github.com/googleapis/go-genproto"
"google.golang.org/grpc v1.11.3 github.com/grpc/grpc-go"
)
inherit golang-vcs-snapshot
DESCRIPTION="Desktop application firewall"
HOMEPAGE="https://github.com/evilsocket/opensnitch"
SRC_URI="https://github.com/evilsocket/opensnitch/archive/v${PV}.tar.gz -> ${P}.tar.gz
${EGO_VENDOR_URI}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
RESTRICT="mirror"
# dev-go/go-text:=
DEPEND="
>=dev-lang/go-1.13"
RDEPEND="
dev-python/grpcio-tools[${PYTHON_USEDEP}]
dev-python/python-slugify[${PYTHON_USEDEP}]
dev-python/pyinotify[${PYTHON_USEDEP}]
dev-python/PyQt5[sql,${PYTHON_USEDEP}]
"
#FIXME: add config check:
#CONFIG_NETFILTER_XT_MATCH_CONNTRACK
src_compile() {
GOPATH="${S}:$(get_golibdir_gopath)" \
GOCACHE="${T}/go-cache" \
go build -v -work -x -ldflags="-s -w" "${EGO_PN}/daemon" || die
pushd src/${EGO_PN}/ui >/dev/null || die
distutils-r1_src_compile
popd >/dev/null || die
}
src_install(){
newbin daemon opensnitchd
pushd src/${EGO_PN}/ui >/dev/null || die
distutils-r1_src_install
popd >/dev/null || die
pushd src/${EGO_PN}/daemon >/dev/null || die
insinto /etc/opensnitchd/rules
insinto /etc/opensnitchd/
# @cp opensnitchd.service /etc/systemd/system/
doins default-config.json
doins system-fw.json
popd >/dev/null || die
newinitd "${FILESDIR}"/opensnitch.initd ${PN}
}