You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
exiv2/jenkins_build.sh

96 lines
2.4 KiB
Bash

#!/bin/bash
set +v
DIR="$PWD"
11 years ago
if [ -e /home/rmills/bin/.profile ]; then
source /home/rmills/bin/.profile
fi
if [ -e /Users/rmills/bin/.profile ]; then
source /Users/rmills/bin/.profile
fi
cd "$DIR"
11 years ago
11 years ago
echo ----------------------
export
echo ----------------------
if [ -z "$tests" ]; then tests=true; fi
export PATH=$PATH:/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/bin:/usr/lib/pkgconfig:/opt/local/bin:$PWD/usr/bin:/opt/local/bin:/opt/local/sbin:/opt/pkgconfig:bin
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$PWD/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
11 years ago
##
# cleanup from last time (if there was a last time)
if [ -e config/config.mk ]; then
11 years ago
if [ -e bin ]; then
rm -rf bin
fi
if [ ! -e bin ]; then
mkdir bin
fi
make distclean
fi
11 years ago
make config # 2>/dev/null >/dev/null
11 years ago
11 years ago
##
# decide what to do about libcurl and libssh
export withcurl=''
export withssh=''
if grep -q curl ./configure ; then
if [ "$curl" == "true" ]; then withcurl=--with-curl ; else withcurl=--without-curl; fi
fi
if grep -q ssh ./configure ; then
if [ "$ssh" == "true" ]; then withssh=--with-ssh ; else withssh=--without-ssh ; fi
fi
11 years ago
11 years ago
if [ "$PLATFORM" == "cygwin" ]; then
11 years ago
if [ "$label" == "MSVC" ] ; then
11 years ago
if [ "$msvc" == "true" ]; then
##
# Invoke MSVC build
11 years ago
11 years ago
rm -rf $PWD/bin
mkdir $PWD/bin
11 years ago
11 years ago
PATH=$PATH:/cygdrive/c/Windows/System32
cmd.exe /c "cd $(cygpath -aw .) && call jenkins_build.bat"
else
echo "*** msvc build not requested ***"
fi
11 years ago
exit $?
else
11 years ago
# export LIBS=-lintl
# I've given up:
# 1. trying to get Cygwin to build with gettext and friends
# 2. trying to get Cygwin to install into a local directory
./configure --disable-nls $withcurl $withssh
11 years ago
make
make install
make samples
11 years ago
if [ "$tests" == true ]; then
make tests
fi
11 years ago
fi
fi
11 years ago
11 years ago
build=0
if [ $PLATFORM == "linux" -a "$linux" == "true" ]; then build=1; fi
if [ $PLATFORM == "macosx" -a "$macosx" == "true" ]; then build=1; fi
if [ $build == 1 ]; then
echo -------------
echo ./configure --prefix=$PWD/usr $withcurl $withssh
echo -------------
./configure --prefix=$PWD/usr $withcurl $withssh
11 years ago
make "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs"
make install
11 years ago
make samples "CXXFLAGS=-I${PWD}/usr/include -I${PWD}/src" "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs -lexiv2"
11 years ago
if [ "$tests" == true ]; then
make tests
fi
11 years ago
fi
# That's all Folks!
##