1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-27 00:57:50 +00:00
freebsd-ports/net/asterisk-oh323/files/patch-wrapper::check_ver
Max Khon 035dbea611 - Use pwlib and openh323 from ports
- Update to latest codec negotiation patch

Submitted by:	Andriy I Pylypenko <bamby@portaone.com> (MAINTAINER)
2006-04-26 11:34:04 +00:00

28 lines
853 B
Plaintext

--- wrapper/check_ver.orig Thu Apr 13 14:02:00 2006
+++ wrapper/check_ver Thu Apr 13 14:11:54 2006
@@ -1,10 +1,17 @@
#!/bin/sh
-if [ -f .$2_version ]; then
- mv .$2_version .$2_version.old
+if [ -f .${2}_version ]; then
+ mv .${2}_version .${2}_version.old
fi
-
-MAJOR_VER=`cat $1/version.h | grep "#define MAJOR_VERSION" | awk -F\ '{print $3}'`
-MINOR_VER=`cat $1/version.h | grep "#define MINOR_VERSION" | awk -F\ '{print $3}'`
-BUILD_NUM=`cat $1/version.h | grep "#define BUILD_NUMBER" | awk -F\ '{print $3}'`
-echo -e "$MAJOR_VER.$MINOR_VER.$BUILD_NUM" > .$2_version
+case ${2} in
+ pwlib)
+ grep "PWLIB_VERSION" ${1}/../../include/ptbuildopts.h | \
+ awk -F\ '{print $3}' > .${2}_version
+ ;;
+ openh323)
+ grep "OPENH323_VERSION" ${1}/../../include/${2}/${2}buildopts.h | \
+ awk -F\ '{print $3}' > .${2}_version
+ ;;
+ *)
+ ;;
+esac