[Slackbuilds-users] Meta-Build Script

Joseph Holladay jhollad at gmail.com
Wed Oct 14 01:21:56 UTC 2009


#!/bin/sh

#At this juncture PWD must be the slackbuild dir.

#Get some information from *.info
    SLACKBUILD_NAME=`sed -ne 's/^PRGNAM="\(.*\)"/\1/p'  *.info`
    SLACKBUILD_TARBALL_URL=`sed -ne 's/^DOWNLOAD="\(.*\)"/\1/p' 
$SLACKBUILD_NAME.info`

#Get some information from *.SlackBuild
    PKG_VERSION=`sed -ne 's/^VERSION="\(.*\)"/\1/p' 
$SLACKBUILD_NAME.SlackBuild` 

#Function to build a package
build () {

#Sometimes a good idea to RTFM:
    less README

#Download Source
    wget $SLACKBUILD_TARBALL_URL

#Build the package
    sh $SLACKBUILD_NAME.SlackBuild

}

#DIRTY DIRTY DIRTY installing all packages in /tmp

install () {
installpkg /tmp/$SLACKBUILD_NAME*$.tgz
}

case "$1" in
    '-b' )
	build
	;;
    '-i' )
	install
	;;
    
    *)
	echo -e "Usage  \n -b : build package \n -i : install package"
esac



More information about the SlackBuilds-users mailing list