Files
bpfire/lfs/bcc
Vincent Li 8c8be5e746 bcc: add bcc libbcc for bpftrace
bpftrace depends on libbcc, so add bcc in build.
bcc build depends on zip, but loongfire does not
have zip

workaround:

copy loongson host Fedora zip command to chroot build
cp /usr/bin/zip to build_loongarch64/usr/bin

Fedora zip depends on libbz2.so.1, libbz2 is from bzip2
addon that loongfire already has, so make symbolic link

cd build_loongarch64/lib64; ln -s libbz2.so.1.0.8 libbz2.so.1

we should build zip addon for loongfire but zip has build error
need to resolve zip build error as long term solution

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-17 17:31:27 -07:00

80 lines
3.2 KiB
Plaintext

###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2023 IPFire Team <info@ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation, either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
# #
###############################################################################
###############################################################################
# Definitions
###############################################################################
include Config
VER = 0.34.0
THISAPP = bcc-$(VER)
DL_FILE = $(THISAPP).tar.gz
DL_FROM = $(URL_IPFIRE)
DIR_APP = $(DIR_SRC)/$(THISAPP)
TARGET = $(DIR_INFO)/$(THISAPP)
###############################################################################
# Top-level Rules
###############################################################################
objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
$(DL_FILE)_BLAKE2 = 30a50cfdc47558dea19cd43b4fb6f17466039e7c76ce8bfe30c83d8b670b1b5fd64f35d1c3d188cc2438e713f8c8fff75dbc6cd92940d28a5aec3ca2e78ab0b9
install : $(TARGET)
check : $(patsubst %,$(DIR_CHK)/%,$(objects))
download :$(patsubst %,$(DIR_DL)/%,$(objects))
b2 : $(subst %,%_BLAKE2,$(objects))
###############################################################################
# Downloading, checking, b2sum
###############################################################################
$(patsubst %,$(DIR_CHK)/%,$(objects)) :
@$(CHECK)
$(patsubst %,$(DIR_DL)/%,$(objects)) :
@$(LOAD)
$(subst %,%_BLAKE2,$(objects)) :
@$(B2SUM)
###############################################################################
# Installation Details
###############################################################################
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP)/ && mkdir bcc-build
cd $(DIR_APP)/bcc-build && cmake .. -DCMAKE_INSTALL_PREFIX=/usr
cd $(DIR_APP)/bcc-build && make $(MAKETUNING)
cd $(DIR_APP)/bcc-build && make install
@rm -rf $(DIR_APP)
@$(POSTBUILD)