From a040884ee9a0c4ddcc91a4c8f9422b614f5f0a64 Mon Sep 17 00:00:00 2001 From: Steven A. Falco Date: Dec 02 2022 20:31:53 +0000 Subject: Fix URLs and include fw/hw subprojects --- diff --git a/.gitignore b/.gitignore index fddcae1..8495fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hackrf-*.tar.gz +/hackrf-2022.09.1.tar.xz diff --git a/hackrf.spec b/hackrf.spec index b4b3978..a72b898 100644 --- a/hackrf.spec +++ b/hackrf.spec @@ -1,11 +1,13 @@ Name: hackrf Version: 2022.09.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: HackRF Utilities License: GPL-2.0 -URL: https://greatscottgadgets.com/hackrf/ -Source0: https://github.com/mossmann/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz +URL: https://greatscottgadgets.com/%{name}/ +Source0: https://github.com/greatscottgadgets/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz + +Patch0: shebang.patch BuildRequires: cmake BuildRequires: fftw3-devel @@ -14,14 +16,16 @@ BuildRequires: gcc-c++ BuildRequires: libusbx-devel BuildRequires: systemd -# Documentation -BuildRequires: python3-sphinx -BuildRequires: python3-sphinx_rtd_theme +# When the host software changes, we generally will also have to update the firmware. +Recommends: %{name}-firmware = %{version}-%{release} %description Hardware designs and software for HackRF, a project to produce a low cost, open source software radio platform. +NOTE: To upgrade to this release, you must update libhackrf and hackrf-tools on +your host computer. You must also update firmware on your HackRF device. + %package devel Summary: Development files for %{name} @@ -36,12 +40,10 @@ Files needed to develop software against libhackrf. Summary: Supplemental documentation for HackRF BuildArch: noarch Requires: %{name} = %{version}-%{release} -Requires: python3-sphinx -Requires: python3-sphinx_rtd_theme %description doc -Supplemental documentation for HackRF. For more information, visit the wiki at -https://github.com/mossmann/hackrf/wiki +Supplemental documentation for HackRF. For more information, visit the project at +https://greatscottgadgets.com/hackrf %package static @@ -52,6 +54,22 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release} Static libraries for libhackrf. +%package firmware +Summary: Firmware for HackRF +Requires: %{name} = %{version}-%{release} + +%description firmware +Firmware for HackRF. + + +%package hardware +Summary: Hardware schematics / pcb layout for HackRF. +Requires: %{name} = %{version}-%{release} + +%description hardware +Hardware schematics / pcb layout for HackRF. + + %prep %autosetup -p1 @@ -70,19 +88,21 @@ pushd host %cmake_build popd -pushd docs -make html -popd %install pushd host %cmake_install popd -# Documentation doesn't have a "make install", so do it manually. -mkdir -p %{buildroot}%{_docdir}/%{name} -cp -a docs/build/html %{buildroot}%{_docdir}/%{name} - +# Docs, schematics, and firmware don't have any "make install", so do that manually. +mkdir -p %{buildroot}%{_docdir}/%{name} %{buildroot}%{_datadir}/%{name} +cp -a doc/* %{buildroot}%{_docdir}/%{name} +cp -a firmware-bin %{buildroot}%{_datadir}/%{name} +cp -a hardware %{buildroot}%{_datadir}/%{name} +( + echo "Please see https://hackrf.readthedocs.io/en/latest/updating_firmware.html for" + echo "instructions regarding updating the firmware on your HackRF device." +) > %{buildroot}%{_datadir}/%{name}/README-Fedora %post %{?ldconfig} @@ -94,8 +114,8 @@ cp -a docs/build/html %{buildroot}%{_docdir}/%{name} %files -%license COPYING TRADEMARK -%doc Readme.md +%license COPYING +%doc Readme.md RELEASENOTES %{_bindir}/hackrf_* %{_libdir}/libhackrf.so.* %{_udevrulesdir}/53-hackrf.rules @@ -108,11 +128,22 @@ cp -a docs/build/html %{buildroot}%{_docdir}/%{name} %files static %{_libdir}/libhackrf.a +%files firmware +%{_datadir}/%{name}/README-Fedora +%{_datadir}/%{name}/firmware-bin + +%files hardware +%{_datadir}/%{name}/hardware + %files doc %{_docdir}/%{name}/* %changelog +* Fri Dec 02 2022 Steven A. Falco - 2022.09.1-5 +- Correct URLs +- Include fw / hw sub-packages + * Wed Nov 23 2022 Steven A. Falco - 2022.09.1-4 - Doc requires theme to bring in fonts, etc. diff --git a/shebang.patch b/shebang.patch new file mode 100644 index 0000000..f3d1066 --- /dev/null +++ b/shebang.patch @@ -0,0 +1,16 @@ +From dc44e1de25477a394509e0c70233d8fa70eb52d7 Mon Sep 17 00:00:00 2001 +From: "Steven A. Falco" +Date: Fri, 2 Dec 2022 14:34:13 -0500 +Subject: Fix shebangs + + +diff --git a/hardware/lollipop/lollipop_logic.py b/hardware/lollipop/lollipop_logic.py +index 4fea2c6e..886d5fd4 100755 +--- a/hardware/lollipop/lollipop_logic.py ++++ b/hardware/lollipop/lollipop_logic.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # -*- coding: utf-8 -*- + # + # Copyright (C) 2012 Jared Boone diff --git a/sources b/sources index 46d4b9f..590dfde 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (hackrf-2022.09.1.tar.gz) = 1e05552d5414c7f385d6cb0c779279706970fe8b435472bacaf66dbeebe65e1e9ad2dbf09e13a10e811953b61ae381b94823d96c8a72cf7b55f12d2b826ce610 +SHA512 (hackrf-2022.09.1.tar.xz) = c3b8b6f18cb80e3506c09dc71f2c01c127ad6d88ed028be3b659953cf7bb1e36b9dba83b4bb04c916bd7c2b66faeae1e602c53368e1e56454d6fe831961e01ee