From 627428a5b290662fc44788af30b768805970c132 Mon Sep 17 00:00:00 2001 From: thierry Date: Tue, 13 Oct 2009 12:53:36 +0000 Subject: [PATCH] rename bbn into bbn_80211 --- Makefile | 51 ++++++++++++++++++++++++++++++ bbn_80211.spec | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) create mode 100644 Makefile create mode 100644 bbn_80211.spec diff --git a/Makefile b/Makefile new file mode 100644 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 index 0000000..3722530 --- /dev/null +++ b/bbn_80211.spec @@ -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 3.2.2-1.1 +- fixed errors with rpmlint + +* Mon Oct 5 2009 Thierry Turletti 3.2.2-1.0 +- first version + + + + -- 2.43.0