upgraded from the f12 source rpm
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 6 Jan 2010 17:27:21 +0000 (17:27 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Wed, 6 Jan 2010 17:27:21 +0000 (17:27 +0000)
10-usrp.rules [new file with mode: 0644]
gnuradio-3.2-libtool.patch [new file with mode: 0644]
gnuradio.spec

diff --git a/10-usrp.rules b/10-usrp.rules
new file mode 100644 (file)
index 0000000..554923a
--- /dev/null
@@ -0,0 +1,3 @@
+# rule to grant read/write access on USRP to group named usrp.
+# to use, install this file in /etc/udev/rules.d as 10-usrp.rules
+ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"
diff --git a/gnuradio-3.2-libtool.patch b/gnuradio-3.2-libtool.patch
new file mode 100644 (file)
index 0000000..7f51205
--- /dev/null
@@ -0,0 +1,14 @@
+Marek Mahut <mmahut@fedoraproject.org>: This patch fixes the build when libtool fails to detect that lib
+
+diff -Naur gnuradio-3.2-upstream/gnuradio-core/src/tests/Makefile.am gnuradio-3.2/gnuradio-core/src/tests/Makefile.am
+--- gnuradio-3.2-upstream/gnuradio-core/src/tests/Makefile.am  2009-07-25 09:14:01.090447704 +0200
++++ gnuradio-3.2/gnuradio-core/src/tests/Makefile.am   2009-07-25 09:25:12.681195057 +0200
+@@ -59,7 +59,7 @@
+       benchmark_dotprod
+-LIBGNURADIO =         $(GNURADIO_CORE_LA)
++LIBGNURADIO =         $(GNURADIO_CORE_LA) $(top_builddir)/omnithread/libgromnithread.la
+ LIBGNURADIOQA = $(top_builddir)/gnuradio-core/src/lib/libgnuradio-core-qa.la $(LIBGNURADIO)
+ benchmark_dotprod_fff_SOURCES = benchmark_dotprod_fff.cc
index f8cfc51..5f0277a 100644 (file)
@@ -19,7 +19,9 @@ Release: %{release}
 License: GPLv3
 URL: ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.2.tar.gz
 Group: Productivity/Hamradio/Other
-Source: %{actual_name}.tar.gz
+Source0: %{actual_name}.tar.gz
+Source1:       10-usrp.rules
+Patch0:                gnuradio-3.2-libtool.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -39,30 +41,30 @@ gnuradio is a free software radio toolkit
 
 %prep
 %setup -q -n %{actual_name}
+%patch0 -p1 -b .libtool
 
 
 %build
 export PKG_CONFIG_PATH="/usr/lib/pkgconfig"
 # dirty hack to let gnuradio configure find sdcc
-export PATH=$PATH:/usr/libexec/sdcc
+export PATH=%{_libexecdir}/sdcc:$PATH
 
 ########## the bootstrap script basically reruns autoconf and automake
 %if "%{distro}" == "Fedora" && %{distrorelease} >= 12
-### the code in bootstrapfs reads
-### aclocal -I config
-# we suppress the -I config so that e.g. the libtool macros used are the ones from the system, 
-# not the one that ships in config/
-sed -i -e "s,aclocal -I config,aclocal," ./bootstrap
-%endif
-
+autoreconf -i
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+%else
 bash -x ./bootstrap
+%endif
 
 %configure --disable-doxygen
-make
+make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-mkdir $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+install -D -m0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/10-usrp.rules
 
 #make DESTDIR=$RPM_BUILD_ROOT install
 %makeinstall