]> git.pld-linux.org Git - packages/libbtbb.git/blob - libbtbb.spec
- force building python tools as noarch package
[packages/libbtbb.git] / libbtbb.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # static library
4 #
5 Summary:        Bluetooth baseband decoding library
6 Summary(pl.UTF-8):      Biblioteka dekodowania warstwy baseband Bluetooth
7 Name:           libbtbb
8 %define tag_ver 2020-12-R1
9 Version:        %(echo %{tag_ver} | tr - _)
10 Release:        1
11 License:        GPL v2+
12 Group:          Libraries
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)
24
25 %description
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
29 GR-Bluetooth/USRP.
30
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
35 GR-Bluetooth/USRP.
36
37 %package devel
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}
42
43 %description devel
44 Header files for libbtbb library.
45
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki libbtbb.
48
49 %package static
50 Summary:        Static libbtbb library
51 Summary(pl.UTF-8):      Statyczna biblioteka libbtbb
52 Group:          Development/Libraries
53 Requires:       %{name}-devel = %{version}-%{release}
54
55 %description static
56 Static libbtbb library.
57
58 %description static -l pl.UTF-8
59 Statyczna biblioteka libbtbb.
60
61 %package python
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
65 BuildArch:      noarch
66
67 %description python
68 Supplemental tools for working with pcap files produced via libbtbb.
69
70 %description python -l pl.UTF-8
71 Dodatkowe narzędzia do pracy z plikami pcap tworzonymi przy pomocy
72 libbtbb.
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
81 %{__sed} -i -e 's, --root, --install-purelib=%{py3_sitescriptdir} &,' \
82         python/pcaptools/CMakeLists.txt
83
84 %build
85 install -d build
86 cd 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
95 rm -rf $RPM_BUILD_ROOT
96
97 %{__make} -C build install \
98         DESTDIR=$RPM_BUILD_ROOT
99
100 %clean
101 rm -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
128 %{py3_sitescriptdir}/pcapdump
129 %{py3_sitescriptdir}/pcapdump-*.egg-info
This page took 0.113298 seconds and 4 git commands to generate.