[packages/libbtbb] - new

qboosh qboosh at pld-linux.org
Tue Jul 5 16:13:26 CEST 2022


commit 6fe54af3212f9d94b6bb33479d42d63db88ebd76
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Jul 5 16:14:59 2022 +0200

    - new

 libbtbb-python.patch |  11 +++++
 libbtbb.spec         | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 133 insertions(+)
---
diff --git a/libbtbb.spec b/libbtbb.spec
new file mode 100644
index 0000000..417b05b
--- /dev/null
+++ b/libbtbb.spec
@@ -0,0 +1,122 @@
+#
+# Conditional build:
+%bcond_without	static_libs	# static library
+#
+Summary:	Bluetooth baseband decoding library
+Summary(pl.UTF-8):	Biblioteka dekodowania warstwy baseband Bluetooth
+Name:		libbtbb
+%define	tag_ver	2020-12-R1
+Version:	%(echo %{tag_ver} | tr - _)
+Release:	1
+License:	GPL v2+
+Group:		Libraries
+#Source0Download: https://github.com/greatscottgadgets/libbtbb/releases
+Source0:	https://github.com/greatscottgadgets/libbtbb/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz
+# Source0-md5:	d1c01829b1f32926065e72095641a6be
+Patch0:		%{name}-python.patch
+URL:		https://github.com/greatscottgadgets/libbtbb
+BuildRequires:	cmake >= 2.8
+BuildRequires:	python3 >= 1:3
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This is the Bluetooth baseband decoding library, forked from the
+GR-Bluetooth project. It can be used to extract Bluetooth packet and
+piconet information from Ubertooth devices as well as
+GR-Bluetooth/USRP.
+
+%description -l pl.UTF-8
+Biblioteka dekodująca warstwę baseband Bluetooth, odgałęziona z
+projektu GR-Bluetooth. Może być używana do wydobywania pakietów
+Bluetooth i informacji piconet z urządzeń Ubertooth oraz
+GR-Bluetooth/USRP.
+
+%package devel
+Summary:	Header files for libbtbb library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libbtbb
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for libbtbb library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libbtbb.
+
+%package static
+Summary:	Static libbtbb library
+Summary(pl.UTF-8):	Statyczna biblioteka libbtbb
+Group:		Development/Libraries
+Requires:	%{name}-devel = %{version}-%{release}
+
+%description static
+Static libbtbb library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka libbtbb.
+
+%package python
+Summary:	Python tools for working with pcap files produced via libbtbb
+Summary(pl.UTF-8):	Narzędzia pythonowe do pracy z plikami pcap tworzonymi przy pomocy libbtbb
+Group:		Development/Tools
+
+%description python
+Supplemental tools for working with pcap files produced via libbtbb.
+
+%description python -l pl.UTF-8
+Dodatkowe narzędzia do pracy z plikami pcap tworzonymi przy pomocy
+libbtbb.
+
+%prep
+%setup -q -n %{name}-%{tag_ver}
+%patch0 -p1
+
+%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
+	python/pcaptools/btaptap
+
+%build
+install -d build
+cd build
+%cmake .. \
+	%{?with_static_libs:-DBUILD_STATIC_LIB=ON} \
+	-DCMAKE_INSTALL_INCLUDEDIR=include \
+	-DCMAKE_INSTALL_LIBDIR=%{_lib}
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc README.md
+%attr(755,root,root) %{_libdir}/libbtbb.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/libbtbb.so.1
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libbtbb.so
+%{_includedir}/btbb.h
+%{_pkgconfigdir}/libbtbb.pc
+
+%if %{with static_libs}
+%files static
+%defattr(644,root,root,755)
+%{_libdir}/libbtbb.a
+%endif
+
+%files python
+%defattr(644,root,root,755)
+%doc python/pcaptools/README
+%attr(755,root,root) %{_bindir}/btaptap
+%{py3_sitedir}/pcapdump
+%{py3_sitedir}/pcapdump-*.egg-info
diff --git a/libbtbb-python.patch b/libbtbb-python.patch
new file mode 100644
index 0000000..08e7a7e
--- /dev/null
+++ b/libbtbb-python.patch
@@ -0,0 +1,11 @@
+--- libbtbb-2020-12-R1/python/pcaptools/CMakeLists.txt.orig	2020-12-25 22:43:09.000000000 +0100
++++ libbtbb-2020-12-R1/python/pcaptools/CMakeLists.txt	2022-07-05 16:08:35.481831720 +0200
+@@ -31,7 +31,7 @@ add_custom_command(OUTPUT ${OUTPUT}/time
+                    DEPENDS ${DEPS})
+ 
+ add_custom_target(pcapdump ALL DEPENDS ${OUTPUT}/timestamp)
+-install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build -b ${OUTPUT} install --prefix=${BUILD_ROOT}/${CMAKE_INSTALL_PREFIX})")
++install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} ${SETUP_PY} build -b ${OUTPUT} install --skip-build --prefix=${CMAKE_INSTALL_PREFIX} --optimize=2 --root=\$ENV{DESTDIR})")
+ 
+ add_custom_target(btaptap ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/btaptap)
+ install(PROGRAMS btaptap DESTINATION ${INSTALL_DEFAULT_BINDIR})
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libbtbb.git/commitdiff/6fe54af3212f9d94b6bb33479d42d63db88ebd76



More information about the pld-cvs-commit mailing list