%global git_commit fc6200b6a784f832560ff17885a3064e538085a5 %global git_date 20180427 %global git_short_commit %(echo %{git_commit} | cut -c -8) %global git_suffix %{git_date}git%{git_short_commit} # git clone git://git.osmocom.org/osmo-fl2k # cd %%{name} # git archive --format=tar --prefix=%%{name}-%%{version}/ %%{git_commit} | \ # bzip2 > ../%%{name}-%%{version}-%%{git_suffix}.tar.bz2 Name: osmo-fl2k URL: https://osmocom.org/projects/osmo-fl2k/wiki Version: 0.0.0.0_%{git_suffix} Release: 0%{?dist} License: GPLv2+ BuildRequires: cmake BuildRequires: ninja-build BuildRequires: libusbx-devel #BuildRequires: libusb1-devel Requires(pre): shadow-utils Group: Applications/Communications Summary: Driver to make Fresco Logic FL2000-based USB3-to-VGA adapters work as high-rate DAC Source0: https://git.osmocom.org/osmo-fl2k/snapshot/osmo-fl2k-%{git_commit}.tar.gz %description This package can turn your FL2000-based USB3-to-VGA adapter into atriple-channel DAC, suitable for SDR transmission. %package devel Summary: Development files for osmo-fl2k Group: Applications/Communications Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development files for rtl-sdr. %prep %setup -q -n osmo-fl2k-%{git_commit} rm -f src/getopt/* rmdir src/getopt %build mkdir build cd build %cmake -GNinja -DINSTALL_UDEV_RULES=OFF .. ninja %install cd build DESTDIR=%{buildroot} ninja install # remove static libs rm -f %{buildroot}%{_libdir}/*.a sed -i 's/MODE:="0666"/GROUP:="fl2k", MODE:="0660", ENV{ID_SOFTWARE_RADIO}="1"/' ../osmo-fl2k.rules install -Dpm 644 ../osmo-fl2k.rules %{buildroot}%{_prefix}/lib/udev/rules.d/10-osmo-fl2k.rules %pre getent group fl2k >/dev/null || \ %{_sbindir}/groupadd -r fl2k >/dev/null 2>&1 exit 0 %files %doc AUTHORS COPYING %{_bindir}/* %{_libdir}/*.so.* %{_prefix}/lib/udev/rules.d/10-osmo-fl2k.rules %files devel %{_includedir}/* %{_libdir}/*.so %{_libdir}/pkgconfig/*.pc %changelog * Fri Apr 27 2018 Marcus Müller – 0-0.0.0.1gitfc6200b6 - Initial version