Update nbdkit:
[fedora-specs.git] / gr-osmosdr.spec
1 %global gitdate 20121205
2
3 Name:           gr-osmosdr
4 Version:        0
5 Release:        0.1.git%{gitdate}%{?dist}
6 Summary:        GNU Radio block for Realtek RTL2832U
7
8 License:        GPLv3
9 URL:            http://sdr.osmocom.org/trac/wiki/rtl-sdr
10
11 # To construct the source archive, update gitdate above and then do:
12 #   cd /tmp
13 #   rm -r gr-osmosdr
14 #   git clone git://git.osmocom.org/gr-osmosdr
15 #   cd gr-osmosdr
16 #   git archive -o ../gr-osmosdr-git%{gitdate}.tar.gz --prefix=gr-osmosdr/ HEAD
17 Source0:        gr-osmosdr-git%{gitdate}.tar.gz
18
19 # This BR list is by no means complete.  If there are missing
20 # dependencies, try 'yum-builddep gnuradio'.
21 BuildRequires:  rtl-sdr
22 BuildRequires:  gnuradio-devel
23 BuildRequires:  gcc-c++
24 BuildRequires:  boost-devel
25 BuildRequires:  cmake
26 BuildRequires:  python-devel
27 Requires:       gnuradio
28
29 # Python directories.
30 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
31 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
32
33
34 %description
35 GNU Radio port to Realtek RTL2832U.
36
37
38 %package devel
39 Summary:        GNU Radio block for Realtek RTL2832U
40 License:        GPLv3
41 Requires:       pkgconfig
42 Requires:       gr-osmosdr = %{version}-%{release}
43 Requires:       rtl-sdr-devel
44
45
46 %description devel
47 Development packages for %{name}.
48
49
50 %prep
51 %setup -q -n gr-osmosdr
52
53
54 %build
55 mkdir build
56 cd build
57 cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
58 make %{?_smp_mflags}
59
60
61 %install
62 cd build
63 %make_install
64
65 # It installs the Python libraries in /usr/lib64.  There's
66 # probably a CMake variable to fix this ... XXX
67 if [ "%{_libdir}/python2.7/site-packages" != "%{python_sitelib}" ]; then
68   mkdir -p $RPM_BUILD_ROOT%{python_sitelib}
69   mv $RPM_BUILD_ROOT%{_libdir}/python2.7/site-packages/* $RPM_BUILD_ROOT%{python_sitelib}
70 fi
71
72
73 %files
74 %doc COPYING
75 %{_libdir}/libgnuradio-osmosdr.so.0
76 %{_libdir}/libgnuradio-osmosdr.so.0.1
77 %{python_sitelib}/osmosdr/__init__.py
78 %{python_sitelib}/osmosdr/__init__.pyc
79 %{python_sitelib}/osmosdr/__init__.pyo
80 %{python_sitelib}/osmosdr/_osmosdr_swig.so
81 %{python_sitelib}/osmosdr/osmosdr_swig.py
82 %{python_sitelib}/osmosdr/osmosdr_swig.pyc
83 %{python_sitelib}/osmosdr/osmosdr_swig.pyo
84 %{_datadir}/gnuradio/grc/blocks/osmosdr_source_c.xml
85 %{_datadir}/gnuradio/grc/blocks/rtlsdr_source_c.xml
86
87
88 %files devel
89 %doc COPYING README
90 %{_libdir}/libgnuradio-osmosdr.so
91 %{_libdir}/pkgconfig/gnuradio-osmosdr.pc
92 %{_includedir}/osmosdr/osmosdr_api.h
93 %{_includedir}/osmosdr/osmosdr_device.h
94 %{_includedir}/osmosdr/osmosdr_pimpl.h
95 %{_includedir}/osmosdr/osmosdr_ranges.h
96 %{_includedir}/osmosdr/osmosdr_source_c.h
97 %{_includedir}/osmosdr/swig/osmosdr_swig.i
98 %{_includedir}/osmosdr/swig/osmosdr_swig_doc.i
99
100
101 %changelog
102 * Wed Dec 05 2012 Richard W.M. Jones <rjones@redhat.com> 0-0.1
103 - Initial release.