3 ## Make sure we were called from Makefile
5 if [ "x$ASTERISKVERSIONNUM" = "x" ]; then
6 echo " ** Do not call this script directly"
10 ## Create a pkgconfig spec file for 3rd party modules (pkg-config asterisk --cflags)
12 if [ ! -d $PPATH ]; then
16 ## Clean out CFLAGS for the spec file.
18 LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \
19 sed -r -e 's/-I(include|\.\.\/include) //g' | \
20 sed -e 's/-DINSTALL_PREFIX=\S* //g' | \
21 sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \
22 sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
25 cat <<EOF > $PPATH/asterisk.pc
26 install_prefix=$INSTALL_PREFIX
27 version_number=$ASTERISKVERSIONNUM
30 varlibdir=$ASTVARLIBDIR
31 varrundir=$ASTVARRUNDIR
39 Description: Open Source PBX and telephony toolkit
40 Version: $ASTERISKVERSION