diff --git a/README.md b/README.md deleted file mode 100644 index 7342728d557c602f51c6d278bba9f3dd9faaf356..0000000000000000000000000000000000000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Anolis OS -======================================= -# 代码仓库说明 -## 分支说明 ->进行代码开发工作时,请注意选择当前版本对应的分支 -* aX分支为对应大版本的主分支,如a8分支对应当前最新版本 -* aX.Y分支为对应小版本的维护分支,如a8.2分支对应8.2版本 -## 开发流程 -1. 首先fork目标分支到自己的namespace -2. 在自己的fork分支上做出修改 -3. 向对应的仓库中提交merge request,源分支为fork分支 diff --git a/libbpf.spec b/libbpf.spec new file mode 100644 index 0000000000000000000000000000000000000000..3e059cca49ee118438ef871fbf8a1049bc9d9099 --- /dev/null +++ b/libbpf.spec @@ -0,0 +1,74 @@ +%define anolis_release 1 +%global githubname libbpf +%global githubver 0.7.0 +%global githubfull %{githubname}-%{githubver} +%global libver 0.7.0 + +Name: %{githubname} +Version: %{githubver} +Release: %{anolis_release}%{?dist} +Summary: Libbpf library + +License: LGPLv2 or BSD +URL: https://github.com/%{githubname}/%{githubname} +Source: https://github.com/%{githubname}/%{githubname}/archive/v%{githubver}.tar.gz +BuildRequires: gcc elfutils-libelf-devel elfutils-devel +BuildRequires: make + +# This package supersedes libbpf from kernel-tools, +# which has default Epoch: 0. By having Epoch: > 0 +# this libbpf will take over smoothly +Epoch: 2 + +%description +A mirror of bpf-next linux tree bpf-next/tools/lib/bpf directory plus its +supporting header files. The version of the package reflects the version of +ABI. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = 2:%{version}-%{release} +Requires: kernel-headers >= 5.16.0 +Requires: zlib + +%description devel +The %{name}-devel package contains libraries header files for +developing applications that use %{name} + +%package static +Summary: Static library for libbpf development +Requires: %{name}-devel = 2:%{version}-%{release} + +%description static +The %{name}-static package contains static library for +developing applications that use %{name} + +%define _lto_cflags %{nil} +%undefine _package_note_file + +%global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS="%{build_cflags} -fPIC" LDFLAGS="%{build_ldflags} -Wl,--no-as-needed" LIBDIR=/%{_libdir} NO_PKG_CONFIG=1 + +%prep +%autosetup -n %{githubfull} + +%build +%make_build -C ./src %{make_flags} + +%install +%make_install -C ./src %{make_flags} + +%files +%{_libdir}/libbpf.so.%{libver} +%{_libdir}/libbpf.so.0 + +%files devel +%{_libdir}/libbpf.so +%{_includedir}/bpf/ +%{_libdir}/pkgconfig/libbpf.pc + +%files static +%{_libdir}/libbpf.a + +%changelog +* Wed Mar 09 2022 Renbo - 0.7.0-1 +- Init for Anolis OS 23 diff --git a/v0.7.0.tar.gz b/v0.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..f89a9622912e37301eaa901e2524f5c3525dace9 Binary files /dev/null and b/v0.7.0.tar.gz differ