%global pkgvers 0 %global scdate0 20221015 %global schash0 6f92f47146aa8a8fce59b60927cf8c53da6851b3 %global branch0 master %global source0 https://github.com/airspy/airspyone_host.git %global sshort0 %{expand:%%{lua:print(('%{schash0}'):sub(1,8))}} Name: airspyone_host Version: 1.0.10 Release: %{scdate0}.%{pkgvers}.git%{sshort0}%{?dist} Summary: AirSpy host tools and library License: GPLv2+ URL: http://airspy.com BuildRequires: gcc-c++ git cmake libusbx-devel systemd Requires: systemd-udev %description Software for AirSpy, a project to produce a low cost, open source software radio platform. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} License: MIT and BSD Summary: Development files for %{name} %description devel Files needed to develop software against libairspy. %prep %setup -T -c -n %{name} git clone --depth 1 -n -b %{branch0} %{source0} . git fetch --depth 1 origin %{schash0} git reset --hard %{schash0} git log --format=fuller %build # Remove win stuff rm -rf libairspy/vc # Fix udev rule sed -i -e 's/GROUP="plugdev"/ENV{ID_SOFTWARE_RADIO}="1"/g' airspy-tools/52-airspy.rules %cmake -DINSTALL_UDEV_RULES=on %cmake_build %install %cmake_install # Remove static object rm -f %{buildroot}%{_libdir}/libairspy.a # Move udev rule to correct location mkdir -p %{buildroot}%{_udevrulesdir} mv %{buildroot}%{_sysconfdir}/udev/rules.d/52-airspy.rules %{buildroot}%{_udevrulesdir} %post %?ldconfig %udev_rules_update %postun %?ldconfig %udev_rules_update %files %doc README.md %license airspy-tools/LICENSE.md %{_bindir}/airspy_* %{_libdir}/libairspy.so.* %{_udevrulesdir}/52-airspy.rules %files devel %{_includedir}/libairspy %{_libdir}/pkgconfig/libairspy.pc %{_libdir}/libairspy.so %changelog * Tue Aug 21 2018 Balint Cristian - github update releases