Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
New package: bpftool
Browse files Browse the repository at this point in the history
  • Loading branch information
alban committed Apr 17, 2019
1 parent 9224ada commit b02bf3f
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions sys-apps/bpftool/Manifest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST bpftool-9999.tar.gz 166195873 BLAKE2B 54622adcc0d42a24a58731646f80c003d990991f845b99007b5ce7f9fbc1e08e121894df732794f8f2dd7fe31edcd52d42065ae0d9e31289ffe65a83d2360caf SHA512 7bba2a6af5057dd339e54fb7681b81fbf175c6ed891205b39b99fb0452f318dda1e60ea8f896941442bf302e527bf25880179ece6803c9dfd36dd3655cbbd3f8
36 changes: 36 additions & 0 deletions sys-apps/bpftool/bpftool-9999.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

GITHUB_URI="github.com/kinvolk/linux"
# branch alban/bpftool-all
COMMIT_ID="98bb39c62ce2fda505265644f4ba33ab9584d452"

inherit eutils flag-o-matic coreos-go-depend vcs-snapshot

DESCRIPTION="bpftool"
HOMEPAGE="http://github.com/kinvolk/bpftool"

SRC_URI="https://github.com/kinvolk/linux/archive/${COMMIT_ID}.tar.gz -> ${P}.tar.gz"
KEYWORDS="amd64 arm64"

LICENSE="GPL-2"
SLOT="0"
IUSE=""

DEPEND=""
RDEPEND=""

src_compile() {
cd tools/bpf/bpftool/ && \
sed -i '/CFLAGS += -O2/a CFLAGS += -static' Makefile && \
sed -i 's/LIBS = -lelf $(LIBBPF)/LIBS = -lelf -lz $(LIBBPF)/g' Makefile && \
printf 'feature-libbfd=0\nfeature-libelf=1\nfeature-bpf=1\nfeature-libelf-mmap=1' >> FEATURES_DUMP.bpftool && \
FEATURES_DUMP=`pwd`/FEATURES_DUMP.bpftool make -j `getconf _NPROCESSORS_ONLN`
}

src_install() {
dobin tools/bpf/bpftool/bpftool
}
16 changes: 16 additions & 0 deletions sys-apps/bpftool/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<longdescription lang="en">
bpftool, tool for inspection and simple manipulation of eBPF programs and maps
</longdescription>
<maintainer type="person">
<email>alban@kinvolk.io</email>
<name>Alban Crequy</name>
</maintainer>
<use>
</use>
<upstream>
<remote-id type="github">torvalds/linux</remote-id>
</upstream>
</pkgmetadata>

0 comments on commit b02bf3f

Please sign in to comment.