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

99 lines
2.2 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
make config
11 years ago
11 years ago
build=0
11 years ago
if [ $PLATFORM == "linux" -a "$linux" == "true" ]; then build=1; fi
if [ $PLATFORM == "macosx" -a "$macosx" == "true" ]; then build=1; fi
11 years ago
11 years ago
if [ "$PLATFORM" == "cygwin" ]; then
# 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
11 years ago
if [ "$label" == "MSVC" ] ; then
##
# Invoke MSVC build
export ACTION=/rebuild
export BuildEnv=native
export Builder=2005
export COMPILER=G++
export debug=false
export dll=true
export expat=true
export libssh=false
export Linux=true
export MSVC=true
export openssl=false
export release=true
export static=false
export teste=false
export testr=false
export tests=true
export testv=false
export Win32=false
export x64=true
export zlib=true
rm -rf $PWD/bin
mkdir $PWD/bind
11 years ago
11 years ago
PATH=$PATH:/cygdrive/c/Windows/System32
cmd.exe /c "cd $(cygpath -aw .) && call jenkins_build.bat"
exit $?
else
./configure --disable-nls
make
make install
make samples
11 years ago
make tests
11 years ago
fi
fi
11 years ago
11 years ago
if [ "$build" == "1" ]; then
11 years ago
./configure --prefix=$PWD/usr
make "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs"
make install
make samples CXXFLAGS=-I${PWD}/usr/include "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!
##