xdp-tools/SPECS/xdp-tools.spec

150 lines
4.1 KiB
RPMSpec
Raw Normal View History

2020-07-28 19:42:20 +00:00
Name: xdp-tools
2021-01-27 00:19:07 +00:00
Version: 1.1.0
2020-08-21 18:33:01 +00:00
Release: 1%{?dist}
2020-07-28 19:42:20 +00:00
Summary: Utilities and example programs for use with XDP
2021-01-27 00:19:07 +00:00
%global _soversion 1.1.0
2020-07-28 19:42:20 +00:00
License: GPLv2
URL: https://github.com/xdp-project/%{name}
Source0: https://github.com/xdp-project/%{name}/releases/download/v%{version}/xdp-tools-%{version}.tar.gz
BuildRequires: libbpf-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: zlib-devel
BuildRequires: libpcap-devel
BuildRequires: clang >= 10.0.0
BuildRequires: llvm >= 10.0.0
BuildRequires: make
BuildRequires: gcc
BuildRequires: pkgconfig
BuildRequires: m4
BuildRequires: emacs-nox
BuildRequires: wireshark-cli
2021-01-27 00:19:07 +00:00
# Missing kernel features means we can't support these archs, so exclude them
# entirely
ExcludeArch: aarch64 s390x ppc64le
2020-07-28 19:42:20 +00:00
# Always keep xdp-tools and libxdp packages in sync
Requires: libxdp = %{version}-%{release}
# find-debuginfo produces empty debugsourcefiles.list
# disable the debug package to avoid rpmbuild error'ing out because of this
%global debug_package %{nil}
%global _hardened_build 1
# strip barfs on BPF files, override it as a workaround
%global __brp_strip_lto %{_bindir}/true
%global __brp_strip %{_bindir}/true
%description
Utilities and example programs for use with XDP
%package -n libxdp
Summary: XDP helper library
Requires: kernel-headers
%package -n libxdp-devel
Summary: Development files for libxdp
Requires: kernel-headers
Requires: libxdp = %{version}-%{release}
%package -n libxdp-static
Summary: Static library files for libxdp
Requires: kernel-headers
Requires: libxdp-devel = %{version}-%{release}
%description -n libxdp
The libxdp package contains the libxdp library for managing XDP programs,
used by the %{name} package
%description -n libxdp-devel
The libxdp-devel package contains headers used for building XDP programs using
libxdp.
%description -n libxdp-static
The libxdp-static package contains the static library version of libxdp.
%prep
%autosetup -p1 -n %{name}-%{version}
%build
export CFLAGS='%{build_cflags}'
export LDFLAGS='%{build_ldflags}'
export LIBDIR='%{_libdir}'
export CLANG=%{_bindir}/clang
export LLC=%{_bindir}/llc
export PRODUCTION=1
export DYNAMIC_LIBXDP=1
export FORCE_SYSTEM_LIBBPF=1
export FORCE_EMACS=1
./configure
make %{?_smp_mflags} V=1
%install
export DESTDIR='%{buildroot}'
export SBINDIR='%{_sbindir}'
export LIBDIR='%{_libdir}'
export MANDIR='%{_mandir}'
export DATADIR='%{_datadir}'
export HDRDIR='%{_includedir}/xdp'
make install V=1
%files
%{_sbindir}/xdp-filter
%{_sbindir}/xdp-loader
%{_sbindir}/xdpdump
%{_mandir}/man8/*
%{_libdir}/bpf/xdpfilt_*.o
%{_libdir}/bpf/xdpdump_*.o
%{_datadir}/xdp-tools/
%license LICENSE
%files -n libxdp
%{_libdir}/libxdp.so.1
%{_libdir}/libxdp.so.%{_soversion}
%{_libdir}/bpf/xdp-dispatcher.o
%{_mandir}/man3/*
%files -n libxdp-static
%{_libdir}/libxdp.a
%files -n libxdp-devel
%{_includedir}/xdp/*.h
%{_libdir}/libxdp.so
2020-08-21 18:33:01 +00:00
%{_libdir}/pkgconfig/libxdp.pc
2020-07-28 19:42:20 +00:00
%changelog
2021-01-27 00:19:07 +00:00
* Mon Jan 4 2021 Toke Høiland-Jørgensen <toke@redhat.com> 1.1.0-1
- Upstream version bump
2020-08-21 18:33:01 +00:00
* Thu Aug 20 2020 Toke Høiland-Jørgensen <toke@redhat.com> 1.0.1-1
- Upstream version bump
* Tue Aug 18 2020 Toke Høiland-Jørgensen <toke@redhat.com> 1.0.0-1
- Upstream version bump
2020-07-28 19:42:20 +00:00
* Wed Jul 15 2020 Eelco Chaudron <echaudro@redhat.com> 1.0.0~beta3-0.1
- Upstream version bump
* Fri Jul 10 2020 Toke Høiland-Jørgensen <toke@redhat.com> 1.0.0~beta2-0.1
- Upstream version bump
* Mon Jun 15 2020 Toke Høiland-Jørgensen <toke@redhat.com> 1.0.0~beta1-0.1
- Upstream version bump
* Tue May 12 2020 Toke Høiland-Jørgensen <toke@redhat.com> 0.0.3-3
- Add CI gating config file
* Mon May 11 2020 Toke Høiland-Jørgensen <toke@redhat.com> 0.0.3-2
- Fix build error due to missing _GNU_SOURCE define
* Mon Apr 6 2020 Toke Høiland-Jørgensen <toke@redhat.com> 0.0.3-1
- Upstream update, add libxdp sub-packages
* Thu Nov 21 2019 Toke Høiland-Jørgensen <toke@redhat.com> 0.0.2-1
- Upstream update
* Fri Nov 8 2019 Toke Høiland-Jørgensen <toke@redhat.com> 0.0.1-1
- Initial release