Package: ipw3945-source Version: 1.1.2-6 Severity: normal Tags: patch There are a few bashisms in the Makefile relating to array construction using () and usage of the bash-specific [[ ]] test, but SHELL is not set to /bin/bash. I noticed that most of the scripts use bash explicitly, so to match the solution might be to just set SHELL = /bin/bash in the Makefile. However, out of hope for avoiding this requirement I have attached a patch that just replaces the bashisms. (It also fixes a non-bash related bug on line 232 where if no .c or .h files exist clean will fail)
I hope you find it useful, Kevin -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/dash Kernel: Linux 2.6.18.20061008a Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages ipw3945-source depends on: ii bzip2 1.0.3-6 high-quality block-sorting file co ii debhelper 5.0.42 helper programs for debian/rules ii dpatch 2.0.21 patch maintenance system for Debia ii make 3.81-2 The GNU version of the "make" util ii module-assistant 0.10.8 tool to make module package creati ipw3945-source recommends no packages. -- no debconf information
--- Makefile 2006-12-09 13:46:35.000000000 -0500 +++ Makefile 2006-12-09 13:50:50.000000000 -0500 @@ -70,8 +70,8 @@ $(IEEE80211_INC)) endif -IEEE80211_BASE := $(shell var=($(IEEE80211_RES)) ; echo $${var[1]}) -IEEE80211_PATH := $(shell var=($(IEEE80211_RES)) ; echo $${var[0]}) +IEEE80211_BASE := $(word 2, $(IEEE80211_RES)) +IEEE80211_PATH := $(word 1, $(IEEE80211_RES)) # If the ieee80211 subsystem is not found in the default kernel # build location then we need to add the include path and @@ -90,9 +90,10 @@ IEEE80211_API := $(shell sed -ne "s:\#define.*IEEE80211_API_VERSION[^0-9]*\([0-9]*\).*:\1:p" $(IEEE80211_PATH)net/ieee80211.h) ifeq ($(IEEE80211_API),) - IEEE80211_API := $(shell [[ "$(IEEE80211_VER)" == 1.1.14* || "$(IEEE80211_VER)" == git-1.1.1[3-9]* ]] && \ - { echo "2" ; } || \ - { ver=$(IEEE80211_VER); ver=$${ver\#*.} ; echo $${ver%.*} ; }) + IEEE80211_API := $(shell ver="$(IEEE80211_VER)"; \ + if [ -z "$${ver\#\#1.1.14*}" ] || [ -z "$${ver\#\#git-1.1.1[3-9]*}" ] ; then \ + echo "2" ; else \ + ver=$${ver\#*.} ; echo $${ver%.*} ; fi) EXTRA_CFLAGS += -DIEEE80211_API_VERSION=$(IEEE80211_API) endif @@ -230,7 +231,9 @@ rm -f *.{mod.c,mod,o,ko,rej,orig} .*.{stamp,flags,cmd} .lst *.lst *~ rm -rf $(DIR)/tmp $(DIR)/.tmp_versions for file in *.{c,h}; do \ - sed -i -e "s:\ *$$::g" -e "s:\t*$$::g" $$file; \ + if [ -f "$$file" ] ; then \ + sed -i -e "s:\ *$$::g" -e "s:\t*$$::g" "$$file"; \ + fi \ done distclean: clean