mirror of
				https://github.com/asterisk/asterisk.git
				synced 2025-11-03 20:38:59 +00:00 
			
		
		
		
	https://origsvn.digium.com/svn/asterisk/trunk ................ r220100 | seanbright | 2009-09-24 10:44:08 -0400 (Thu, 24 Sep 2009) | 9 lines Merged revisions 220099 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r220099 | seanbright | 2009-09-24 10:41:57 -0400 (Thu, 24 Sep 2009) | 2 lines Remove the remaining bashisms in the Makefile/mkpkgconfig ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@220101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
		
			
				
	
	
		
			51 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			51 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/sh
 | 
						|
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
 | 
						|
 | 
						|
#Solaris (and some others) don't have sed -r.  perl -p is equivalent
 | 
						|
if [ `echo "xxx" | sed -r 's/x/y/g' 2>/dev/null | ${GREP} -c "yyy"` != 0 ]; then
 | 
						|
    EXTREGEX="sed -r -e"
 | 
						|
else
 | 
						|
    EXTREGEX="perl -pe"
 | 
						|
fi
 | 
						|
 | 
						|
## Clean out CFLAGS for the spec file.
 | 
						|
 | 
						|
LOCAL_CFLAGS=`echo $CFLAGS | ${EXTREGEX} 's/\s*-pipe\s*//g' | ${EXTREGEX} 's/-[Wmp]\S*\s*//g' | \
 | 
						|
  ${EXTREGEX} 's/-I(include|\.\.\/include) //g' | \
 | 
						|
  ${EXTREGEX} 's/-DINSTALL_PREFIX=\S* //g' | \
 | 
						|
  ${EXTREGEX} 's/-DASTERISK_VERSION=\S* //g' | \
 | 
						|
  ${EXTREGEX} '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
 |