%global commit 69c4997727a5c4740d7d5a187f7030cca513deff %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: hackrf Version: 2014.08.1 Release: 1%{?dist} Summary: HackRF Utilities Group: Development/Libraries License: GPLv2 URL: https://github.com/mossmann/%{name}/wiki Source0: https://github.com/mossmann/%{name}/archive/%{commit}/%{name}-%{commit}.tar.gz # Fedora-specific patch - not submitted upstream Patch0: %{name}-2014.08.1-udev-remove-plugdev.patch # https://github.com/mossmann/hackrf/pull/140 Patch1: %{name}-2014.08.1-lib-suffixes.patch # https://github.com/mossmann/hackrf/pull/141 Patch2: %{name}-2014.08.1-udev-install-dir.patch BuildRequires: cmake BuildRequires: libusbx-devel BuildRequires: systemd %description Hardware designs and software for HackRF, a project to produce a low cost, open source software radio platform. %package devel Requires: %{name} = %{version}-%{release}%{?isa} Requires: libusbx-devel Summary: Development files for %{name} Provides: %{name}-static = %{version}-%{release}%{?isa} %package doc Requires: %{name} = %{version}-%{release}%{?isa} Summary: Supplemental documentation for HackRF BuildArch: noarch %package static Requires: %{name}-devel = %{version}-%{release}%{?isa} Summary: Static libraries for libhackrf %description devel Files needed to develop software against libhackrf. %description doc Supplemental documentation for HackRF. For more information, visit the wiki at https://github.com/mossmann/hackrf/wiki %description static Static libraries for libhackrf. %prep %setup -qn %{name}-%{commit} %patch0 -p1 %patch1 -p1 %patch2 -p1 %build mkdir -p build pushd build %cmake ../host \ -DINSTALL_UDEV_RULES=on \ -DUDEV_INSTALL_DIR:PATH=%{_udevrulesdir} \ popd make -C build %{?_smp_mflags} %install make -C build install DESTDIR=%{buildroot} %post /sbin/ldconfig %udev_rules_update %postun /sbin/ldconfig %udev_rules_update %files %doc COPYING TRADEMARK Readme.md %{_bindir}/hackrf_* %{_libdir}/libhackrf.so.* %{_udevrulesdir}/53-hackrf.rules %files devel %{_includedir}/libhackrf/hackrf.h %{_libdir}/pkgconfig/libhackrf.pc %{_libdir}/libhackrf.so %files static %{_libdir}/libhackrf.a %files doc %doc doc/* %changelog * Sun Sep 21 2014 Scott K Logan - 2014.08.1-1 - Initial package