- Timestamp:
- 12/15/2006 10:53:10 AM (18 years ago)
- Branches:
- 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
- Children:
- fcb540b
- Parents:
- 830f28d
- Location:
- common
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
common/libs/func_blfs_deps
r830f28d r3e7ceed 118 118 wrt_blfs_tool_targets() { # 119 119 #----------------------------------# 120 PREV="" 120 121 121 122 echo "${tab_}${GREEN}Processing... ${L_arrow}BLFS_TOOL ${R_arrow}" -
common/libs/func_custom_pkgs
r830f28d r3e7ceed 4 4 5 5 #----------------------------------# 6 add_CustomTools() {# Add any users supplied scripts6 wrt_CustomTools_target() { # Add any users supplied scripts 7 7 #----------------------------------# 8 PREV_SCRIPT="" 9 CUSTOM_LIST="" 8 PREV="" 10 9 11 echo " Adding custom packages... ${BOLD}START${OFF}"10 echo " Adding custom packages... ${BOLD}START${OFF}" 12 11 13 cd $JHALFSDIR14 > ${MKFILE}.tmp212 # Create the custom_tools scripts directory 13 mkdir -p custom-tools 15 14 16 # First some build commands and a placeholder for the build list. 17 # This will not cause problems if there are no custom scripts. 18 ( cat << xEOFx 19 20 21 mk_CUSTOM_TOOLS: 22 @\$(call echo_CHROOT_request) 23 @ sudo mkdir -p ${BUILDDIR}${TRACKING_DIR} 24 @( sudo \$(CHROOT2) "cd \$(SCRIPT_ROOT) && make CUSTOM_TOOLS") 25 @touch \$@ 26 27 CUSTOM_TOOLS: 28 xEOFx 29 ) >> ${MKFILE}.tmp2 30 31 32 for this_script in custom-commands/config/*; do 33 if [[ `basename ${this_script}` = "*" ]]; then 15 for file in $JHALFSDIR/custom-commands/*; do 16 if [[ `basename ${file}` = "*" ]]; then 34 17 break 35 18 fi 36 source $ this_script37 THIS_SCRIPT=$(basename ${this_script})38 echo "$tab_${GREEN}Adding${OFF} ${ THIS_SCRIPT}"19 source $file 20 this_script=$(basename ${file}) 21 echo "$tab_${GREEN}Adding${OFF} ${this_script}" 39 22 40 23 # Create a Makefile entry 41 24 if [[ "x${PKG}" = "x" ]]; then 42 # Create an entry for a self contained cmd script that does not reference a package tarball 43 ( cat << EOF 44 45 ${THIS_SCRIPT}: ${PREV_SCRIPT} 46 @\$(call echo_message, Building) 47 @./progress_bar.sh \$@ \$\$PPID & 48 @( time { source envars && /\$(SCRIPT_ROOT)/custom-commands/scripts/${THIS_SCRIPT} >>logs/${THIS_SCRIPT} 2>&1 ; } ) 2>>logs/${THIS_SCRIPT} 49 @touch \$@ 50 @\$(call housekeeping) 51 EOF 52 ) >> ${MKFILE}.tmp2 25 # Create an entry for a self contained cmd script that does not 26 # reference a package tarball 27 case $PROGNAME in 28 clfs2 | clfs3 ) 29 LUSER_wrt_target "${this_script}" "$PREV" 30 LUSER_wrt_RunAsUser "custom-tools/${this_script}" 31 ;; 32 *) 33 CHROOT_wrt_target "${this_script}" "$PREV" 34 CHROOT_wrt_RunAsRoot "custom-tools/${this_script}" 35 ;; 36 esac 37 wrt_touch 53 38 54 39 # Create the build script file … … 60 45 exit 61 46 xEOFx 62 ) > custom- commands/scripts/$THIS_SCRIPT47 ) > custom-tools/${this_script} 63 48 64 49 else 65 50 # Create an entry for package 66 ( cat << EOF 67 68 ${THIS_SCRIPT}: ${PREV_SCRIPT} 69 @\$(call echo_message, Building) 70 @./progress_bar.sh \$@ \$\$PPID & 71 @\$(call remove_existing_dirs2,${PKG_FILE}) 72 @\$(call unpack2,${PKG_FILE}) 73 @\$(call get_pkg_root2) 74 @( time { source envars && /\$(SCRIPT_ROOT)/custom-commands/scripts/${THIS_SCRIPT} >>logs/${THIS_SCRIPT} 2>&1 ; } ) 2>>logs/${THIS_SCRIPT} 75 @\$(call remove_build_dirs2,${PKG}) 76 @touch \$@ 77 @touch ${TRACKING_DIR}/${PKG}-${PKG_VERSION} 78 @\$(call housekeeping) 79 EOF 80 ) >> ${MKFILE}.tmp2 51 case $PROGNAME in 52 clfs2 | clfs3 ) 53 LUSER_wrt_target "${this_script}" "$PREV" 54 LUSER_wrt_unpack "${PKG_FILE}" 55 LUSER_wrt_RunAsUser "custom-tools/${this_script}" 56 LUSER_RemoveBuildDirs "${PKG}" 57 echo -e "\t@touch \$(MOUNT_PT)$TRACKING_DIR/${PKG}-${PKG_VERSION}" >> $MKFILE.tmp 58 ;; 59 *) 60 CHROOT_wrt_target "${this_script}" "$PREV" 61 CHROOT_Unpack "${PKG_FILE}" 62 CHROOT_wrt_RunAsRoot "custom-tools/${this_script}" 63 CHROOT_wrt_RemoveBuildDirs "${PKG}" 64 echo -e "\t@touch $TRACKING_DIR/${PKG}-${PKG_VERSION}" >> $MKFILE.tmp 65 ;; 66 esac 67 wrt_touch 81 68 82 69 # Create the build script file … … 89 76 exit 90 77 xEOFx 91 ) > custom- commands/scripts/$THIS_SCRIPT78 ) > custom-tools/$this_script 92 79 fi 93 80 94 chmod 755 custom-commands/scripts/$THIS_SCRIPT95 81 rm -f tmp 96 PREV _SCRIPT=$THIS_SCRIPT97 CUSTOM_LIST="${CUSTOM_LIST}${THIS_SCRIPT}"82 PREV=$this_script 83 custom_list="${custom_list} ${this_script}" 98 84 done 99 85 100 # Add the dependancy list. 101 sed "s|^CUSTOM_TOOLS:|CUSTOM_TOOLS: ${CUSTOM_LIST}|" -i ${MKFILE}.tmp2 102 cat ${MKFILE}.tmp2 >> ${MKFILE} 103 rm ${MKFILE}.tmp2 104 echo "Adding custom packages... ${BOLD}DONE${OFF}" 86 # Make the scripts executable. 87 chmod +x custom-tools/* 88 89 echo " Adding custom packages... ${BOLD}DONE${OFF}" 105 90 } 106 107 91 108 92 … … 115 99 116 100 > urls.lst.tmp 117 for this_script in $JHALFSDIR/custom-commands/ config/*; do101 for this_script in $JHALFSDIR/custom-commands/*; do 118 102 if [[ `basename ${this_script}` = "*" ]]; then 119 103 CUSTOM_TOOLS="n" -
common/libs/func_validate_configs.sh
r830f28d r3e7ceed 21 21 22 22 # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables 23 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL 24 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL 25 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL 26 local -r clfs3_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET MIPS_LEVEL REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP 23 local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL PAGE TIMEZONE LANG LC_ALL LUSER LGROUP BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE" 24 local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TARGET32 TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE" 25 local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE" 26 local -r clfs3_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET MIPS_LEVEL REPORT STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP CUSTOM_TOOLS REBUILD_MAKEFILE" 27 27 local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP BLFS_TOOL CUSTOM_TOOLS REBUILD_MAKEFILE" 28 28 local -r blfs_PARAM_LIST="BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR" 29 29 30 local -r 30 local -r blfs_tool_PARAM_LIST="BLFS_BRANCH_ID BLFS_ROOT BLFS_XML TRACKING_DIR DEP_LIBXML DEP_LIBXSLT DEP_TIDY DEP_UNZIP DEP_DBXML DEP_DBXSL DEP_LINKS DEP_SUDO DEP_WGET DEP_SVN DEP_GPM" 31 31 local -r custom_tool_PARAM_LIST="TRACKING_DIR" 32 32 … … 35 35 local -r PARAM_VALS='${config_param}${dotSTR:${#config_param}} ${L_arrow}${BOLD}${!config_param}${OFF}${R_arrow}' 36 36 37 local 37 local PARAM_LIST= 38 38 local config_param 39 39 local validation_str -
common/libs/func_wrt_Makefile
r830f28d r3e7ceed 38 38 PRT_DU_CR = echo -e "\nKB: \`du -skx --exclude=\$(SCRIPT_ROOT) --exclude=lost+found / \`\n" 39 39 40 ADD_REPORT = $REPORT 41 ADD_BLFS_TOOLS = $BLFS_TOOL 40 ADD_REPORT = $REPORT 41 ADD_CUSTOM_TOOLS = $CUSTOM_TOOLS 42 ADD_BLFS_TOOLS = $BLFS_TOOL 42 43 43 44 -
common/makefile-functions
r830f28d r3e7ceed 19 19 20 20 define echo_PHASE 21 @clear22 21 @echo $(BOLD)-------------------------------------------------------------------------------- 23 22 @echo $(tab_)$(tab_)Executing $(BLUE)$(1)$(WHITE) scripts … … 34 33 35 34 define echo_SULUSER_request 36 @clear37 35 @echo $(BOLD)-------------------------------------------------------------------------------- 38 36 @echo $(BOLD)$(BLUE)$@ 39 37 @echo $(WHITE)You are going to log into the user account $(BOLD)$(YELLOW)$(LUSER)$(OFF) 40 @echo su requires a password38 @echo sudo requires a password 41 39 endef 42 40 43 41 define echo_CHROOT_request 44 @clear45 42 @echo $(BOLD)-------------------------------------------------------------------------------- 46 43 @echo $(BOLD)$(BLUE)$@
Note:
See TracChangeset
for help on using the changeset viewer.