Changeset 3cb4ef5b for common/libs
- Timestamp:
- 10/05/2013 05:45:52 PM (11 years ago)
- Branches:
- 2.4, ablfs-more, legacy, new_features, trunk
- Children:
- 433a5d4
- Parents:
- ad4ff97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/libs/func_wrt_Makefile
rad4ff97 r3cb4ef5b 59 59 60 60 61 #==== PACKAGES NAMES ===61 #==== PACKAGES NAMES AND VERSIONS ==== 62 62 63 63 #----------------------------------# … … 117 117 } 118 118 119 #----------------------------------# 120 get_package_version() { # 121 #----------------------------------# 122 # Those hacks may change depending on the invention of devs for tarball names. 123 # Normally, we expect -digit to signal the beginning of the version field 124 # but it may happen that there is no '-' (tcl, expect), that the version 125 # field is ddd-d (pkg-config-lite-028-1, since sed is greedy, it finds only 126 # the second dash) or that the first character of the version is not a digit 127 # (iputils-s20121221)... 128 case ${1} in 129 tcl*|expect*|tzdata*|xmlts*|unzip*|lynx*) 130 echo ${1} | sed -e 's@^[^[:digit:]]*@@' \ 131 -e 's@\(-src\)*\.tar.*@@' 132 ;; 133 iputils*) echo ${1} | sed -e 's@^.*-@@' \ 134 -e 's@\.tar.*@@' 135 ;; 136 LVM*) echo ${1} | sed -e 's@^[^.]*\.@@' \ 137 -e 's@\.tgz.*@@' 138 ;; 139 iproute*) echo ${1} | sed -e 's@^[^-]*-@@' \ 140 -e 's@\.tar.*@@' 141 ;; 142 pkg*|udev*|Singular*) 143 echo ${1} | sed -e 's@^.*[a-z]-\([[:digit:]]\)@\1@' \ 144 -e 's@\.tar.*@@' \ 145 -e 's@\.zip.*@@' 146 ;; 147 *) echo ${1} | sed -e 's@^.*[-_]\([[:digit:]]\)@\1@' \ 148 -e 's@\.tar.*@@' \ 149 -e 's@\.zip.*@@' 150 ;; 151 esac 152 153 } 119 154 #======================= 120 155 … … 127 162 local i=$1 128 163 local PREV=$2 164 local version 165 if [ "$3" != "" ]; then 166 version=-$3 167 fi 129 168 ( 130 169 cat << EOF … … 133 172 @\$(call echo_message, Building) 134 173 ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & 135 @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@ 136 @\$(PRT_DU) >>logs/\$@ 174 @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version 175 @\$(PRT_DU) >>logs/\$@$version 137 176 EOF 138 177 ) >> $MKFILE.tmp … … 144 183 local i=$1 145 184 local PREV=$2 185 local version 186 if [ "$3" != "" ]; then 187 version=-$3 188 fi 146 189 ( 147 190 cat << EOF … … 150 193 @\$(call echo_message, Building) 151 194 ${NO_PROGRESS} @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & 152 @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@ 153 @\$(PRT_DU_CR) >>logs/\$@ 195 @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@$version 196 @\$(PRT_DU_CR) >>logs/\$@$version 154 197 EOF 155 198 ) >> $MKFILE.tmp … … 212 255 LUSER_wrt_test_log() { # Initialize testsuite log file 213 256 #----------------------------------# 214 local TESTLOGFILE=$1 257 local version 258 if [ "$2" != "" ]; then 259 version=-$2 260 fi 261 local TESTLOGFILE=$1$version 215 262 ( 216 263 cat << EOF 217 264 @echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\ 218 echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/ \$@265 echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/$TESTLOGFILE 219 266 EOF 220 267 ) >> $MKFILE.tmp … … 224 271 CHROOT_wrt_test_log() { # 225 272 #----------------------------------# 226 local TESTLOGFILE=$1 273 local version 274 if [ "$2" != "" ]; then 275 version=-$2 276 fi 277 local TESTLOGFILE=$1$version 227 278 ( 228 279 cat << EOF 229 280 @echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\ 230 echo "\$(nl_)\`date\`\$(nl_)" > test-logs/\$@281 echo "\$(nl_)\`date\`\$(nl_)" >\$(crTESTLOGDIR)/$TESTLOGFILE 231 282 EOF 232 283 ) >> $MKFILE.tmp … … 242 293 #----------------------------------# 243 294 local MOUNT_ENV 295 local version 296 if [ "$2" != "" ]; then 297 version=-$2 298 fi 244 299 local file=$1 245 300 … … 256 311 cat << EOF 257 312 @export ${MOUNT_ENV}=\$(MOUNT_PT) && \\ 258 ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\259 \$(PRT_DU) >>logs/\$@ 313 ${PROGNAME}-commands/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\ 314 \$(PRT_DU) >>logs/\$@$version 260 315 EOF 261 316 ) >> $MKFILE.tmp … … 266 321 #----------------------------------# 267 322 local file=$1 323 local version 324 if [ "$2" != "" ]; then 325 version=-$2 326 fi 268 327 269 328 ( 270 329 cat << EOF 271 330 @source ~/.bashrc && \\ 272 \$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@ 2>&1 && \\273 \$(PRT_DU) >>logs/\$@ 331 \$(CMDSDIR)/`dirname $file`/\$@ >> logs/\$@$version 2>&1 && \\ 332 \$(PRT_DU) >>logs/\$@$version 274 333 EOF 275 334 ) >> $MKFILE.tmp … … 280 339 #----------------------------------# 281 340 local file=$1 341 local version 342 if [ "$2" != "" ]; then 343 version=-$2 344 fi 282 345 ( 283 346 cat << EOF 284 347 @source envars && \\ 285 \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@ 2>&1 && \\286 \$(PRT_DU_CR) >>logs/\$@ 348 \$(crCMDSDIR)/`dirname $file`/\$@ >>logs/\$@$version 2>&1 && \\ 349 \$(PRT_DU_CR) >>logs/\$@$version 287 350 EOF 288 351 ) >> $MKFILE.tmp
Note:
See TracChangeset
for help on using the changeset viewer.