3 %bcond_without static_libs # static library
5 Summary: Bluetooth baseband decoding library
6 Summary(pl.UTF-8): Biblioteka dekodowania warstwy baseband Bluetooth
8 %define tag_ver 2020-12-R1
9 Version: %(echo %{tag_ver} | tr - _)
13 #Source0Download: https://github.com/greatscottgadgets/libbtbb/releases
14 Source0: https://github.com/greatscottgadgets/libbtbb/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz
15 # Source0-md5: d1c01829b1f32926065e72095641a6be
16 Patch0: %{name}-python.patch
17 URL: https://github.com/greatscottgadgets/libbtbb
18 BuildRequires: cmake >= 2.8
19 BuildRequires: python3 >= 1:3
20 BuildRequires: rpm-build >= 4.6
21 BuildRequires: rpmbuild(macros) >= 1.605
22 BuildRequires: sed >= 4.0
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 This is the Bluetooth baseband decoding library, forked from the
27 GR-Bluetooth project. It can be used to extract Bluetooth packet and
28 piconet information from Ubertooth devices as well as
31 %description -l pl.UTF-8
32 Biblioteka dekodująca warstwę baseband Bluetooth, odgałęziona z
33 projektu GR-Bluetooth. Może być używana do wydobywania pakietów
34 Bluetooth i informacji piconet z urządzeń Ubertooth oraz
38 Summary: Header files for libbtbb library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbtbb
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
44 Header files for libbtbb library.
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki libbtbb.
50 Summary: Static libbtbb library
51 Summary(pl.UTF-8): Statyczna biblioteka libbtbb
52 Group: Development/Libraries
53 Requires: %{name}-devel = %{version}-%{release}
56 Static libbtbb library.
58 %description static -l pl.UTF-8
59 Statyczna biblioteka libbtbb.
62 Summary: Python tools for working with pcap files produced via libbtbb
63 Summary(pl.UTF-8): Narzędzia pythonowe do pracy z plikami pcap tworzonymi przy pomocy libbtbb
64 Group: Development/Tools
68 Supplemental tools for working with pcap files produced via libbtbb.
70 %description python -l pl.UTF-8
71 Dodatkowe narzędzia do pracy z plikami pcap tworzonymi przy pomocy
75 %setup -q -n %{name}-%{tag_ver}
78 %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
79 python/pcaptools/btaptap
81 %{__sed} -i -e 's, --root, --install-purelib=%{py3_sitescriptdir} &,' \
82 python/pcaptools/CMakeLists.txt
88 %{?with_static_libs:-DBUILD_STATIC_LIB=ON} \
89 -DCMAKE_INSTALL_INCLUDEDIR=include \
90 -DCMAKE_INSTALL_LIBDIR=%{_lib}
95 rm -rf $RPM_BUILD_ROOT
97 %{__make} -C build install \
98 DESTDIR=$RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
103 %post -p /sbin/ldconfig
104 %postun -p /sbin/ldconfig
107 %defattr(644,root,root,755)
109 %attr(755,root,root) %{_libdir}/libbtbb.so.*.*
110 %attr(755,root,root) %ghost %{_libdir}/libbtbb.so.1
113 %defattr(644,root,root,755)
114 %attr(755,root,root) %{_libdir}/libbtbb.so
115 %{_includedir}/btbb.h
116 %{_pkgconfigdir}/libbtbb.pc
118 %if %{with static_libs}
120 %defattr(644,root,root,755)
125 %defattr(644,root,root,755)
126 %doc python/pcaptools/README
127 %attr(755,root,root) %{_bindir}/btaptap
128 %{py3_sitescriptdir}/pcapdump
129 %{py3_sitescriptdir}/pcapdump-*.egg-info