initial version
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Thu, 8 Oct 2009 15:31:23 +0000 (15:31 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Thu, 8 Oct 2009 15:31:23 +0000 (15:31 +0000)
Makefile [new file with mode: 0644]
gnuradio.spec [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 (file)
index 0000000..98b89cd
--- /dev/null
@@ -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 <turletti@sophia.inria.fr> 3.2.2-2.1
+- fixed lots of missing parameters...
+
+* Thu Oct 1 2009 Thierry Turletti <turletti@sophia.inria.fr> 3.2.2-2.0
+- derived from previous gnuradio-3.2 spec file written by Ben Yahmed Maher <ben.yahmed.maher@gmail.com>. 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 <ben.yahmed.maher@gmail.com> 3.2.2-1.2
+- change to svn 10720 with fedora 10
+
+
+