]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
trunk: cretepkg downgraded to 1.0.4
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 14 Apr 2007 19:22:10 +0000 (19:22 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Sat, 14 Apr 2007 19:22:10 +0000 (19:22 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@343 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index 03612a98f0a58372b0415206a87cfa5491582a82..e87b37a26630e2a07bf2df858c0c2337e1b34a2a 100644 (file)
@@ -17,7 +17,7 @@
 #
 # /etc/simplepkg/slackbuildrc parameters:
 #
-# SLACKBUILDS_DIR="/folder/to/place/slackbuilds", defaults to /var/slackbuilds
+# SLACKBUILDS="/folder/to/place/slackbuilds", defaults to /var/slackbuilds
 # SVN="svn://repository", defaults do svn://slack.sarava.org/slackbuilds
 # SYNC="yes|no", whether to always update the repository
 #
@@ -31,7 +31,7 @@
 #               Createpkg functions
 #---------------------------------------------------
 
-CREATEPKG_VERSION="1.0.5"
+CREATEPKG_VERSION="1.0.4"
 
 function error_codes {
 
@@ -130,11 +130,11 @@ function handle_error {
 function build_repo {
 
     # Checkout a new slackbuild working copy
-    BASEDIR="`dirname $SLACKBUILDS_DIR`"
+    BASEDIR="`dirname $SLACKBUILDS`"
     mkdir -p $BASEDIR || handle_error 4 $BASEDIR
     cd $BASEDIR
     svn checkout $SVN
-    cd $SLACKBUILDS_DIR
+    cd $SLACKBUILDS
 
 }
 
@@ -160,15 +160,14 @@ function check_config {
     [ ! -e $TPM ] && mkdir $TMP
     [ ! -e $REPOS ] && mkdir $REPOS
     #
-    SLACKBUILDS_DIR=${SLACKBUILDS_DIR:=/var/slackbuilds}
+    SLACKBUILDS=${SLACKBUILDS:=/var/slackbuilds}
     SVN=${SVN:=svn://slack.sarava.org/slackbuilds}
     SYNC=${SYNC:=no}
-    BASEDIR="`dirname $SLACKBUILDS_DIR`"
+    BASEDIR="`dirname $SLACKBUILDS`"
 
 }
 
 function solve_dep {
-
     # Solve dependency
     local PACK="$1"
     local COND="$2"
@@ -212,14 +211,14 @@ function solve_dep {
 function check_repo {
 
     # Verify if repository exist
-    [ ! -d "$SLACKBUILDS_DIR" ] && build_repo
+    [ ! -d "$SLACKBUILDS" ] && build_repo
 
 }
 
 function sync_repo {
 
     # Synchronize repository
-    cd $SLACKBUILDS_DIR
+    cd $SLACKBUILDS
     svn update || build_repo
     #simplaret --update
 
@@ -228,7 +227,7 @@ function sync_repo {
 function find_slackbuild {
 
     # Find SlackBuild script in the repository
-    find $SLACKBUILDS_DIR -iname $1.SlackBuild
+    find $SLACKBUILDS -iname $1.SlackBuild
 
 }
 
@@ -262,7 +261,7 @@ function info_builds {
 function list_builds {
 
     # List all available SlackBuilds
-    cd $SLACKBUILDS_DIR
+    cd $SLACKBUILDS
     echo "Sarava SlackBuilds list"
     # level 1
     for i in *; do
@@ -296,11 +295,9 @@ function list_builds {
             )
         fi
     done
-
 }
 
 function color_select {
-
     # Select color mode: gray, color or none (*)
     # commun - Communication
     # messag - Commum messages
@@ -329,7 +326,6 @@ function color_select {
         normal=""
         ;;
     esac
-
 }
 
 #---------------------------------------------------
@@ -430,16 +426,13 @@ if [ "`echo $BUILD_SCRIPT | wc -w`" -gt 1 ]; then
     AUX="$PS3"
     PS3="Choice: "
     LIST=`echo $BUILD_SCRIPT | sed 's/ /\n/g' | sed -r 's/.*\/(.*)\.SlackBuild$/\1/'`" EXIT"
-
     select PACKAGE in `echo $LIST`; do
         break
     done
-
     if [ "$PACKAGE" = "EXIT" ]; then
         eecho $error "error: None package select"
         exit 1
     fi
-
     # Select only one SlackBuild in BUILD_SCRIPT
     BUILD_SCRIPT=`echo $BUILD_SCRIPT | sed 's/ /\n/g' | grep "/$PACKAGE.SlackBuild"`
     PS3="$AUX"
@@ -482,26 +475,18 @@ fi
 
 eecho $messag "$BASENAME: processing $SCRIPT_NAME"
 
-# Change to script base directory
+# Built package
 cd $SCRIPT_BASE
-
-# Select repository directory
-NEW_REPOS=$REPOS/$( echo ${SCRIPT_BASE#$SLACKBUILDS_DIR/} )
-
-# Create repository directory
-[ ! -e $NEW_REPOS ] && mkdir -p $NEW_REPOS 2>/dev/null
-
-
-# Remove old-versions
-rm $NEW_REPOS/$PACKAGE-*-*-*.tgz 2>/dev/null
-
 # Execute SlackBuild script with variables protection
-( INTERACT=no REPOS=$NEW_REPOS sh ./$SCRIPT_NAME )
+( INTERACT=no sh ./$SCRIPT_NAME )
 
 # Check if package was built
 handle_error $? $PACKAGE
 
-PKG_TGZ="`ls -1 -c $NEW_REPOS/$PACKAGE-*-*-*.tgz | head -n 1`"
+PKG_TGZ="`ls -1 -c $REPOS/$PACKAGE-*-*-*tgz | head -n 1`"
+
+#mkdir -p $REPOS${SCRIPT_BASE/$SLACKBUILDS}
+#mv $PKG_TGZ $REPOS${SCRIPT_BASE/$SLACKBUILDS}/
 
 if [ "$INSTALL" == "1" ]; then
     # as we dont have the full package file name, we'll