Tom G. Christensen b1fac33271 pcre 4.4
It won't install correctly in the staged root if a libpcre is not available
in /usr/local/lib.
The solution is simple, since libpcre builds and install okay we package
the half finished installation and temporarily install that while we
rebuild the package :)
2003-10-14 08:34:09 +00:00

107 lines
1.6 KiB
Bash
Executable File

#!/bin/bash
#
# This is a generic build.sh script
# It can be used nearly unmodified with many packages
#
# The concept of "method" registering and the logic that implements it was shamelessly
# stolen from jhlj's Compile.sh script :)
#
# Check the following 4 variables before running the script
topdir=pcre
version=4.4
pkgver=2
source[0]=$topdir-$version.tar.bz2
# If there are no patches, simply comment this
#patch[0]=
# Source function library
. ${BUILDPKG_BASE}/scripts/buildpkg.functions
# Fill in pkginfo values if necessary
# using pkgname,name,pkgcat,pkgvendor & pkgdesc
name="PCRE"
pkgcat="library"
pkgvendor="http://www.pcre.org"
pkgdesc="Perl Compatible Regular Expressions"
# Define script functions and register them
METHODS=""
reg() {
METHODS="$METHODS $1"
}
reg prep
prep()
{
generic_prep
}
reg build
build()
{
setdir source
./configure --prefix=$prefix --disable-static --enable-utf8
$MAKE_PROG
}
reg install
install()
{
generic_install DESTDIR
}
reg pack
pack()
{
generic_pack
}
reg distclean
distclean()
{
clean distclean
}
###################################################
# No need to look below here
###################################################
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