diff options
author | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-30 02:00:49 +0000 |
---|---|---|
committer | kpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-11-30 02:00:49 +0000 |
commit | 2bad44c90fd5c43e8ac0e1b0d9ae009111def609 (patch) | |
tree | 8118d07dd443a6af05285e51d5c30e93e3bc9155 /build_tools | |
parent | 24c1e3c22259fee9f8a08911d5e5c6e2604ead18 (diff) |
move mkpkgconfig script where it belongs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7222 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'build_tools')
-rwxr-xr-x | build_tools/mkpkgconfig | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/build_tools/mkpkgconfig b/build_tools/mkpkgconfig new file mode 100755 index 000000000..0ae2a24bf --- /dev/null +++ b/build_tools/mkpkgconfig @@ -0,0 +1,43 @@ +#!/bin/bash +PPATH=$1 +## Make sure we were called from Makefile + +if [ "x$ASTERISKVERSIONNUM" = "x" ]; then + echo " ** Do not call this script directly" + exit +fi + +## Create a pkgconfig spec file for 3rd party modules (pkg-config asterisk --cflags) + +if [ ! -d $PPATH ]; then + exit +fi + +## Clean out CFLAGS for the spec file. + +LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \ + sed -r -e 's/-I(include|\.\.\/include) //g' | \ + sed -e 's/-DINSTALL_PREFIX=\S* //g' | \ + sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \ + sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'` + + +cat <<EOF > $PPATH/asterisk.pc +install_prefix=$INSTALL_PREFIX +version_number=$ASTERISKVERSIONNUM +etcdir=$ASTETCDIR +libdir=$ASTLIBDIR +varlibdir=$ASTVARLIBDIR +varrundir=$ASTVARRUNDIR +spooldir=$ASTSPOOLDIR +logdir=$ASTLOGDIR +confpath=$ASTCONFPATH +moddir=$MODULES_DIR +agidir=$AGI_DIR + +Name: asterisk +Description: Open Source PBX and telephony toolkit +Version: $ASTERISKVERSION +Libs: $LIBS +Cflags: $LOCAL_CFLAGS +EOF |