]>
Commit | Line | Data |
---|---|---|
85fe4023 JB |
1 | Summary: Libbpf library |
2 | Summary(pl.UTF-8): Biblioteka libbpf | |
3 | Name: libbpf | |
4 | Version: 0.0.8 | |
5 | Release: 1 | |
6 | License: LGPL v2.1 or BSD | |
7 | Group: Libraries | |
8 | #Source0Download: https://github.com/libbpf/libbpf/releases | |
9 | Source0: https://github.com/libbpf/libbpf/archive/v%{version}/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: d66f6f70caa0456eb93e626113c4b8c0 | |
11 | URL: https://github.com/libbpf/libbpf | |
12 | BuildRequires: elfutils-devel | |
13 | BuildRequires: linux-libc-headers >= 7:5.4.0 | |
14 | BuildRequires: pkgconfig | |
15 | BuildRequires: zlib-devel | |
16 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
17 | ||
18 | %description | |
19 | A mirror of bpf-next Linux tree bpf-next/tools/lib/bpf directory plus | |
20 | its supporting header files. The version of the package reflects the | |
21 | version of ABI. | |
22 | ||
23 | %description -l pl.UTF-8 | |
24 | Kopia lustrzana katalogu bpf-next/tools/lib/bpf ze źródeł Linuksa, z | |
25 | drzewka bpf-next wraz ze wspierającymi plikami nagłówkowymi. Wersja | |
26 | pakietu odzwierciedla wersję ABI. | |
27 | ||
28 | %package devel | |
29 | Summary: Development files for libbpf library | |
30 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbpf | |
31 | Group: Development/Libraries | |
32 | Requires: %{name} = %{version}-%{release} | |
33 | Requires: elfutils-devel | |
34 | Requires: linux-libc-headers >= 7:5.4.0 | |
35 | Requires: zlib-devel | |
36 | ||
37 | %description devel | |
38 | This package contains header files for developing applications that | |
39 | use libbpf. | |
40 | ||
41 | %description devel -l pl.UTF-8 | |
42 | Ten pakiet zawiera pliki nagłówkowe do tworzenia aplikacji | |
43 | wykorzystujących libbpf. | |
44 | ||
45 | %package static | |
46 | Summary: Static libbpf library | |
47 | Summary(pl.UTF-8): Statyczna biblioteka libbpf | |
48 | Group: Development/Libraries | |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
52 | This package contains static library for developing applications that | |
53 | use libbpf. | |
54 | ||
55 | %description static -l pl.UTF-8 | |
56 | Ten pakiet zawiera bibliotekę statyczną do tworzenia aplikacji | |
57 | wykorzystujących libbpf. | |
58 | ||
59 | %prep | |
60 | %setup -q | |
61 | ||
62 | %build | |
63 | # use NO_PKG_CONFIG to link with -lelf -lz, not $(pkg-config --libs libelf) which doesn't contain -lz | |
64 | %{__make} -C src \ | |
65 | CC="%{__cc}" \ | |
66 | CFLAGS="%{rpmcflags} %{rpmcppflags} -fPIC" \ | |
67 | LDFLAGS="%{rpmldflags}" \ | |
68 | NO_PKG_CONFIG=1 | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
72 | ||
73 | %{__make} -C src install \ | |
74 | DESTDIR=$RPM_BUILD_ROOT \ | |
75 | LIBSUBDIR=%{_lib} | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
a1addb93 JB |
80 | %post -p /sbin/ldconfig |
81 | %postun -p /sbin/ldconfig | |
82 | ||
85fe4023 JB |
83 | %files |
84 | %defattr(644,root,root,755) | |
85 | %doc LICENSE LICENSE.BSD-2-Clause README.md | |
86 | %attr(755,root,root) %{_libdir}/libbpf.so.%{version} | |
87 | %attr(755,root,root) %ghost %{_libdir}/libbpf.so.0 | |
88 | ||
89 | %files devel | |
90 | %defattr(644,root,root,755) | |
91 | %attr(755,root,root) %{_libdir}/libbpf.so | |
92 | %{_includedir}/bpf | |
93 | %{_pkgconfigdir}/libbpf.pc | |
94 | ||
95 | %files static | |
96 | %defattr(644,root,root,755) | |
97 | %{_libdir}/libbpf.a |