From 2cd2f8091931ddac934ec94bb80c15ec00d02755 Mon Sep 17 00:00:00 2001 From: rhatto Date: Wed, 17 Jan 2007 22:25:56 +0000 Subject: added debootstrap git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@981 370017ae-e619-0410-ac65-c121f96126d4 --- dev/util/debootstrap/debootstrap.SlackBuild | 95 +++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100755 dev/util/debootstrap/debootstrap.SlackBuild diff --git a/dev/util/debootstrap/debootstrap.SlackBuild b/dev/util/debootstrap/debootstrap.SlackBuild new file mode 100755 index 00000000..d19e1141 --- /dev/null +++ b/dev/util/debootstrap/debootstrap.SlackBuild @@ -0,0 +1,95 @@ +#!/bin/bash +# +# slackbuild script for debootstrap +# by rhatto at riseup.net +# + +if [ -s "slack-required" ]; then + echo Recomended and required packages for building debootstrap 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 ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# default settings +PACKAGE="debootstrap" +ARCH=${ARCH:=i386} +VERSION=${VERSION:=0.3.3.1} +BUILD=${BUILD:=1rha} +SRC_DIR=${SRC:=$CWD} +TMP=${TMP:=/tmp} +REPOS=${REPOS:=$TMP} + +# ------- error codes for createpkg -------------- +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40 + +RTOOL="wget" +SRC="debootstrap_"$VERSION"_all.deb" +URL="http://ftp.debian.org/debian/pool/main/d/debootstrap/$SRC" + +SRC_DIR="$SRC_DIR/$PACKAGE" +mkdir -p $SRC_DIR + +if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +TMP="$TMP/$PACKAGE" +rm -rf $TMP +mkdir -p $TMP +cd $TMP + +ar -x $SRC_DIR/$SRC || exit $ERROR_TAR + +CWD="`pwd`" +mkdir $TMP/package-$PACKAGE +cd $TMP/package-$PACKAGE + +tar xvf $CWD/data.tar || exit $ERROR_TAR +cd $TMP/package-$PACKAGE + +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 '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +debootstrap: debootstrap +debootstrap: +debootstrap: Debian bootstrap scripts. +debootstrap: +debootstrap: +debootstrap: +debootstrap: +debootstrap: +debootstrap: +debootstrap: +debootstrap: +EOF + +makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG + +if [ "$CLEANUP" == "yes" ]; then + rm -rf $TMP +fi + -- cgit v1.2.3