diff --git a/common/libs/func_custom_pkgs b/common/libs/func_custom_pkgs index 9b38f59..b12d2b6 100644 --- a/common/libs/func_custom_pkgs +++ b/common/libs/func_custom_pkgs @@ -69,7 +69,7 @@ ${THIS_SCRIPT}: ${PREV_SCRIPT} @\$(call echo_message, Building) @./progress_bar.sh \$@ \$\$PPID & @\$(call remove_existing_dirs2,${PKG_FILE}) - @\$(call unpack3,${PKG_FILE}) + @\$(call unpack2,${PKG_FILE}) @\$(call get_pkg_root2) @( time { source envars && /\$(SCRIPT_ROOT)/custom-commands/scripts/${THIS_SCRIPT} >>logs/${THIS_SCRIPT} 2>&1 ; } ) 2>>logs/${THIS_SCRIPT} @\$(call remove_build_dirs2,${PKG}) diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index bfdcbbb..94a6fd8 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -162,7 +162,7 @@ EOF fi ( cat << EOF - @\$(call unpack3,$FILE) + @\$(call unpack2,$FILE) @\$(call get_pkg_root2) EOF ) >> $MKFILE.tmp diff --git a/common/makefile-functions b/common/makefile-functions index ad1f86a..d2e1911 100644 --- a/common/makefile-functions +++ b/common/makefile-functions @@ -16,6 +16,8 @@ REVERSE = "" tab_ = " " nl_ = "" +#==== BUILD MESSAGES === + define echo_PHASE @clear @echo $(BOLD)-------------------------------------------------------------------------------- @@ -36,7 +38,7 @@ define echo_SULUSER_request @echo $(BOLD)-------------------------------------------------------------------------------- @echo $(BOLD)$(BLUE)$@ @echo $(WHITE)You are going to log into the user account $(BOLD)$(YELLOW)$(LUSER)$(OFF) - @echo su requires a password + @echo su requires a password endef define echo_CHROOT_request @@ -52,6 +54,11 @@ define echo_message @echo $(BOLD)$(1) target $(BLUE)$@$(BOLD)$(WHITE) endef +#======================= + + +#=== BUILD FUNCTIONS === + define remove_existing_dirs @PKG_PATH=`ls -t $(SRCSDIR)/$(1) | head -n1` && \ ROOT=`tar -tf $$PKG_PATH | head -n1 | sed -e 's@^./@@;s@/.*@@'` && \ @@ -66,25 +73,19 @@ define remove_existing_dirs2 rm -rf $(SRC)/$${ROOT%-*}-build endef -define remove_build_dirs - @ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ - rm -rf $(SRCSDIR)/$$ROOT && \ - rm -rf $(SRCSDIR)/$(1)-build +#==# + +define unpack + @cd $(SRCSDIR) && \ + tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) endef -define remove_build_dirs2 - @ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ - rm -rf $(SRC)/$$ROOT && \ - rm -rf $(SRC)/$(1)-build +define unpack2 + @cd $(SRC) && \ + tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) endef -define housekeeping - @touch $@ && \ - sleep .25 && \ - echo -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \ - echo --------------------------------------------------------------------------------$(WHITE) - -endef +#==# define get_pkg_root @ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ @@ -106,21 +107,35 @@ define get_pkg_root_LUSER echo "export PKGDIR=$(SRCSDIR)/$$ROOT" > envars endef -define unpack - @cd $(SRCSDIR) && \ - tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) +#==# + +define remove_build_dirs + @ROOT=`head -n1 $(SRCSDIR)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ + rm -rf $(SRCSDIR)/$$ROOT && \ + rm -rf $(SRCSDIR)/$(1)-build endef -define unpack2 - @cd $(SRCSDIR) && \ - /tools/bin/tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) +define remove_build_dirs2 + @ROOT=`head -n1 $(SRC)/$(PKG_LST) | sed 's@^./@@;s@/.*@@'` && \ + rm -rf $(SRC)/$$ROOT && \ + rm -rf $(SRC)/$(1)-build endef -define unpack3 - @cd $(SRC) && \ - tar -xvf `ls -t $(1) | head -n1` > $(PKG_LST) +#==# + +define housekeeping + @touch $@ && \ + sleep .25 && \ + echo -e "\n" $(BOLD)Target $(BLUE)$@ $(WHITE)$(BOLD)OK && \ + echo --------------------------------------------------------------------------------$(WHITE) + endef +#======================= + + +#==== FINAL MESSAGES === + define echo_report @echo @echo $(BOLD) The report file $(BLUE)$(1)$(BOLD) has been created