2 # Copyright (C) 2020-2024 Tony Ambardar <itugrok@yahoo.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=https
://github.com
/libbpf
/libbpf
15 PKG_MIRROR_HASH
:=46469f720ed246529e46d84a6444ae1c1a1eaf2a717a5a055c9973bb52159ec3
17 PKG_SOURCE_VERSION
:=v1.4
.1
18 PKG_ABI_VERSION
:=$(firstword $(subst .
,$(space
),$(PKG_VERSION
)))
20 PKG_MAINTAINER
:=Tony Ambardar
<itugrok@yahoo.com
>
21 PKG_CPE_ID
:=cpe
:/a
:libbpf_project
:libbpf
23 PKG_BUILD_FLAGS
:=no-mips16 no-gc-sections no-lto
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/nls.mk
33 TITLE
:=libbpf
- eBPF helper library
34 LICENSE
:=LGPL-2.1 OR BSD-2-Clause
35 ABI_VERSION
:=$(PKG_ABI_VERSION
)
36 URL
:=http
://www.kernel.org
40 define Package
/libbpf
/description
41 libbpf is a library for loading eBPF programs and reading and manipulating eBPF objects from user-space.
45 $(if
$(findstring c
,$(OPENWRT_VERBOSE
)),V
=1,V
='') \
50 define Build
/InstallDev
/libbpf
51 $(INSTALL_DIR
) $(1)/usr
/include/bpf
52 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/bpf
/*.h
$(1)/usr
/include/bpf
/
53 $(INSTALL_DIR
) $(1)/usr
/lib
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbpf.
{a
,so
*} \
56 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libbpf.
pc \
58 $(1)/usr
/lib
/pkgconfig
/
59 $(SED
) 's,/usr/include,$$$${prefix}/include,g' \
60 $(1)/usr
/lib
/pkgconfig
/libbpf.
pc
61 $(SED
) 's,/usr/lib,$$$${exec_prefix}/lib,g' \
62 $(1)/usr
/lib
/pkgconfig
/libbpf.
pc
65 Build
/InstallDev
=$(Build
/InstallDev
/libbpf
)
67 define Package
/libbpf
/install
68 $(INSTALL_DIR
) $(1)/usr
/lib
69 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbpf.so.
* $(1)/usr
/lib
/
72 $(eval
$(call BuildPackage
,libbpf
))