Skip to content

Commit 80e6237

Browse files
committed
Adding bpfcc package
1 parent e9b4da8 commit 80e6237

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

packages/bpfcc-tools/config.sh

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright 2026 Delphix
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
# shellcheck disable=SC2034
18+
19+
#
20+
# This file is a reference config.sh to use when adding a new package.
21+
#
22+
23+
#
24+
# Git URL for where your package is to be found
25+
#
26+
# DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/bcc.git"
27+
DEFAULT_PACKAGE_GIT_URL="https://github.com/tonynguien/bcc.git" # for development
28+
29+
#
30+
# If you are adding a third-package from an upstream git project, uncomment
31+
# and fill the two lines below.
32+
#
33+
UPSTREAM_GIT_URL=https://github.com/iovisor/bcc.git
34+
UPSTREAM_GIT_BRANCH=master
35+
36+
#
37+
# If you are adding a third-party package based on an existing Ubuntu package,
38+
# find the source package and fill the line below. Hint: the source package
39+
# name is either the same as the package or will appear under "Source:" when
40+
# running "apt show <package>"
41+
#
42+
#UPSTREAM_SOURCE_PACKAGE=
43+
44+
#
45+
# Install build dependencies for the package.
46+
# (Optional function)
47+
#
48+
function prepare() {
49+
echo 'Install build dependencies'
50+
logmust install_build_deps_from_control_file
51+
}
52+
53+
#
54+
# Build the package.
55+
# (Mandatory function)
56+
#
57+
function build() {
58+
echo "Remove bcc-lua before building"
59+
logmust grep -RIl "usr/bin/bcc-lua" workdir/repo/debian | xargs -r rm -f
60+
logmust dpkg_buildpackage_default
61+
}
62+
63+
#
64+
# Hook to fetch upstream package changes and merge into our tree.
65+
# (Optional function, only applies to third-party packages)
66+
#
67+
function update_upstream() {
68+
#
69+
# Useful helper functions:
70+
#
71+
#logmust update_upstream_from_source_package
72+
#logmust update_upstream_from_git
73+
echo 'update_upstream() - insert code here'
74+
}

0 commit comments

Comments
 (0)