- Timestamp:
- 03/15/2017 09:06:17 PM (7 years ago)
- Branches:
- 2.4, ablfs-more, legacy, trunk
- Children:
- 8dc4646
- Parents:
- e5d44f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/xsl/scripts.xsl
re5d44f5 r39dc04a 73 73 <xsl:text>PKG_DIR=</xsl:text> 74 74 <xsl:value-of select="$filename"/> 75 <xsl:text>
</xsl:text> 75 <xsl:text> 76 SRC_DIR=${SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}} 77 BUILD_DIR=${BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}} 78 mkdir -p $SRC_DIR 79 mkdir -p $BUILD_DIR 80 81 </xsl:text> 76 82 <!-- Download code and build commands --> 77 83 <xsl:apply-templates select="sect2"/> 78 84 <!-- Clean-up --> 79 <xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text> 85 <xsl:text>cd $BUILD_DIR 86 [[ -n "$KEEP_FILES" ]] || </xsl:text> 80 87 <!-- In some case, some files in the build tree are owned 81 88 by root --> … … 100 107 <xsl:choose> 101 108 <xsl:when test="@role = 'package'"> 102 <xsl:text> mkdir -p $SRC_DIR/$PKG_DIR
</xsl:text>103 <xsl:text>cd $SRC_DIR/$PKG_DIR
</xsl:text>109 <xsl:text>cd $SRC_DIR 110 </xsl:text> 104 111 <!-- Download information is in bridgehead tags --> 105 112 <xsl:apply-templates select="bridgehead[@renderas='sect3']"/> … … 111 118 <xsl:when test="@role = 'installation'"> 112 119 <xsl:text> 120 cd $BUILD_DIR 113 121 find . -maxdepth 1 -mindepth 1 -type d | xargs </xsl:text> 114 122 <xsl:if test="$sudo='y'"> … … 118 126 case $PACKAGE in 119 127 *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma) 120 tar -xvf $ PACKAGE > unpacked128 tar -xvf $SRC_DIR/$PACKAGE > unpacked 121 129 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'` 122 130 ;; 123 131 *.tar.lz) 124 bsdtar -xvf $ PACKAGE 2> unpacked132 bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked 125 133 UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'` 126 134 ;; 127 135 *.zip) 128 zipinfo -1 $ PACKAGE > unpacked136 zipinfo -1 $SRC_DIR/$PACKAGE > unpacked 129 137 UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )" 130 138 if test $(wc -w <<< $UNPACKDIR) -eq 1; then 131 unzip $ PACKAGE139 unzip $SRC_DIR/$PACKAGE 132 140 else 133 141 UNPACKDIR=${PACKAGE%.zip} 134 unzip -d $UNPACKDIR $ PACKAGE142 unzip -d $UNPACKDIR $SRC_DIR/$PACKAGE 135 143 fi 136 144 ;; … … 215 223 <xsl:value-of select="$varname"/> 216 224 <xsl:text> ]] ; then
</xsl:text> 217 <!-- SRC_ARCHIVE may have subdirectories or not --> 225 <!-- This whole code becomes obsolete because now, it is there or we 226 download; keeping for now, and we may want to grab it from 227 SRC_ARCHIVE when SRC_SUBDIRS is set... 218 228 <xsl:text> if [[ -f $SRC_ARCHIVE/$PKG_DIR/$</xsl:text> 219 229 <xsl:value-of select="$varname"/> … … 231 241 <xsl:text> $</xsl:text> 232 242 <xsl:value-of select="$varname"/> 233 <xsl:text>
 else
</xsl:text> 243 <xsl:text>
 else
</xsl:text> --> 234 244 <!-- Download from upstream http --> 235 245 <xsl:if test="string-length($httpurl) > 10"> 236 <xsl:text> 246 <xsl:text> wget -T 30 -t 5 </xsl:text> 237 247 <xsl:value-of select="$httpurl"/> 238 248 <xsl:text> ||
</xsl:text> … … 240 250 <!-- Download from upstream ftp --> 241 251 <xsl:if test="string-length($ftpurl) > 10"> 242 <xsl:text> 252 <xsl:text> wget -T 30 -t 5 </xsl:text> 243 253 <xsl:value-of select="$ftpurl"/> 244 254 <xsl:text> ||
</xsl:text> 245 255 </xsl:if> 246 256 <!-- The FTP_SERVER mirror as a last resort --> 247 <xsl:text> 257 <xsl:text> wget -T 30 -t 5 ${FTP_SERVER}svn/</xsl:text> 248 258 <xsl:value-of select="$first_letter"/> 249 259 <xsl:text>/$</xsl:text> 250 260 <xsl:value-of select="$varname"/> 251 261 <xsl:text> 252 cp $</xsl:text>262 <!-- cp $</xsl:text> 253 263 <xsl:value-of select="$varname"/> 254 264 <xsl:text> $SRC_ARCHIVE 255 fi 265 fi--> 256 266 fi 257 267 </xsl:text> … … 262 272 <xsl:value-of select="$varname"/> 263 273 <xsl:text>" | md5sum -c - 274 </xsl:text> 275 </xsl:if> 276 <!-- link additional packages into $BUILD_DIR, because they are supposed to 277 be there--> 278 <xsl:if test="string($varname) != 'PACKAGE'"> 279 <xsl:text> 280 [[ "$SRC_DIR" != "$BUILD_DIR" ]] && ln -sf $SRC_DIR/$</xsl:text> 281 <xsl:value-of select="$varname"/> 282 <xsl:text> $BUILD_DIR 264 283 </xsl:text> 265 284 </xsl:if>
Note:
See TracChangeset
for help on using the changeset viewer.