# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Version compare functions
+verlte() {
+ [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | head -n1`" ]
+}
+
+verlt() {
+ [ "$1" = "$2" ] && return 1 || verlte $1 $2
+}
+
+vergte() {
+ [ "$1" = "`printf '%s\n%s' $1 $2 | sort -V | tail -n1`" ]
+}
+
+vergt() {
+ [ "$1" = "$2" ] && return 1 || vergte $1 $2
+}
+
CFLAGS="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1"
export PATH="$PATH:/usr/perl5/bin"
;;
CFLAGS="-D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -D__EXTENSIONS__=1"
export PATH="$PATH:/usr/perl5/bin"
;;
- oot)
- echo "Out of tree build"
- BUILD_PATH=$WORKSPACE/oot
- mkdir -p $BUILD_PATH
- cd $BUILD_PATH
- MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
- ;;
- dist)
- echo "Distribution out of tree build"
- BUILD_PATH=`mktemp -d`
-
- # Initial configure and generate tarball
- MAKE=$MAKE ./configure
- $MAKE dist
-
- mkdir -p $BUILD_PATH
- cp *.tar.* $BUILD_PATH/
- cd $BUILD_PATH
-
- # Ignore level 1 of tar
- $TAR xvf *.tar.* --strip 1
-
- MAKE=$MAKE CFLAGS="$CFLAGS" $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
- ;;
- *)
- BUILD_PATH=$WORKSPACE
- echo "Standard tree build"
- MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
- ;;
+oot)
+ echo "Out of tree build"
+ BUILD_PATH=$WORKSPACE/oot
+ mkdir -p $BUILD_PATH
+ cd $BUILD_PATH
+ MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
+ ;;
+
+dist)
+ echo "Distribution out of tree build"
+ BUILD_PATH=`mktemp -d`
+
+ # Initial configure and generate tarball
+ MAKE=$MAKE ./configure
+ $MAKE dist
+
+ mkdir -p $BUILD_PATH
+ cp *.tar.* $BUILD_PATH/
+ cd $BUILD_PATH
+
+ # Ignore level 1 of tar
+ $TAR xvf *.tar.* --strip 1
+
+ MAKE=$MAKE CFLAGS="$CFLAGS" $BUILD_PATH/configure --prefix=$PREFIX $CONF_OPTS
+ ;;
+*)
+ BUILD_PATH=$WORKSPACE
+ echo "Standard tree build"
+ MAKE=$MAKE CFLAGS="$CFLAGS" $WORKSPACE/configure --prefix=$PREFIX $CONF_OPTS
+ ;;