]> git.pld-linux.org Git - packages/libbtbb.git/blame - libbtbb.spec
- force building python tools as noarch package
[packages/libbtbb.git] / libbtbb.spec
CommitLineData
6fe54af3
JB
1#
2# Conditional build:
3%bcond_without static_libs # static library
4#
5Summary: Bluetooth baseband decoding library
6Summary(pl.UTF-8): Biblioteka dekodowania warstwy baseband Bluetooth
7Name: libbtbb
8%define tag_ver 2020-12-R1
9Version: %(echo %{tag_ver} | tr - _)
10Release: 1
11License: GPL v2+
12Group: Libraries
13#Source0Download: https://github.com/greatscottgadgets/libbtbb/releases
14Source0: https://github.com/greatscottgadgets/libbtbb/archive/%{tag_ver}/%{name}-%{tag_ver}.tar.gz
15# Source0-md5: d1c01829b1f32926065e72095641a6be
16Patch0: %{name}-python.patch
17URL: https://github.com/greatscottgadgets/libbtbb
18BuildRequires: cmake >= 2.8
19BuildRequires: python3 >= 1:3
e67f1ff4
JB
20BuildRequires: rpm-build >= 4.6
21BuildRequires: rpmbuild(macros) >= 1.605
22BuildRequires: sed >= 4.0
6fe54af3
JB
23BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25%description
26This is the Bluetooth baseband decoding library, forked from the
27GR-Bluetooth project. It can be used to extract Bluetooth packet and
28piconet information from Ubertooth devices as well as
29GR-Bluetooth/USRP.
30
31%description -l pl.UTF-8
32Biblioteka dekodująca warstwę baseband Bluetooth, odgałęziona z
33projektu GR-Bluetooth. Może być używana do wydobywania pakietów
34Bluetooth i informacji piconet z urządzeń Ubertooth oraz
35GR-Bluetooth/USRP.
36
37%package devel
38Summary: Header files for libbtbb library
39Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libbtbb
40Group: Development/Libraries
41Requires: %{name} = %{version}-%{release}
42
43%description devel
44Header files for libbtbb library.
45
46%description devel -l pl.UTF-8
47Pliki nagłówkowe biblioteki libbtbb.
48
49%package static
50Summary: Static libbtbb library
51Summary(pl.UTF-8): Statyczna biblioteka libbtbb
52Group: Development/Libraries
53Requires: %{name}-devel = %{version}-%{release}
54
55%description static
56Static libbtbb library.
57
58%description static -l pl.UTF-8
59Statyczna biblioteka libbtbb.
60
61%package python
62Summary: Python tools for working with pcap files produced via libbtbb
63Summary(pl.UTF-8): Narzędzia pythonowe do pracy z plikami pcap tworzonymi przy pomocy libbtbb
64Group: Development/Tools
e67f1ff4 65BuildArch: noarch
6fe54af3
JB
66
67%description python
68Supplemental tools for working with pcap files produced via libbtbb.
69
70%description python -l pl.UTF-8
71Dodatkowe narzędzia do pracy z plikami pcap tworzonymi przy pomocy
72libbtbb.
73
74%prep
75%setup -q -n %{name}-%{tag_ver}
76%patch0 -p1
77
78%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
79 python/pcaptools/btaptap
80
e67f1ff4
JB
81%{__sed} -i -e 's, --root, --install-purelib=%{py3_sitescriptdir} &,' \
82 python/pcaptools/CMakeLists.txt
83
6fe54af3
JB
84%build
85install -d build
86cd build
87%cmake .. \
88 %{?with_static_libs:-DBUILD_STATIC_LIB=ON} \
89 -DCMAKE_INSTALL_INCLUDEDIR=include \
90 -DCMAKE_INSTALL_LIBDIR=%{_lib}
91
92%{__make}
93
94%install
95rm -rf $RPM_BUILD_ROOT
96
97%{__make} -C build install \
98 DESTDIR=$RPM_BUILD_ROOT
99
100%clean
101rm -rf $RPM_BUILD_ROOT
102
103%post -p /sbin/ldconfig
104%postun -p /sbin/ldconfig
105
106%files
107%defattr(644,root,root,755)
108%doc README.md
109%attr(755,root,root) %{_libdir}/libbtbb.so.*.*
110%attr(755,root,root) %ghost %{_libdir}/libbtbb.so.1
111
112%files devel
113%defattr(644,root,root,755)
114%attr(755,root,root) %{_libdir}/libbtbb.so
115%{_includedir}/btbb.h
116%{_pkgconfigdir}/libbtbb.pc
117
118%if %{with static_libs}
119%files static
120%defattr(644,root,root,755)
121%{_libdir}/libbtbb.a
122%endif
123
124%files python
125%defattr(644,root,root,755)
126%doc python/pcaptools/README
127%attr(755,root,root) %{_bindir}/btaptap
e67f1ff4
JB
128%{py3_sitescriptdir}/pcapdump
129%{py3_sitescriptdir}/pcapdump-*.egg-info
This page took 0.225087 seconds and 4 git commands to generate.