rename bbn into bbn_80211
authorthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Tue, 13 Oct 2009 12:53:36 +0000 (12:53 +0000)
committerthierry <thierry@41d37cc5-eb28-0410-a9bf-d37491348ade>
Tue, 13 Oct 2009 12:53:36 +0000 (12:53 +0000)
Makefile [new file with mode: 0644]
bbn_80211.spec [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..6bf056a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,51 @@
+# $Id$
+WEBFETCH       := wget
+SHA1SUM        = sha1sum
+
+# default - overridden by the build
+SPECFILE = bbn.spec
+
+main.URL       := http://mirror.onelab.eu/third-party/bbn_80211-3.2.2.tar.gz
+main.SHA1SUM    := 76a67154ba845b8c6eed2d2ab5b82def3f9d3961
+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/bbn_80211.spec b/bbn_80211.spec
new file mode 100644 (file)
index 0000000..3722530
--- /dev/null
@@ -0,0 +1,85 @@
+# SPEC file for bbn_80211
+#
+#
+# Original source from https://128.2.212.19/wiki/BBN80211
+# Ben Maher Yahmed fix to let compile it with gnuradio 3.2.2 and USRP2
+# Version 3.2.2 is the same than for gnuradio
+# File: bbn_80211.tar.gz stored locally at:
+#
+%define name bbn_80211
+%define version 3.2.2 
+%define release 1.0
+%define actual_name %{name}-%{version}
+
+Name: %{name}
+Summary: Very basic 802.11 transceiver code from BBN
+Version: %{version}
+Release: %{release}
+License: GPLv2
+URL: https://128.2.212.19/wiki/BBN80211
+Group: BBN
+Source: %{actual_name}.tar.gz
+BuildRoot: %{_tmppath}/%{actual_name}
+
+
+BuildRequires:  swig gnuradio gnuradio-devel
+
+Requires: swig gnuradio
+
+%description
+Basic 802.11 transmitter and receiver, which is able 
+to decode low rate 802.11 packets from standard NICs 
+over the air reliably at 1Mbps and partially at 2Mbps. 
+
+%prep
+%setup -q -n %{actual_name}
+
+
+%build
+#PKG_CONFIG_PATH="/usr/lib/pkgconfig"
+#export PKG_CONFIG_PATH
+cd gr-bbn
+./configure --prefix=/usr 
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/%{actual_name}
+cp -pru gr-bbn $RPM_BUILD_ROOT%{_datadir}/%{actual_name}
+cd gr-bbn
+make DESTDIR=$RPM_BUILD_ROOT install
+
+
+%post
+ldconfig
+
+%postun
+ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files -n %{name}
+%defattr(-,root,root,-)
+%{_bindir}/*
+%{_includedir}/gnuradio/*
+%{_libdir}/python2.5/site-packages/
+%dir %{_datadir}/%{actual_name}
+%{_datadir}/%{actual_name}/*
+
+
+
+
+
+%changelog -n bbn_80211
+* Mon Oct 5 2009 Thierry Turletti <turletti@sophia.inria.fr> 3.2.2-1.1
+- fixed errors with rpmlint
+
+* Mon Oct 5 2009 Thierry Turletti <turletti@sophia.inria.fr> 3.2.2-1.0
+- first version
+
+
+
+