2017-03-08 12:37:29 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package hackrf
|
|
|
|
|
#
|
2024-03-07 08:30:15 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-03-08 12:50:54 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2021-03-23 11:32:51 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-03-08 12:50:54 +00:00
|
|
|
#
|
|
|
|
|
|
2017-03-08 12:37:29 +00:00
|
|
|
|
2017-03-08 12:50:54 +00:00
|
|
|
%define sover 0
|
|
|
|
|
%define libname lib%{name}%{sover}
|
|
|
|
|
%define hackrf_group hackrf
|
2017-03-08 12:37:29 +00:00
|
|
|
Name: hackrf
|
2024-03-07 08:30:15 +00:00
|
|
|
Version: 2024.02.1
|
2017-03-08 12:50:54 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Support programs for the open source SDR hardware
|
2021-03-23 11:32:51 +00:00
|
|
|
License: GPL-2.0-only
|
2017-03-08 12:37:29 +00:00
|
|
|
Group: Productivity/Hamradio/Other
|
2021-03-23 11:32:51 +00:00
|
|
|
URL: https://greatscottgadgets.com/hackrf/
|
2022-10-03 15:40:00 +00:00
|
|
|
#Git-Clone: https://github.com/greatscottgadgets/hackrf.git
|
|
|
|
|
Source: https://github.com/greatscottgadgets/hackrf/releases/download/v%{version}/hackrf-%{version}.tar.xz
|
2017-03-08 12:37:29 +00:00
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: gcc-c++
|
2017-03-08 12:50:54 +00:00
|
|
|
BuildRequires: pkgconfig
|
|
|
|
|
BuildRequires: pkgconfig(fftw3)
|
|
|
|
|
BuildRequires: pkgconfig(libusb-1.0)
|
|
|
|
|
BuildRequires: pkgconfig(udev)
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%description
|
2017-03-08 12:50:54 +00:00
|
|
|
Tools for HackRF, an open source hardware project to build a Software
|
|
|
|
|
Defined Radio (SDR) peripheral.
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%package -n %{libname}
|
|
|
|
|
Summary: Driver for HackRF
|
|
|
|
|
Group: Hardware/Other
|
2017-03-08 12:50:54 +00:00
|
|
|
Requires: %{name}-udev
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%description -n %{libname}
|
2017-03-08 12:50:54 +00:00
|
|
|
Library to run HackRF, an open source hardware project to build a Software
|
|
|
|
|
Defined Radio (SDR) peripheral.
|
|
|
|
|
|
|
|
|
|
%package udev
|
|
|
|
|
Summary: Udev rules for HackRF
|
|
|
|
|
Group: Hardware/Other
|
2021-03-23 11:32:51 +00:00
|
|
|
Requires(pre): shadow
|
2017-03-08 12:50:54 +00:00
|
|
|
|
|
|
|
|
%description udev
|
2017-11-03 11:47:38 +00:00
|
|
|
Udev rules for HackRF.
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%package devel
|
2017-03-08 12:50:54 +00:00
|
|
|
Summary: Development files for HackRF
|
2017-11-03 11:47:38 +00:00
|
|
|
Group: Development/Libraries/C and C++
|
2017-03-08 13:00:09 +00:00
|
|
|
Requires: %{libname} = %{version}
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%description devel
|
2017-11-03 11:47:38 +00:00
|
|
|
Library headers for the hackrf driver.
|
2017-03-08 12:37:29 +00:00
|
|
|
|
2017-04-15 20:43:55 +00:00
|
|
|
%package firmware
|
2017-11-03 11:47:38 +00:00
|
|
|
Summary: Firmware for the hackRF board
|
2017-04-15 20:43:55 +00:00
|
|
|
Group: Hardware/Other
|
2017-04-23 20:13:50 +00:00
|
|
|
Requires: %{name} = %{version}
|
2017-04-15 20:43:55 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description firmware
|
2017-11-03 11:47:38 +00:00
|
|
|
Firmare files for the hackRF board.
|
2017-04-15 20:43:55 +00:00
|
|
|
|
2017-03-08 12:37:29 +00:00
|
|
|
%prep
|
2017-03-08 12:50:54 +00:00
|
|
|
%setup -q -n %{name}-%{version}/host
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-03-08 12:50:54 +00:00
|
|
|
%cmake \
|
|
|
|
|
-DINSTALL_UDEV_RULES=ON \
|
2017-04-15 20:43:55 +00:00
|
|
|
-DUDEV_RULES_PATH=%{_udevrulesdir} \
|
2017-03-08 12:50:54 +00:00
|
|
|
-DUDEV_RULES_GROUP=%{hackrf_group}
|
2021-03-23 11:32:51 +00:00
|
|
|
%make_build
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-03-08 12:50:54 +00:00
|
|
|
%cmake_install
|
2017-03-08 12:37:29 +00:00
|
|
|
rm %{buildroot}%{_libdir}/libhackrf.a
|
|
|
|
|
|
2017-04-15 20:43:55 +00:00
|
|
|
# install firmware
|
|
|
|
|
cd ..
|
|
|
|
|
mkdir -p %{buildroot}%{_datadir}/hackrf/firmware/
|
|
|
|
|
install -m644 firmware-bin/* %{buildroot}%{_datadir}/hackrf/firmware
|
2017-03-08 12:37:29 +00:00
|
|
|
|
2017-04-23 20:13:50 +00:00
|
|
|
%pre udev
|
2017-03-08 12:37:29 +00:00
|
|
|
getent group %{hackrf_group} >/dev/null || groupadd -r %{hackrf_group}
|
|
|
|
|
|
2017-03-08 12:50:54 +00:00
|
|
|
%post udev
|
|
|
|
|
%udev_rules_update
|
|
|
|
|
|
|
|
|
|
%postun udev
|
|
|
|
|
%udev_rules_update
|
|
|
|
|
|
|
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%files
|
2021-03-23 11:32:51 +00:00
|
|
|
%license ../COPYING
|
2022-10-03 15:40:00 +00:00
|
|
|
%doc ../RELEASENOTES ../Readme.md
|
2024-03-07 08:30:15 +00:00
|
|
|
%{_bindir}/hackrf_biast
|
2021-03-23 11:32:51 +00:00
|
|
|
%{_bindir}/hackrf_clock
|
2017-03-08 12:50:54 +00:00
|
|
|
%{_bindir}/hackrf_cpldjtag
|
|
|
|
|
%{_bindir}/hackrf_debug
|
|
|
|
|
%{_bindir}/hackrf_info
|
2021-03-23 11:32:51 +00:00
|
|
|
%{_bindir}/hackrf_operacake
|
2017-03-08 12:50:54 +00:00
|
|
|
%{_bindir}/hackrf_spiflash
|
|
|
|
|
%{_bindir}/hackrf_sweep
|
|
|
|
|
%{_bindir}/hackrf_transfer
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%files -n %{libname}
|
2017-03-08 12:50:54 +00:00
|
|
|
%{_libdir}/libhackrf.so.%{sover}*
|
|
|
|
|
|
|
|
|
|
%files udev
|
2017-04-15 20:43:55 +00:00
|
|
|
%{_udevrulesdir}/53-hackrf.rules
|
2017-03-08 12:37:29 +00:00
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%{_libdir}/libhackrf.so
|
|
|
|
|
%{_includedir}/libhackrf
|
|
|
|
|
%{_libdir}/pkgconfig/libhackrf.pc
|
|
|
|
|
|
2017-04-15 20:43:55 +00:00
|
|
|
%files firmware
|
|
|
|
|
%dir %{_datadir}/hackrf
|
|
|
|
|
%{_datadir}/hackrf/firmware
|
|
|
|
|
|
2017-03-08 12:37:29 +00:00
|
|
|
%changelog
|