Changeset 1fa0dee
- Timestamp:
- 01/30/2018 01:53:34 PM (6 years ago)
- Branches:
- ablfs-more, legacy, trunk
- Children:
- 5afaf7c
- Parents:
- 2140f22
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
BLFS/envars.conf
r2140f22 r1fa0dee 12 12 13 13 #--- The build directory: 14 # - If BUILD_SUBDIRS is set, this directory contains sub directories14 # - If JH_BUILD_SUBDIRS is set, this directory contains sub directories 15 15 # (one for each package), where packages are unpacked, and compiled. 16 # - If BUILD_SUBDIRS is unset, packages are unpacked, and compiled directly17 # in $BUILD_ROOT.18 export BUILD_ROOT=/sources19 export BUILD_SUBDIRS=116 # - If JH_BUILD_SUBDIRS is unset, packages are unpacked, and compiled 17 # directly in $JH_BUILD_ROOT. 18 export JH_BUILD_ROOT=/sources 19 export JH_BUILD_SUBDIRS=1 20 20 21 21 #--- The local repository for packages/file: 22 22 # Any missing file will be downloaded and archived either: 23 # - into a subdirectory (one for each page of the book) fothis directory,24 # if SRC_SUBDIRS is set.25 # - directly into this directory if SRC_SUBDIRS is unset.26 # This directory can be the same as $ BUILD_ROOT, providedBUILD_SUBDIRS27 # and SRC_SUBDIRS are different.28 export SRC_ARCHIVE=/sources29 unset SRC_SUBDIRS23 # - into a subdirectory (one for each page of the book) of this directory, 24 # if JH_SRC_SUBDIRS is set. 25 # - directly into this directory if JH_SRC_SUBDIRS is unset. 26 # This directory can be the same as $JH_BUILD_ROOT, provided JH_BUILD_SUBDIRS 27 # and JH_SRC_SUBDIRS are different. 28 export JH_SRC_ARCHIVE=/sources 29 unset JH_SRC_SUBDIRS 30 30 31 31 #--- Set a well-known working locale when building software … … 44 44 # http://www.linuxfromscratch.org/blfs/download.html. 45 45 # Note that despite the name of the variable, it can be an http url. 46 export FTP_SERVER=http://ftp.osuosl.org/pub/blfs/46 export JH_FTP_SERVER=http://ftp.osuosl.org/pub/blfs/ 47 47 48 48 #--- Keep the buid directory to examine it: 49 # If KEEP_FILES is unset, the extracted tarball is removed after build.49 # If JH_KEEP_FILES is unset, the extracted tarball is removed after build. 50 50 # Otherwise, the build tree is kept for later study. 51 #export KEEP_FILES=152 unset KEEP_FILES51 #export JH_KEEP_FILES=1 52 unset JH_KEEP_FILES 53 53 54 54 ### Currently not used in scripts ### … … 99 99 # installing. 100 100 101 export PACK_INSTALL=/blfs_root/packInstall.sh # change as needed101 export JH_PACK_INSTALL=/blfs_root/packInstall.sh # change as needed -
BLFS/xsl/scripts.xsl
r2140f22 r1fa0dee 88 88 if using package management (see envars.conf), so 89 89 "export" it --> 90 <xsl:text>export PKG_DIR=</xsl:text>90 <xsl:text>export JH_PKG_DIR=</xsl:text> 91 91 <xsl:value-of select="$filename"/> 92 92 <xsl:text> 93 SRC_DIR=${ SRC_ARCHIVE}${SRC_SUBDIRS:+/${PKG_DIR}}94 BUILD_DIR=${ BUILD_ROOT}${BUILD_SUBDIRS:+/${PKG_DIR}}93 SRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${JH_PKG_DIR}} 94 BUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${JH_PKG_DIR}} 95 95 mkdir -p $SRC_DIR 96 96 mkdir -p $BUILD_DIR … … 101 101 <!-- Clean-up --> 102 102 <xsl:text>cd $BUILD_DIR 103 [[ -n "$ KEEP_FILES" ]] || </xsl:text>103 [[ -n "$JH_KEEP_FILES" ]] || </xsl:text> 104 104 <!-- In some case, some files in the build tree are owned 105 105 by root --> … … 107 107 <xsl:text>sudo </xsl:text> 108 108 </xsl:if> 109 <xsl:text>rm -rf $ UNPACKDIR unpacked

</xsl:text>109 <xsl:text>rm -rf $JH_UNPACKDIR unpacked

</xsl:text> 110 110 </xsl:when> 111 111 <!-- Non-package page --> … … 144 144 *.tar.gz|*.tar.bz2|*.tar.xz|*.tgz|*.tar.lzma) 145 145 tar -xvf $SRC_DIR/$PACKAGE > unpacked 146 UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'`146 JH_UNPACKDIR=`grep '[^./]\+' unpacked | head -n1 | sed 's@^\./@@;s@/.*@@'` 147 147 ;; 148 148 *.tar.lz) 149 149 bsdtar -xvf $SRC_DIR/$PACKAGE 2> unpacked 150 UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'`150 JH_UNPACKDIR=`head -n1 unpacked | cut -d" " -f2 | sed 's@^\./@@;s@/.*@@'` 151 151 ;; 152 152 *.zip) 153 153 zipinfo -1 $SRC_DIR/$PACKAGE > unpacked 154 UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )"155 if test $(wc -w <<< $ UNPACKDIR) -eq 1; then154 JH_UNPACKDIR="$(sed 's@/.*@@' unpacked | uniq )" 155 if test $(wc -w <<< $JH_UNPACKDIR) -eq 1; then 156 156 unzip $SRC_DIR/$PACKAGE 157 157 else 158 UNPACKDIR=${PACKAGE%.zip}159 unzip -d $ UNPACKDIR $SRC_DIR/$PACKAGE158 JH_UNPACKDIR=${PACKAGE%.zip} 159 unzip -d $JH_UNPACKDIR $SRC_DIR/$PACKAGE 160 160 fi 161 161 ;; 162 162 *) 163 UNPACKDIR=$PKG_DIR-build164 mkdir $ UNPACKDIR165 cp $SRC_DIR/$PACKAGE $ UNPACKDIR166 cp $(find . -mindepth 1 -maxdepth 1 -type l) $ UNPACKDIR163 JH_UNPACKDIR=$JH_PKG_DIR-build 164 mkdir $JH_UNPACKDIR 165 cp $SRC_DIR/$PACKAGE $JH_UNPACKDIR 166 cp $(find . -mindepth 1 -maxdepth 1 -type l) $JH_UNPACKDIR 167 167 ;; 168 168 esac 169 export UNPACKDIR170 cd $ UNPACKDIR
169 export JH_UNPACKDIR 170 cd $JH_UNPACKDIR
 171 171 </xsl:text> 172 172 <xsl:apply-templates select=".//screen | .//para/command"/> … … 242 242 <xsl:value-of select="$varname"/> 243 243 <xsl:text> ]] ; then 244 if [[ -f $ SRC_ARCHIVE/$</xsl:text>244 if [[ -f $JH_SRC_ARCHIVE/$</xsl:text> 245 245 <xsl:value-of select="$varname"/> 246 246 <xsl:text> ]] ; then
</xsl:text> 247 <xsl:text> cp $ SRC_ARCHIVE/$</xsl:text>247 <xsl:text> cp $JH_SRC_ARCHIVE/$</xsl:text> 248 248 <xsl:value-of select="$varname"/> 249 249 <xsl:text> $</xsl:text> … … 264 264 </xsl:if> 265 265 <!-- The FTP_SERVER mirror as a last resort --> 266 <xsl:text> wget -T 30 -t 5 ${ FTP_SERVER}svn/</xsl:text>266 <xsl:text> wget -T 30 -t 5 ${JH_FTP_SERVER}svn/</xsl:text> 267 267 <xsl:value-of select="$first_letter"/> 268 268 <xsl:text>/$</xsl:text> 269 269 <xsl:value-of select="$varname"/> 270 <xsl:text><!-- 271 cp $</xsl:text> 272 <xsl:value-of select="$varname"/> 273 <xsl:text> $SRC_ARCHIVE--> 270 <xsl:text> 274 271 fi 275 272 fi … … 432 429 <xsl:if test="$wrap-install = 'y' and 433 430 ancestor::sect2[@role='installation']"> 434 <xsl:text>if [ -r "$ PACK_INSTALL" ]; then435 source $ PACK_INSTALL431 <xsl:text>if [ -r "$JH_PACK_INSTALL" ]; then 432 source $JH_PACK_INSTALL 436 433 export -f wrapInstall 437 434 export -f packInstall … … 472 469 <xsl:copy-of select="$bootpkg"/> 473 470 <xsl:text> 474 BOOTSRC_DIR=${ SRC_ARCHIVE}${SRC_SUBDIRS:+/${BOOTPKG_DIR}}475 BOOTBUILD_DIR=${ BUILD_ROOT}${BUILD_SUBDIRS:+/${BOOTPKG_DIR}}471 BOOTSRC_DIR=${JH_SRC_ARCHIVE}${JH_SRC_SUBDIRS:+/${BOOTPKG_DIR}} 472 BOOTBUILD_DIR=${JH_BUILD_ROOT}${JH_BUILD_SUBDIRS:+/${BOOTPKG_DIR}} 476 473 mkdir -p $BOOTSRC_DIR 477 474 mkdir -p $BOOTBUILD_DIR … … 483 480 BOOTPACKG=$(basename $URL) 484 481 if [[ ! -f $BOOTPACKG ]] ; then 485 if [[ -f $ SRC_ARCHIVE/$BOOTPACKG ]] ; then486 cp $ SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG482 if [[ -f $JH_SRC_ARCHIVE/$BOOTPACKG ]] ; then 483 cp $JH_SRC_ARCHIVE/$BOOTPACKG $BOOTPACKG 487 484 else 488 485 wget -T 30 -t 5 $URL -
README.BLFS
r2140f22 r1fa0dee 266 266 IMPORTANT: Review and edit envars.conf, at least after installing the 267 267 tool. This file is used to set global envars needed by the build scripts. 268 If you use package management, the variable PACK_INSTALL should point to269 where the packInstall.sh script resides.268 If you use package management, the variable JH_PACK_INSTALL should point to 269 the directory where the packInstall.sh script resides. 270 270 271 271 4.4 CREATING THE MAKEFILE:: -
common/libs/func_install_blfs
r2140f22 r1fa0dee 14 14 cp README.BLFS ${BUILDDIR}${BLFS_ROOT} 15 15 if [ "$WRAP_INSTALL" = y ]; then 16 sed -e 's/PKGDIR/ UNPACKDIR/' \17 -e 's/PKG_DEST/ PKG_DIR/' \16 sed -e 's/PKGDIR/JH_UNPACKDIR/' \ 17 -e 's/PKG_DEST/JH_PKG_DIR/' \ 18 18 $PKGMNGTDIR/packInstall.sh > ${BUILDDIR}${BLFS_ROOT}/packInstall.sh 19 19 fi … … 145 145 echo -e '#!/bin/bash\nset -e\n' > $BUILDDIR$BLFS_ROOT/download_script 146 146 sed -n -e '/PACKAGE=/,/^fi/{/^fi/a\ 147 cp $PACKAGE $ SRC_ARCHIVE147 cp $PACKAGE $JH_SRC_ARCHIVE 148 148 p}' \ 149 149 -e '/|[ ]*md5sum/p' \ 150 150 -e '/PACKAGE1=/,/^fi/{/^fi/a\ 151 cp $PACKAGE1 $ SRC_ARCHIVE151 cp $PACKAGE1 $JH_SRC_ARCHIVE 152 152 p}' \ 153 153 -e '/PATCH=/,/^fi/{/^fi/a\ 154 cp $PATCH $ SRC_ARCHIVE154 cp $PATCH $JH_SRC_ARCHIVE 155 155 p}' \ 156 156 -e '/URL=/,/^fi/{/^fi/a\ 157 cp $BOOTPACKG $ SRC_ARCHIVE157 cp $BOOTPACKG $JH_SRC_ARCHIVE 158 158 p}' \ 159 159 $BUILDDIR$BLFS_ROOT/scripts/* >> $BUILDDIR$BLFS_ROOT/download_script … … 165 165 sudo find . -name unpacked -exec rm \{\} \; 166 166 if [ "$GETPKG" = "y" ]; then 167 FTP_SERVER=$SERVER/pub/blfs/ \168 SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \167 JH_FTP_SERVER=$SERVER/pub/blfs/ \ 168 JH_SRC_ARCHIVE=${SRC_ARCHIVE:-/dev/null} \ 169 169 $BUILDDIR$BLFS_ROOT/download_script 170 170 else # Save the download script in case the user wants to run it later -
pkgmngt/packInstall.sh.porg
r2140f22 r1fa0dee 23 23 ;; 24 24 icu*) # No version in PCKGVRS! Use version directly from xml book. 25 # PACK_INSTALL contains the path to this script, which is in the25 # JH_PACK_INSTALL contains the path to this script, which is in the 26 26 # parent dir of the book. 27 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/packages.ent27 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent 28 28 local VERSION1=$(sed -n 's/.*icu-major[^0-9]*\([^"]*\).*/\1/p' $PACKENT) 29 29 local VERSION2=$(sed -n 's/.*icu-minor[^0-9]*\([^"]*\).*/\1/p' $PACKENT) … … 31 31 ;; 32 32 exiv*) 33 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/packages.ent33 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent 34 34 VERSION=$(sed -n 's/.*exiv2[^0-9]*\([^"]*\).*/\1/p' $PACKENT) 35 35 ;; 36 36 flashplayer*) 37 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/packages.ent37 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent 38 38 VERSION=$(sed -n 's/.*flashplayer[^0-9]*\([^"]*\).*/\1/p' $PACKENT) 39 39 ;; 40 40 soundtouch*) 41 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/packages.ent41 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent 42 42 VERSION=$(sed -n 's/.*soundtouch[^0-9]*\([^"]*\).*/\1/p' $PACKENT) 43 43 ;; 44 44 xvid*) 45 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/packages.ent45 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/packages.ent 46 46 VERSION=$(sed -n 's/.*xvid[^0-9]*\([^"]*\).*/\1/p' $PACKENT) 47 47 ;; 48 48 xf86-video-intel) 49 local PACKENT=$(dirname $ PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml49 local PACKENT=$(dirname $JH_PACK_INSTALL)/blfs-xml/x/installing/x7driver-intel.xml 50 50 VERSION=$(sed -n '/<!--/!s/.*-version[^;][^0-9]*\([^"]*\).*/\1/p' $PACKENT) 51 51 ;;
Note:
See TracChangeset
for help on using the changeset viewer.