diff --git a/libkefir-0.1.0.tar.gz b/libkefir-0.1.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a62c9db0fdbaca7823adb6e84f739cccd3310a7b Binary files /dev/null and b/libkefir-0.1.0.tar.gz differ diff --git a/libkefir.spec b/libkefir.spec new file mode 100644 index 0000000000000000000000000000000000000000..19f4d57947111347c77da0e4b3dfbc47472ef48e --- /dev/null +++ b/libkefir.spec @@ -0,0 +1,72 @@ +%global githubname libkefir +%global githubver 0.1.0 +%global githubfull %{githubname}-%{githubver} + +Name: %{githubname} +Version: %{githubver} +Release: 1 +Summary: Libkefir library + +License: BSD 2-Clause +URL: https://github.com/%{githubname}/%{githubname} +Source: %{githubfull}.tar.gz +BuildRequires: gcc elfutils-devel libbpf-static + +# This package supersedes libkefir from kernel-tools, +# which has default Epoch: 0. By having Epoch: 1 +# this libkefir will take over smoothly +Epoch: 2 + +%description +Libkefir is a C library designed to turn sets of simple network +filtering rules into BPF programs, and to load and attach them +to the Linux kernel. + +%package devel +Summary: Development files for %{name} +Requires: %{name} = 2:%{version}-%{release} +Requires: kernel >= 4.18 + +%description devel +The %{name}-devel package contains libkefir header files for +developing applications that use %{name} + +%package static +Summary: Static library for libkefir development +Requires: %{name}-devel = 2:%{version}-%{release} + +%description static +The %{name}-static package contains static library for +developing applications that use %{name} + +%global make_flags DESTDIR=%{buildroot} OBJDIR=%{_builddir} CFLAGS=%{build_cflags} LIBDIR=%{_libdir} + +%prep +%autosetup -n %{githubfull} + +%build +%make_build + +%check +make run_test + +%install +%make_install + +%files +%{_libdir}/libkefir.so.0.1.0 +%{_libdir}/libkefir.so.0 + +%files devel +%{_libdir}/libkefir.so +%{_includedir}/ +%{_libdir}/pkgconfig/libkefir.pc + +%files static +%{_libdir}/libkefir.a + +%changelog + +* Thu Sep 23 2021 yangchenguang - 0.1.0-1 +- Package init +