2 # Copyright (C) 2020-2023 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
16 PKG_SOURCE_VERSION
:=fbd60dbff51c870f5e80a17c4f2fd639eb80af90
17 PKG_MIRROR_HASH
:=80a80dfba71576e017b596fb28068e2a92de629e426f063e4b37314c8d576336
18 PKG_ABI_VERSION
:=$(firstword $(subst .
,$(space
),$(PKG_VERSION
)))
20 PKG_MAINTAINER
:=Tony Ambardar
<itugrok@yahoo.com
>
22 PKG_BUILD_FLAGS
:=no-mips16
26 include $(INCLUDE_DIR
)/package.mk
27 include $(INCLUDE_DIR
)/nls.mk
32 TITLE
:=libbpf
- eBPF helper library
33 LICENSE
:=LGPL-2.1 OR BSD-2-Clause
34 ABI_VERSION
:=$(PKG_ABI_VERSION
)
35 URL
:=http
://www.kernel.org
39 define Package
/libbpf
/description
40 libbpf is a library for loading eBPF programs and reading and manipulating eBPF objects from user-space.
44 EXTRA_CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
45 LDFLAGS
="$(TARGET_LDFLAGS)"
48 $(if
$(findstring c
,$(OPENWRT_VERBOSE
)),V
=1,V
='') \
53 define Build
/InstallDev
/libbpf
54 $(INSTALL_DIR
) $(1)/usr
/include/bpf
55 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/bpf
/*.h
$(1)/usr
/include/bpf
/
56 $(INSTALL_DIR
) $(1)/usr
/lib
57 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbpf.
{a
,so
*} \
59 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
60 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libbpf.
pc \
61 $(1)/usr
/lib
/pkgconfig
/
62 $(SED
) 's,/usr/include,$$$${prefix}/include,g' \
63 $(1)/usr
/lib
/pkgconfig
/libbpf.
pc
64 $(SED
) 's,/usr/lib,$$$${exec_prefix}/lib,g' \
65 $(1)/usr
/lib
/pkgconfig
/libbpf.
pc
68 Build
/InstallDev
=$(Build
/InstallDev
/libbpf
)
70 define Package
/libbpf
/install
71 $(INSTALL_DIR
) $(1)/usr
/lib
72 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbpf.so.
* $(1)/usr
/lib
/
75 $(eval
$(call BuildPackage
,libbpf
))