From 790202ddbd2b5dc84b68e148150057504c8f032e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 30 Aug 2014 09:01:29 +0200 Subject: [PATCH] xbps-src: move helpers to environment; there's no need to have them. Those helpers were just setting up some extra functions that can be used on templates, and this can be done already via environment, so let's remove the helpers completely. --- .../{helpers => environment/setup}/install.sh | 0 .../setup}/replace-interpreter.sh | 0 common/helpers/README | 25 ------------------- common/xbps-src/libexec/xbps-src-dobuild.sh | 4 --- .../xbps-src/libexec/xbps-src-doconfigure.sh | 4 --- common/xbps-src/libexec/xbps-src-doextract.sh | 4 --- common/xbps-src/libexec/xbps-src-dofetch.sh | 4 --- common/xbps-src/libexec/xbps-src-doinstall.sh | 4 --- common/xbps-src/libexec/xbps-src-dopkg.sh | 4 --- common/xbps-src/libexec/xbps-src-prepkg.sh | 4 --- 10 files changed, 53 deletions(-) rename common/{helpers => environment/setup}/install.sh (100%) rename common/{helpers => environment/setup}/replace-interpreter.sh (100%) delete mode 100644 common/helpers/README diff --git a/common/helpers/install.sh b/common/environment/setup/install.sh similarity index 100% rename from common/helpers/install.sh rename to common/environment/setup/install.sh diff --git a/common/helpers/replace-interpreter.sh b/common/environment/setup/replace-interpreter.sh similarity index 100% rename from common/helpers/replace-interpreter.sh rename to common/environment/setup/replace-interpreter.sh diff --git a/common/helpers/README b/common/helpers/README deleted file mode 100644 index ff5e3b865cf..00000000000 --- a/common/helpers/README +++ /dev/null @@ -1,25 +0,0 @@ -SHELL HELPERS -============= - -This directory contains shell files that are read by xbps-src and can be used at any -phase when building source packages. Only files with the `.sh' extension will be read. - -A shell helper must provide its own function for use in the source packages. -The following examples illustrates a fake helper named `myhelper.sh' that provides -the `myhelper_func' function: - -myhelper.sh: -... -myhelper_func() { - ... -} -... - -You can then use this helper in a source package like this: - -srcpkgs/foo/template: -... -do_install() { - myhelper_func ... -} -... diff --git a/common/xbps-src/libexec/xbps-src-dobuild.sh b/common/xbps-src/libexec/xbps-src-dobuild.sh index 9194d4751af..42b430b0a8d 100755 --- a/common/xbps-src/libexec/xbps-src-dobuild.sh +++ b/common/xbps-src/libexec/xbps-src-dobuild.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/build/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-doconfigure.sh b/common/xbps-src/libexec/xbps-src-doconfigure.sh index 851a0ba391f..2882237f56c 100755 --- a/common/xbps-src/libexec/xbps-src-doconfigure.sh +++ b/common/xbps-src/libexec/xbps-src-doconfigure.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/configure/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-doextract.sh b/common/xbps-src/libexec/xbps-src-doextract.sh index 1b891d3460d..ddb79dca7b1 100755 --- a/common/xbps-src/libexec/xbps-src-doextract.sh +++ b/common/xbps-src/libexec/xbps-src-doextract.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/extract/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-dofetch.sh b/common/xbps-src/libexec/xbps-src-dofetch.sh index 6fa6f1e915c..ce41f096ee7 100755 --- a/common/xbps-src/libexec/xbps-src-dofetch.sh +++ b/common/xbps-src/libexec/xbps-src-dofetch.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/fetch/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-doinstall.sh b/common/xbps-src/libexec/xbps-src-doinstall.sh index fee572cfcb6..bce09c93551 100755 --- a/common/xbps-src/libexec/xbps-src-doinstall.sh +++ b/common/xbps-src/libexec/xbps-src-doinstall.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/install/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-dopkg.sh b/common/xbps-src/libexec/xbps-src-dopkg.sh index 107b9d56b43..637fcd3f613 100755 --- a/common/xbps-src/libexec/xbps-src-dopkg.sh +++ b/common/xbps-src/libexec/xbps-src-dopkg.sh @@ -18,10 +18,6 @@ XBPS_CROSS_BUILD="$3" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/pkg/*.sh; do diff --git a/common/xbps-src/libexec/xbps-src-prepkg.sh b/common/xbps-src/libexec/xbps-src-prepkg.sh index f46f583747d..c688d6da86e 100755 --- a/common/xbps-src/libexec/xbps-src-prepkg.sh +++ b/common/xbps-src/libexec/xbps-src-prepkg.sh @@ -16,10 +16,6 @@ XBPS_CROSS_BUILD="$2" . $XBPS_SHUTILSDIR/common.sh -for f in $XBPS_COMMONDIR/helpers/*.sh; do - source_file "$f" -done - setup_pkg "$PKGNAME" $XBPS_CROSS_BUILD for f in $XBPS_COMMONDIR/environment/install/*.sh; do