Update to latest upstream version
Convert build.sh to newstyle build.sh
This commit is contained in:
parent
3073a86190
commit
f0ad471cd6
61
cvs/build.sh
61
cvs/build.sh
@ -3,13 +3,14 @@
|
|||||||
# This is a generic build.sh script
|
# This is a generic build.sh script
|
||||||
# It can be used nearly unmodified with many packages
|
# It can be used nearly unmodified with many packages
|
||||||
#
|
#
|
||||||
# The concept of "method" registering and the logic that implements it was shamelessly
|
# build.sh helper functions
|
||||||
# stolen from jhlj's Compile.sh script :)
|
. ${BUILDPKG_BASE}/scripts/build.sh.functions
|
||||||
#
|
#
|
||||||
|
###########################################################
|
||||||
# Check the following 4 variables before running the script
|
# Check the following 4 variables before running the script
|
||||||
topdir=cvs
|
topdir=cvs
|
||||||
version=1.11.17
|
version=1.11.20
|
||||||
pkgver=1
|
pkgver=2
|
||||||
source[0]=$topdir-$version.tar.bz2
|
source[0]=$topdir-$version.tar.bz2
|
||||||
# If there are no patches, simply comment this
|
# If there are no patches, simply comment this
|
||||||
#patch[0]=
|
#patch[0]=
|
||||||
@ -17,11 +18,9 @@ source[0]=$topdir-$version.tar.bz2
|
|||||||
# Source function library
|
# Source function library
|
||||||
. ${HOME}/buildpkg/scripts/buildpkg.functions
|
. ${HOME}/buildpkg/scripts/buildpkg.functions
|
||||||
|
|
||||||
# Define script functions and register them
|
# Global settings
|
||||||
METHODS=""
|
export LDFLAGS="-R/usr/local/lib"
|
||||||
reg() {
|
shortroot=1
|
||||||
METHODS="$METHODS $1"
|
|
||||||
}
|
|
||||||
|
|
||||||
reg prep
|
reg prep
|
||||||
prep()
|
prep()
|
||||||
@ -32,23 +31,19 @@ prep()
|
|||||||
reg build
|
reg build
|
||||||
build()
|
build()
|
||||||
{
|
{
|
||||||
export LDFLAGS="-R/usr/local/lib"
|
|
||||||
generic_build
|
generic_build
|
||||||
}
|
}
|
||||||
|
|
||||||
reg install
|
reg install
|
||||||
install()
|
install()
|
||||||
{
|
{
|
||||||
shortroot=1
|
|
||||||
generic_install prefix
|
generic_install prefix
|
||||||
doc FAQ README NEWS doc/*.ps
|
doc FAQ README NEWS doc/*.ps
|
||||||
$RM -f $stagedir/info/dir
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reg pack
|
reg pack
|
||||||
pack()
|
pack()
|
||||||
{
|
{
|
||||||
shortroot=1
|
|
||||||
generic_pack
|
generic_pack
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,42 +56,4 @@ distclean()
|
|||||||
###################################################
|
###################################################
|
||||||
# No need to look below here
|
# No need to look below here
|
||||||
###################################################
|
###################################################
|
||||||
|
build_sh $*
|
||||||
reg all
|
|
||||||
all()
|
|
||||||
{
|
|
||||||
for METHOD in $METHODS
|
|
||||||
do
|
|
||||||
case $METHOD in
|
|
||||||
all*|*clean) ;;
|
|
||||||
*) $METHOD
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
reg
|
|
||||||
usage() {
|
|
||||||
echo Usage $0 "{"$(echo $METHODS | tr " " "|")"}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
OK=0
|
|
||||||
for METHOD in $*
|
|
||||||
do
|
|
||||||
METHOD=" $METHOD *"
|
|
||||||
if [ "${METHODS%$METHOD}" == "$METHODS" ] ; then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
OK=1
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $OK = 0 ] ; then
|
|
||||||
usage;
|
|
||||||
fi
|
|
||||||
|
|
||||||
for METHOD in $*
|
|
||||||
do
|
|
||||||
( $METHOD )
|
|
||||||
done
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user