--- /dev/null
+%global gitdate 20121205
+
+Name: rtl-sdr
+Version: 0
+Release: 0.1.git%{gitdate}%{?dist}
+Summary: Software Defined Radio driver for Realtek RTL2832U
+
+License: GPLv2+
+URL: http://sdr.osmocom.org/trac/wiki/rtl-sdr
+
+# To construct the source archive, update gitdate above and then do:
+# cd /tmp
+# rm -r rtl-sdr
+# git clone git://git.osmocom.org/rtl-sdr.git
+# cd rtl-sdr
+# git archive -o ../rtl-sdr-git%{gitdate}.tar.gz --prefix=rtl-sdr/ HEAD
+Source0: rtl-sdr-git%{gitdate}.tar.gz
+
+BuildRequires: /usr/bin/autoreconf
+BuildRequires: libusbx-devel
+
+
+%description
+DVB-T dongles based on the Realtek RTL2832U can be used as a cheap
+Software Defined Radio (SDR), since the chip allows transferring the
+raw I/Q samples to the host, which is officially used for DAB/DAB+/FM
+demodulation.
+
+
+%package devel
+Summary: Software Defined Radio driver for Realtek RTL2832U
+License: GPLv2+
+Requires: rtl-sdr = %{version}-%{release}
+Requires: pkgconfig
+
+
+%description devel
+Development packages for %{name}.
+
+
+%prep
+%setup -q -n rtl-sdr
+autoreconf -i
+
+
+%build
+%configure --disable-static
+make %{?_smp_mflags}
+
+
+%install
+%make_install
+rm $RPM_BUILD_ROOT%{_libdir}/librtlsdr.la
+
+
+%files
+%doc COPYING
+%{_bindir}/rtl_eeprom
+%{_bindir}/rtl_fm
+%{_bindir}/rtl_sdr
+%{_bindir}/rtl_tcp
+%{_bindir}/rtl_test
+%{_libdir}/librtlsdr.so.0
+%{_libdir}/librtlsdr.so.0.0.0
+
+
+%files devel
+%doc COPYING README
+%{_libdir}/librtlsdr.so
+%{_libdir}/pkgconfig/librtlsdr.pc
+%{_includedir}/rtl-sdr.h
+%{_includedir}/rtl-sdr_export.h
+
+
+%changelog
+* Wed Dec 05 2012 Richard W.M. Jones <rjones@redhat.com> 0-0.1
+- Initial release.