|
| 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 | + logmust dpkg_buildpackage_default |
| 59 | +} |
| 60 | + |
| 61 | +# |
| 62 | +# Hook to fetch upstream package changes and merge into our tree. |
| 63 | +# (Optional function, only applies to third-party packages) |
| 64 | +# |
| 65 | +function update_upstream() { |
| 66 | + # |
| 67 | + # Useful helper functions: |
| 68 | + # |
| 69 | + #logmust update_upstream_from_source_package |
| 70 | + #logmust update_upstream_from_git |
| 71 | + echo 'update_upstream() - insert code here' |
| 72 | +} |
0 commit comments