wok-next view linmodem-hsfmodem/stuff/hsfmodem-7.80.02.05full.diff @ rev 9123
bzlib: fix version in genpkg_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Mar 05 17:49:38 2011 +0100 (2011-03-05) |
parents | |
children |
line source
1 --- hsfmodem-7.80.02.05full/config.mak Fri Feb 20 22:30:12 2009
2 +++ hsfmodem-7.80.02.05full+patch2/config.mak Sun Apr 11 19:29:08 2010
3 @@ -131,4 +131,4 @@
4 -e "s!@SCR_SUPPORT@!`test ! \"$(IMPORTED_SCR_SUPPORT)\" = yes; echo $$?`!g" \
5 -e "s!@DMP_SUPPORT@!`test -z \"$(IMPORTED_DMP_SUPPORT)\"; echo $$?`!g" \
6 < $< > $@
7 - chmod --reference=$< $@
8 + chmod 755 $@
9 --- hsfmodem-7.80.02.05full/makefile Mon Feb 23 22:51:37 2009
10 +++ hsfmodem-7.80.02.05full+patch2/makefile Sun Apr 11 19:29:08 2010
11 @@ -149,7 +149,7 @@
12 ifeq ($(RPMOPTEVAL),yes)
13 RPMTARGETCPU=$(shell rpm --eval '%_target_cpu')
14 else
15 -RPMTARGETCPU=$(shell uname -i)
16 +RPMTARGETCPU=$(shell uname -m)
17 endif
19 ifneq ($(RPMOPTDEFINE),yes)
20 --- hsfmodem-7.80.02.05full/modules/Makefile Thu Oct 22 00:35:59 2009
21 +++ hsfmodem-7.80.02.05full+patch2/modules/Makefile Sun Apr 11 19:49:54 2010
22 @@ -20,7 +20,7 @@
23 include $(TOP)/config.mak
25 IMPORTED = $(TOP)/modules/imported
26 -MACHINE_ARCH := $(shell if uname --hardware-platform >/dev/null 2>&1 && ! uname --hardware-platform | grep -q "unknown"; then uname --hardware-platform; else uname --machine | sed 's/^i.86$$/i386/'; fi)
27 +MACHINE_ARCH := $(shell if uname -p >/dev/null 2>&1 && ! uname -p | grep -q "unknown"; then uname -p; else uname -m | sed 's/^i.86$$/i386/'; fi)
28 ifneq ($(subst powerpc,ppc,$(IMPORTED_ARCH)),$(MACHINE_ARCH))
29 $(warning *** WARNING: Trying to compile kernel modules on a $(MACHINE_ARCH) system while the installed $(CNXTTARGET) driver package is for $(IMPORTED_ARCH), this is likely to fail... ***)
30 endif
31 @@ -56,6 +56,7 @@
32 CNXT_KERNELSRC := /usr/src/kernel-headers-$(shell uname -r)
33 else
34 CNXT_KERNELSRC := /usr/src/linux
35 +CNXT_KERNELSRC := ../../../linux/linux-$(shell uname -r | sed s/-slitaz//)
36 endif
37 KERNELSRC_EXISTS := $(shell test -r ${CNXT_KERNELSRC}/include/linux/version.h && echo yes || echo no)
38 endif
40 --- hsfmodem-7.80.02.05full/nvm/linksame Fri Jan 13 20:23:51 2006
41 +++ hsfmodem-7.80.02.05full+patch2/nvm/linksame Sun Apr 11 19:29:08 2010
42 @@ -17,7 +17,7 @@
44 if $dryrun; then
45 echo "dry run.."
46 - find . -type f ! -empty -exec md5sum {} \; | sort | while read sum file ; do
47 + find . -type f ! -size 0 -exec md5sum {} \; | sort | while read sum file ; do
48 if [ "$sum" = "$prevsum" ] && cmp -s "$file" "$prevfile"; then
49 echo ln "$prevfile" "$file"
50 else
51 @@ -28,7 +28,7 @@
52 exit $?
53 fi
55 -find . -type f ! -empty -exec md5sum {} \; | sort | while read sum file ; do
56 +find . -type f ! -size 0 -exec md5sum {} \; | sort | while read sum file ; do
57 if [ "$sum" = "$prevsum" ] && cmp -s "$file" "$prevfile"; then
58 rm -f "$file"
59 echo ln "$prevfile" "$file"
60 --- hsfmodem-7.80.02.05full/nvm/makefile Wed Oct 1 17:23:26 2008
61 +++ hsfmodem-7.80.02.05full+patch2/nvm/makefile Sun Apr 11 19:29:08 2010
62 @@ -52,7 +52,7 @@
63 all: $(ALL)
65 $(NVMCVTDIR)/.linksame: $(NVMDIRS_CVT)
66 - cd $(NVMCVTDIR) && find . -type f ! -empty -exec md5sum {} ';' | sort | \
67 + cd $(NVMCVTDIR) && find . -type f ! -size 0 -exec md5sum {} ';' | sort | \
68 while read sum file ; do \
69 if [ "$$sum" = "$$prevsum" ] && cmp -s "$$file" "$$prevfile"; then \
70 rm -f "$$file"; \
71 --- hsfmodem-7.80.02.05full/scripts/cnxtconfig.in Thu Oct 22 00:35:59 2009
72 +++ hsfmodem-7.80.02.05full+patch2/scripts/cnxtconfig.in Sun Apr 11 19:29:08 2010
73 @@ -74,7 +74,7 @@
74 answer="${region}"
75 ;;
76 *)
77 - answer="`echo \"${answer}\" | tr '[a-z ]' '[A-Z_]'`"
78 + answer="`echo \"${answer}\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
79 ;;
80 esac
81 fi
82 @@ -109,15 +109,13 @@
83 {
84 # Try to guess what region we're in, using the timezone settings
86 - localtime_size="`/bin/ls -lL /etc/localtime 2>/dev/null | ${AWK} '{print $5}'`"
87 -
88 - if ! [ ${localtime_size} -gt 0 ]; then
89 + if [ ! -e /etc/TZ ]; then
90 return 1
91 fi
93 - zoneinfo_dir=/usr/share/zoneinfo
94 + zoneinfo_dir=/etc/hsfmodem
96 - if [ ! -d ${zoneinfo_dir} -o ! -f ${zoneinfo_dir}/zone.tab ]; then
97 + if [ ! -f ${zoneinfo_dir}/zone.tab ]; then
98 return 1
99 fi
101 @@ -206,18 +204,11 @@
102 iso_VN=00BC # VIETNAM
104 (
105 - cd ${zoneinfo_dir} 2>/dev/null || return 1
106 - find . -type f -size "${localtime_size}"c -print | sed 's@^\./@@' | \
107 - while read file; do
108 - cmp -s /etc/localtime $file || continue
109 -# in the egrep and sed regular expressions below, it is very important to
110 -# have tabs, not spaces
111 - egrep " $file( .*|\$)" ${zoneinfo_dir}/zone.tab
112 - done | sed -n '/^[^#]/s/ .*//p' | sort | uniq | \
113 - while read code; do
114 - eval "echo \${iso_${code}}"
115 - done | sort | uniq
116 + zone=`cat /etc/TZ`
117 + code=`grep $zone ${zoneinfo_dir}/zone.tab | awk '{print $1}' | sort | uniq`
118 + eval "echo \${iso_${code}}"
119 return 0
120 +
121 )
122 }
124 @@ -271,7 +262,7 @@
125 # The md5sum is used for input verification.
126 disptokey()
127 {
128 - k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9A-F\012]'`"
129 + k="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/FREE/00000000/' | tr -d -c '[0-9][A-F][\012]'`"
130 case $k in
131 00000000)
132 echo "$k"
133 @@ -1655,7 +1646,7 @@
134 update-modules
135 else
136 if ("$@" "${modulesconf}" | "${filter}"; cat ${f}) > ${modulesconf}.$$; then
137 - if ! cmp --silent ${modulesconf}.$$ ${modulesconf}; then
138 + if ! cmp -s ${modulesconf}.$$ ${modulesconf}; then
139 if ! cp ${modulesconf}.$$ ${modulesconf}; then
140 rm -f ${modulesconf}.$$ ${f}
141 exit 1
142 @@ -1681,7 +1672,7 @@
143 fi
145 if ("$@" "${modprobeconf}" | "${filter}"; cat ${f}) > ${modprobeconf}.$$; then
146 - if ! cmp --silent ${modprobeconf}.$$ ${modprobeconf}; then
147 + if ! cmp -s ${modprobeconf}.$$ ${modprobeconf}; then
148 if ! cp ${modprobeconf}.$$ ${modprobeconf}; then
149 rm -f ${modprobeconf}.$$ ${f}
150 exit 1
151 @@ -2214,6 +2205,10 @@
152 elif [ -d /var/lib/LST ]; then
153 OSDISTNAME=Caldera
154 OSDISTIDNT=caldera
155 + elif [ -f /etc/slitaz-release ]; then
156 + OSDISTNAME=SliTaz
157 + OSDISTIDNT=slitaz
158 + OSDISTVERS="`cat /etc/slitaz-release`"
159 fi
161 OSKERNNAME="`uname -s | tr '[A-Z]' '[a-z]'`"
162 @@ -2268,7 +2263,7 @@
164 dump_file()
165 {
166 - dump_cmd cat -v $@
167 + dump_cmd cat $@
168 }
170 dump_diagnostics()
171 @@ -2587,7 +2582,7 @@
172 fi
173 units="${specificunit}"
174 if [ -z "${units}" ]; then
175 - units=`ls --ignore=flush_nvm ${procdrvdir}`
176 + units=`ls ${procdrvdir} | grep -v flush_nvm`
178 if [ -z "${units}" ]; then
179 echo ""
180 @@ -2884,7 +2879,7 @@
181 explicitopt=true
182 do_cfgregion=true
183 if [ -n "$2" ]; then
184 - setregion="`echo \"$2\" | tr '[a-z ]' '[A-Z_]'`"
185 + setregion="`echo \"$2\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
186 fi
187 shift 2
188 ;;
189 @@ -2954,7 +2949,7 @@
191 # Accept --region <name> as equivalent to --region=<name>
192 if ${do_cfgregion} && [ $# -ge 1 -a -z "${setregion}" ]; then
193 - setregion="`echo \"$1\" | tr '[a-z ]' '[A-Z_]'`"
194 + setregion="`echo \"$1\" | tr '[a-z]' '[A-Z]' | sed 's/\s/_/g'`"
195 shift
196 fi
198 @@ -3033,7 +3028,7 @@
200 if ${do_cfgnewinstance}; then
201 if [ ! -d "${cnxtnvmdir}/dynamic/${newinstance}" ]; then
202 - mkdir --mode=700 --parents "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
203 + mkdir -m 700 -p "${cnxtnvmdir}/dynamic/${newinstance}" || exit $?
204 # The purpose of --info here is to ensure module reload:
205 (sleep 2; exec @CNXTTARGET@config --auto --region=AUTO --info) </dev/null >/dev/null 2>&1 &
206 fi