diff options
-rw-r--r-- | doc/CHANGELOG | 10 | ||||
-rwxr-xr-x | simplepkg.SlackBuild | 2 | ||||
-rw-r--r-- | src/createpkg | 48 |
3 files changed, 41 insertions, 19 deletions
diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 659076d..00e8aef 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -1,6 +1,16 @@ simplepkg changelog ------------------- +0.4.9pre4: createpkg: better command line evaluation, + now using "upgradepkg --install-new" to + install a package and added the command + line option --no-deps so createpkg doesn't + goes down to solve all slack-required + dependencies. + +0.4.9pre3: small fix on createpkg when handling with + slackbuilds with similar names + 0.4.9pre2: fixed simplepkg.SlackBuild fixed doinst.sh re-organized the source repository diff --git a/simplepkg.SlackBuild b/simplepkg.SlackBuild index 4dc8a56..78288b3 100755 --- a/simplepkg.SlackBuild +++ b/simplepkg.SlackBuild @@ -6,7 +6,7 @@ PACKAGE="simplepkg" PACK_DIR="package-$PACKAGE" BUILD="1rha" -VERSION="0.4.9pre3" +VERSION="0.4.9pre4" ARCH="noarch" LIBEXEC="/usr/libexec/$PACKAGE" diff --git a/src/createpkg b/src/createpkg index a360153..faa7e0e 100644 --- a/src/createpkg +++ b/src/createpkg @@ -60,6 +60,7 @@ function build_repo { function usage { echo "usage: createpkg [--install] package-name" + echo " createpkg --no-deps package-name" echo " createpkg --search package-name" echo " createpkg --sync" @@ -107,7 +108,7 @@ function solve_dep { found="0" fi - # TODO: check if the package is installed + # TODO: check if the package was built and installed } @@ -137,17 +138,26 @@ check_repo if [ -z "$1" ]; then safe_exit 4 -elif [ "$1" == "--sync" ]; then - sync_repo - exit -elif [ "$1" == "--search" ]; then - find_script $2 - exit -elif [ "$1" == "--install" ]; then - PACKAGE="$2" - INSTALL="1" -else +elif [ "$#" == "2" ]; then + if [ "$1" == "--sync" ]; then + sync_repo + exit + elif [ "$1" == "--search" ]; then + find_script $2 + exit + elif [ "$1" == "--install" ]; then + PACKAGE="$2" + INSTALL="1" + elif [ "$1" == "--no-deps" ]; then + NO_DEPS="1" + PACKAGE="$2" + else + safe_exit 4 + fi +elif [ "${1:0:1}" != "-" ]; then PACKAGE="$1" +else + safe_exit 4 fi if [ "$SYNC" == "yes" ]; then @@ -168,13 +178,15 @@ elif [ -f "$SCRIPT_BASE/slack-required" ]; then SLACK_REQ="$SCRIPT_BASE/slack-required" fi -if [ ! -z "$SLACK_REQ" ]; then +if [ ! -z "$SLACK_REQ" ] && [ "$NO_DEPS" != "1" ]; then cat $SLACK_REQ | while read dep; do - program="`echo $dep | awk '{ print $1 }'`" - condition="`echo $dep | awk '{ print $2 }' | sed -e 's/>=/equalorgreater/' -e 's/=</equalorless/' -e 's/</less/' -e 's/>/greater/' -e 's/=/equal/'`" - version="`echo $dep | awk '{ print $3 }' | tr -dc '[:digit:]'`" - solve_dep $program $condition $version + if [ ! -z "$dep" ]; then + program="`echo $dep | awk '{ print $1 }'`" + condition="`echo $dep | awk '{ print $2 }' | sed -e 's/>=/equalorgreater/' -e 's/=</equalorless/' -e 's/</less/' -e 's/>/greater/' -e 's/=/equal/'`" + version="`echo $dep | awk '{ print $3 }' | tr -dc '[:digit:]'`" + solve_dep $program $condition $version + fi done fi @@ -192,8 +204,8 @@ if [ "$_ARCH" == "noarch" ]; then ARCH="noarch" fi -# TODO: change to upgradepkg? if [ "$INSTALL" == "1" ]; then - installpkg $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz + # installpkg $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz + upgradepkg --install-new $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz fi |