From faaeefa27985152bf5facdb4f58efb86d826fac7 Mon Sep 17 00:00:00 2001 From: thierry Date: Thu, 8 Oct 2009 15:31:23 +0000 Subject: [PATCH] initial version --- Makefile | 51 +++++++++++++++++++ gnuradio.spec | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 185 insertions(+) create mode 100644 Makefile create mode 100644 gnuradio.spec diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..85f6f05 --- /dev/null +++ b/Makefile @@ -0,0 +1,51 @@ +# $Id$ +WEBFETCH := wget +SHA1SUM = sha1sum + +# default - overridden by the build +SPECFILE = gnuradio.spec + +main.URL := ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.2.tar.gz +main.SHA1SUM := 6177d13e42937383e622edadc0b9f06391d0e5fc +main.FILE := $(notdir $(main.URL)) + +# Thierry - when called from within the build, PWD is /build +SOURCEFILES := $(main.FILE) + +$(main.FILE): #FORCE + @if [ ! -e "$@" ] ; then echo "$(WEBFETCH) $(main.URL)" ; $(WEBFETCH) $(main.URL) ; fi + @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi + @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(main.SHA1SUM)" ; then \ + echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \ + echo "Local copy: $$(sha1sum $@)" ; \ + echo "In sources: $$(grep $@ sources)" ; \ + exit 1 ; \ + else \ + ls -l $@ ; \ + fi + +sources: $(SOURCEFILES) +.PHONY: sources + +PWD=$(shell pwd) +PREPARCH ?= noarch +RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)" +trees: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE) + +srpm: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE) + +TARGET ?= $(shell uname -m) +rpm: sources + rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE) + +clean: + rm -f *.rpm *.tgz *.bz2 *.gz + +++%: varname=$(subst +,,$@) +++%: + @echo "$(varname)=$($(varname))" ++%: varname=$(subst +,,$@) ++%: + @echo "$($(varname))" diff --git a/gnuradio.spec b/gnuradio.spec new file mode 100644 index 0000000..98b89cd --- /dev/null +++ b/gnuradio.spec @@ -0,0 +1,134 @@ +# SPEC file for gnuradio +# +# +# Source: ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.2.tar.gz +# +# Signature: ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.2.2.tar.gz.sig +# +%define name gnuradio +%define version 3.2.2 +%define release 2.1 +%define actual_name %{name}-%{version} + +Name: %{name} +Summary: GNU software radio +Version: %{version} +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 + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + +BuildRequires: python python-numeric PyQt4 swig fftw sdcc gsl libtool +BuildRequires: subversion guile cppunit gcc gcc-c++ make +BuildRequires: boost-devel >= 1.35 +BuildRequires: python-devel fftw-devel boost-devel gsl-devel libusb-devel +BuildRequires: cppunit-devel + + +Requires: python python-numeric PyQt4 swig fftw libtool +Requires: boost >= 1.35 + +%description +gnuradio is a free software radio toolkit + +%prep + +%setup -q -n %{actual_name} + + +%build +PKG_CONFIG_PATH="/usr/lib/pkgconfig" +export PKG_CONFIG_PATH +# Following export PATH is a dirty hack to let gnuradio configure find sdcc +PATH=$PATH:/usr/libexec/sdcc +export PATH +./bootstrap +#./configure +%configure +make + +%install +rm -rf $RPM_BUILD_ROOT +mkdir $RPM_BUILD_ROOT + +#make DESTDIR=$RPM_BUILD_ROOT install +%makeinstall + +%post +echo 'export PYTHONPATH=/usr/lib/python2.5/site-packages/' >> ~/.bashrc +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%clean +rm -rf $RPM_BUILD_ROOT + + + + + + + +%package -n %{name}-devel +Summary: gnuradio devel files +Version: %{version} +Release: %{release} +Group: Productivity/Hamradio/Other +Requires: gnuradio + +%description -n %{name}-devel +Devel package of gnuradio + +%post -n %{name}-devel +/sbin/ldconfig + +%postun -n %{name}-devel +/sbin/ldconfig + +%files -n %{name}-devel +%defattr(-,root,root,-) +%{_includedir}/* +%{_libdir}/pkgconfig/* +%{_libdir}/lib*.la + + +%files -n %{name} +%defattr(-,root,root,-) +%{_bindir}/* +%dir /etc/gnuradio +%config /etc/gnuradio/* +%{_libdir}/lib*so* +%{_libdir}/python2.5/site-packages/ +%{_datadir}/doc/* +%dir %{_datadir}/gnuradio +%{_datadir}/gnuradio/* +%dir %{_datadir}/usrp +%{_datadir}/usrp/* +# TO FIX: if the 2 following commands are removed, the rpmbuild fails! +# It's w+eird because rev2 and rev3 directories are indeed created at the +# right place (/usr/share/rev*) when the rpm is installed... +%{_datadir}/rev2/* +%{_datadir}/rev4/* +%doc AUTHORS README README.hacking ChangeLog NEWS INSTALL COPYING + + + + + +%changelog -n gnuradio +* Wed Oct 8 2009 Thierry Turletti 3.2.2-2.1 +- fixed lots of missing parameters... + +* Thu Oct 1 2009 Thierry Turletti 3.2.2-2.0 +- derived from previous gnuradio-3.2 spec file written by Ben Yahmed Maher . Changes made to compile the new 3.2.2 gnuradio version on F10 with both USRP and USRP2 hardware enabled. + +* Wed Apr 1 2009 Ben Yahmed Maher 3.2.2-1.2 +- change to svn 10720 with fedora 10 + + + -- 2.43.0