Add gr-osmosdr.spec and README file.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 5 Dec 2012 15:49:09 +0000 (15:49 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 5 Dec 2012 15:51:01 +0000 (15:51 +0000)
README [new file with mode: 0644]
gr-osmosdr.spec [new file with mode: 0644]

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..c1851a7
--- /dev/null
+++ b/README
@@ -0,0 +1,22 @@
+
+This git repository contains random Fedora spec files that I don't
+have the time or inclination to package up for Fedora.
+
+The usual way to build RPMs from these:
+
+(a) READ THE SPEC FILE!  You have to locate or prepare the source
+    tarballs and place them in the current directory.
+
+(b) Run:
+
+    rpmbuild -ba --define "_sourcedir $(pwd)" the-spec-file.spec
+
+Please don't contact me about these!  They are not supported in any
+way, and if they break you get to keep all the pieces.
+
+All spec files in this directory are placed into the public domain, or
+if that is not possible, you can use, copy, distribute and relicense
+them for any purpose with no restrictions.  (Note this only applies to
+these spec files, not to the packaged software itself.)
+
+- Richard W.M. Jones
diff --git a/gr-osmosdr.spec b/gr-osmosdr.spec
new file mode 100644 (file)
index 0000000..ba01e5a
--- /dev/null
@@ -0,0 +1,103 @@
+%global gitdate 20121205
+
+Name:           gr-osmosdr
+Version:        0
+Release:        0.1.git%{gitdate}%{?dist}
+Summary:        GNU Radio block for Realtek RTL2832U
+
+License:        GPLv3
+URL:            http://sdr.osmocom.org/trac/wiki/rtl-sdr
+
+# To construct the source archive, update gitdate above and then do:
+#   cd /tmp
+#   rm -r gr-osmosdr
+#   git clone git://git.osmocom.org/gr-osmosdr
+#   cd gr-osmosdr
+#   git archive -o ../gr-osmosdr-git%{gitdate}.tar.gz --prefix=gr-osmosdr/ HEAD
+Source0:        gr-osmosdr-git%{gitdate}.tar.gz
+
+# This BR list is by no means complete.  If there are missing
+# dependencies, try 'yum-builddep gnuradio'.
+BuildRequires:  rtl-sdr
+BuildRequires:  gnuradio-devel
+BuildRequires:  gcc-c++
+BuildRequires:  boost-devel
+BuildRequires:  cmake
+BuildRequires:  python-devel
+Requires:       gnuradio
+
+# Python directories.
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+
+%description
+GNU Radio port to Realtek RTL2832U.
+
+
+%package devel
+Summary:        GNU Radio block for Realtek RTL2832U
+License:        GPLv3
+Requires:       pkgconfig
+Requires:       gr-osmosdr = %{version}-%{release}
+Requires:       rtl-sdr-devel
+
+
+%description devel
+Development packages for %{name}.
+
+
+%prep
+%setup -q -n gr-osmosdr
+
+
+%build
+mkdir build
+cd build
+cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
+make %{?_smp_mflags}
+
+
+%install
+cd build
+%make_install
+
+# It installs the Python libraries in /usr/lib64.  There's
+# probably a CMake variable to fix this ... XXX
+if [ "%{_libdir}/python2.7/site-packages" != "%{python_sitelib}" ]; then
+  mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
+  mv $RPM_BUILD_ROOT%{_libdir}/python2.7/site-packages/* $RPM_BUILD_ROOT%{python_sitelib}
+fi
+
+
+%files
+%doc COPYING
+%{_libdir}/libgnuradio-osmosdr.so.0
+%{_libdir}/libgnuradio-osmosdr.so.0.1
+%{python_sitelib}/osmosdr/__init__.py
+%{python_sitelib}/osmosdr/__init__.pyc
+%{python_sitelib}/osmosdr/__init__.pyo
+%{python_sitelib}/osmosdr/_osmosdr_swig.so
+%{python_sitelib}/osmosdr/osmosdr_swig.py
+%{python_sitelib}/osmosdr/osmosdr_swig.pyc
+%{python_sitelib}/osmosdr/osmosdr_swig.pyo
+%{_datadir}/gnuradio/grc/blocks/osmosdr_source_c.xml
+%{_datadir}/gnuradio/grc/blocks/rtlsdr_source_c.xml
+
+
+%files devel
+%doc COPYING README
+%{_libdir}/libgnuradio-osmosdr.so
+%{_libdir}/pkgconfig/gnuradio-osmosdr.pc
+%{_includedir}/osmosdr/osmosdr_api.h
+%{_includedir}/osmosdr/osmosdr_device.h
+%{_includedir}/osmosdr/osmosdr_pimpl.h
+%{_includedir}/osmosdr/osmosdr_ranges.h
+%{_includedir}/osmosdr/osmosdr_source_c.h
+%{_includedir}/osmosdr/swig/osmosdr_swig.i
+%{_includedir}/osmosdr/swig/osmosdr_swig_doc.i
+
+
+%changelog
+* Wed Dec 05 2012 Richard W.M. Jones <rjones@redhat.com> 0-0.1
+- Initial release.