diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-10-20 14:13:12 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2006-10-20 14:13:12 +0000 |
commit | 0b8f4716923c6f9a871a31db89bb8b3730a109ab (patch) | |
tree | c3beddd0a45aedab2ed24b0565109cc936ef2892 | |
parent | 2bb254f3cbb07ff7b64407c1034595f2c5b995e3 (diff) | |
download | slackbuilds-0b8f4716923c6f9a871a31db89bb8b3730a109ab.tar.gz slackbuilds-0b8f4716923c6f9a871a31db89bb8b3730a109ab.tar.bz2 |
scons: changed to a .build
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@474 370017ae-e619-0410-ac65-c121f96126d4
-rwxr-xr-x | scons/scons.SlackBuild | 44 | ||||
-rwxr-xr-x | scons/scons.build | 40 |
2 files changed, 55 insertions, 29 deletions
diff --git a/scons/scons.SlackBuild b/scons/scons.SlackBuild new file mode 100755 index 00000000..470122de --- /dev/null +++ b/scons/scons.SlackBuild @@ -0,0 +1,44 @@ +#!/bin/bash +# +# SlackBuild script to call scons.build with correct settings +# + +if [ -s "slack-required" ]; then + echo Recomended and required packages for building scons are: + cat scons.slack-required | sed -e 's/^/\t/' + if [ "$INTERACT" != "no" ]; then + echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. + read crap + else + echo Sleeping 3 seconds... + sleep 3 + fi +fi + +CWD="`pwd`" + +if [ -f "/etc/slackbuildrc" ]; then + source /etc/slackbuildrc +fi + +if [ -f "~/.slackbuildrc" ]; then + source ~/.slackbuildrc +fi + +# default settings +PACKAGE="scons" +VERSION=${VERSION:=0.96.1} +ARCH="${ARCH:=i486}" +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC:=$CWD} +TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} + +rm -rf $TMP/$PACKAGE +mkdir -p $SRC_DIR/$PACKAGE $TMP/$PACKAGE + +slacktrack -b $REPOS -x $TMP,$SRC_DIR,/dev -jefkzp "$PACKAGE-$VERSION-$ARCH-$BUILD.tgz" "./$PACKAGE.build" + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP/$PACKAGE +fi diff --git a/scons/scons.build b/scons/scons.build index c9cb18d7..da919efd 100755 --- a/scons/scons.build +++ b/scons/scons.build @@ -4,18 +4,6 @@ # by rhatto at riseup.net # -if [ -s "slack-required" ]; then - echo Recomended and required packages for building scons are: - cat slack-required | sed -e 's/^/\t/' - if [ "$INTERACT" != "no" ]; then - echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER. - read crap - else - echo Sleeping 3 seconds... - sleep 3 - fi -fi - CWD="`pwd`" if [ -f "/etc/slackbuildrc" ]; then @@ -54,12 +42,8 @@ SRC="$PACKAGE-$VERSION.tar.$PACKAGE_EXT" URL="http://easynews.dl.sourceforge.net/sourceforge/scons/$SRC" SRC_DIR="$SRC_DIR/$PACKAGE" -mkdir -p $SRC_DIR - -if [ "$PACKAGE_EXT" == "bz2" ]; then - tarflag="j" -else - tarflag="z" +if [ ! -d "$SRC_DIR" ]; then + mkdir -p $SRC_DIR fi if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then @@ -68,24 +52,24 @@ fi TMP="$TMP/$PACKAGE" rm -rf $TMP -mkdir -p $TMP +if [ ! -d "$TMP" ]; then + mkdir -p $TMP +fi cd $TMP -tar xvf$tarflag $SRC_DIR/$SRC +tar xvf $SRC_DIR/$SRC || exit $ERROR_TAR cd $PACKAGE-$VERSION if [ -f "$CWD/$PACKAGE-$VERSION.diff" ]; then patch -p1 < $CWD/$PACKAGE-$VERSION.diff || exit $ERROR_PATCH fi -python setup.py install --prefix=$TMP/package-$PACKAGE --standard-lib || exit $ERROR_INSTALL +python setup.py install || exit $ERROR_INSTALL CWD="`pwd`" -cd $TMP/package-$PACKAGE - -mkdir install -cat << EOF > install/slack-desc +mkdir /install +cat << EOF > /install/slack-desc # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' @@ -108,14 +92,12 @@ scons: through user-defined builder and scanner objects. EOF # docs -mkdir -p usr/doc/$PACKAGE-$VERSION +mkdir -p /usr/doc/$PACKAGE-$VERSION for file in CHANGES.txt LICENSE.txt MANIFEST README.txt RELEASE.txt; do - cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/ + cp $CWD/$file* /usr/doc/$PACKAGE-$VERSION/ done -makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG - if [ "$CLEANUP" == "yes" ]; then rm -rf $TMP fi |