From f7332d5b35ca91cfbea22904d88a72af38cdf6bd Mon Sep 17 00:00:00 2001 From: rudson Date: Sun, 22 Apr 2007 20:08:26 +0000 Subject: createpkg-1.0.5.2: alterado a variável REPOS para MAKEPKG_REPOS. Funciona somente com os SlackBuilds com REPOS. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@358 04377dda-e619-0410-9926-eae83683ac58 --- branches/0.6/conf/simplepkg.conf.new | 2 +- branches/0.6/lib/common.sh | 2 +- branches/0.6/src/createpkg | 43 +++++++++++++++++------------------- 3 files changed, 22 insertions(+), 25 deletions(-) (limited to 'branches') diff --git a/branches/0.6/conf/simplepkg.conf.new b/branches/0.6/conf/simplepkg.conf.new index 8878dcf..f073224 100644 --- a/branches/0.6/conf/simplepkg.conf.new +++ b/branches/0.6/conf/simplepkg.conf.new @@ -127,7 +127,7 @@ TEMPLATE_STORAGE_STYLE="own-folder" # MKBUILD AND CREATEPKG SECTION #--------------------------------------------------------------------- # Set SlackBuilds default directory from scripts -SLACKBUILD_DIR="/var/slackbuilds" +SLACKBUILDS_DIR="/var/slackbuilds" # Set binaries default repository directory MAKEPKG_REPOS="/var/createpkg" diff --git a/branches/0.6/lib/common.sh b/branches/0.6/lib/common.sh index c501722..d7ec5d7 100644 --- a/branches/0.6/lib/common.sh +++ b/branches/0.6/lib/common.sh @@ -259,7 +259,7 @@ function eval_config { # ---------------------------------------------------------------- # createpkg and mkbuild section - SLACKBUILD_DIR="`eval_parameter SLACKBUILD_DIR /var/slackbuilds`" + SLACKBUILDS_DIR="`eval_parameter SLACKBUILDS_DIR /var/slackbuilds`" MAKEPKG_REPOS="`eval_parameter MAKEPKG_REPOS /var/simplaret/binaries`" REMOVE_OLD_PACKAGE="`eval_boolean_parameter REMOVE_OLD_PACKAGE 1`" MOVE_BIN_PACKAGE="`eval_boolean_parameter MOVE_BIN_PACKAGE 1`" diff --git a/branches/0.6/src/createpkg b/branches/0.6/src/createpkg index 757972e..39063ca 100644 --- a/branches/0.6/src/createpkg +++ b/branches/0.6/src/createpkg @@ -31,24 +31,7 @@ # Createpkg functions #--------------------------------------------------- -CREATEPKG_VERSION="1.0.5.1" - -# Start common.sh functions -COMMON="/usr/libexec/simplepkg/common.sh" -BASENAME="`basename $0`" - -if [ -f "$COMMON" ]; then - source $COMMON -else - echo "error: file $COMMON found, check your $BASENAME installation" - mk_exit 0 -fi - -# Load simplepkg.conf variables -eval_config $BASENAME - -# Enable debug mode -#set -x +CREATEPKG_VERSION="1.0.5.2" function error_codes { @@ -237,7 +220,7 @@ function sync_repo { # Synchronize repository cd $SLACKBUILDS_DIR - svn update || build_repo + exit # svn update || build_repo #simplaret --update } @@ -355,6 +338,20 @@ function color_select { # Common functions COMMON="/usr/libexec/simplepkg/common.sh" SIMPLEPKG_CONF="/etc/simplepkg/simplepkg.conf" +BASENAME="`basename $0`" + +if [ -f "$COMMON" ]; then + source $COMMON +else + echo "error: file $COMMON found, check your $BASENAME installation" + mk_exit 0 +fi + +# Load simplepkg.conf variables +eval_config $BASENAME + +# Enable debug mode +#set -x # Loading error codes error_codes @@ -503,16 +500,16 @@ eecho $messag "$BASENAME: processing $SCRIPT_NAME" cd $SCRIPT_BASE # Execute SlackBuild script with variables protection -( INTERACT=no sh ./$SCRIPT_NAME ) +( REPOS=$MAKEPKG_REPOS INTERACT=no sh ./$SCRIPT_NAME ) # Check if package was built handle_error $? $PACKAGE # Get package name -PKG_NAME="`ls -1 -c $REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" +PKG_NAME="`ls -1 -c $MAKEPKG_REPOS/$PACKAGE-*-*-*.tgz | head -n 1 | xargs basename`" # Select repository directory -NEW_REPOS=$REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) +[ $MOVE_BIN_PACKAGE -eq 0 ] && NEW_REPOS=$MAKEPKG_REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) || NEW_REPOS=$MAKEPKG_REPOS # Create repository directory [ ! -e $NEW_REPOS ] && mkdir -p $NEW_REPOS 2>/dev/null @@ -521,7 +518,7 @@ NEW_REPOS=$REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} ) [ $REMOVE_OLD_PACKAGE -eq 0 ] && rm $NEW_REPOS/$PACKAGE-*-*-*.tgz 2>/dev/null # Move package to SlackBuilds-like tree -[ $MOVE_BIN_PACKAGE -eq 0 ] && mv $REPOS/$PKG_NAME $NEW_REPOS/ +[ $MOVE_BIN_PACKAGE -eq 0 ] && mv $MAKEPKG_REPOS/$PKG_NAME $NEW_REPOS/ # Install package if [ "$INSTALL" == "1" ]; then -- cgit v1.2.3