|
1 | 1 | #!/bin/bash -e |
2 | 2 |
|
3 | | -DEPS="docbook-xsl libpcsclite-dev xsltproc gengetopt libcmocka-dev help2man pcscd check clang-tidy softhsm2 pcsc-tools libtool make autoconf autoconf-archive automake libssl-dev zlib1g-dev pkg-config libreadline-dev openssl git" |
4 | | -if [ "$1" == "cac" ]; then |
| 3 | +DEPS="docbook-xsl libpcsclite-dev xsltproc gengetopt libcmocka-dev help2man pcscd check softhsm2 pcsc-tools libtool make autoconf autoconf-archive automake libssl-dev zlib1g-dev pkg-config libreadline-dev openssl git" |
| 4 | + |
| 5 | +if [ "$1" == "clang-tidy" ]; then |
| 6 | + DEPS="$DEPS clang-tidy" |
| 7 | +elif [ "$1" == "cac" ]; then |
5 | 8 | DEPS="$DEPS libglib2.0-dev libnss3-dev gnutls-bin libusb-dev libudev-dev flex libnss3-tools" |
6 | 9 | elif [ "$1" == "oseid" ]; then |
7 | 10 | DEPS="$DEPS socat gawk xxd" |
8 | | -elif [ "$1" == "piv"]; then |
9 | | - DEPS="$DEPS ant cmake" |
10 | | -elif [ "$1" == "mingw" ]; then |
11 | | - DEPS="$DEPS wine binutils-mingw-w64-i686 binutils-mingw-w64-x86-64 gcc-mingw-w64-i686 gcc-mingw-w64-x86-64 mingw-w64" |
| 11 | +elif [ "$1" == "piv" -o "$1" == "isoapplet" -o "$1" == "gidsapplet" -o "$1" == "openpgp" ]; then |
| 12 | + if [ "$1" == "piv" ]; then |
| 13 | + DEPS="$DEPS cmake" |
| 14 | + fi |
| 15 | + DEPS="$DEPS ant openjdk-8-jdk" |
| 16 | +elif [ "$1" == "mingw" -o "$1" == "mingw32" ]; then |
| 17 | + sudo dpkg --add-architecture i386 |
| 18 | + if [ "$1" == "mingw" ]; then |
| 19 | + DEPS="$DEPS wine wine32 binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 mingw-w64" |
| 20 | + elif [ "$1" == "mingw32" ]; then |
| 21 | + DEPS="$DEPS wine wine32 binutils-mingw-w64-i686 gcc-mingw-w64-i686" |
| 22 | + fi |
12 | 23 | fi |
13 | 24 |
|
14 | 25 | # make sure we do not get prompts |
15 | 26 | export DEBIAN_FRONTEND=noninteractive |
16 | 27 | sudo apt-get update |
17 | 28 | sudo apt-get install -y build-essential $DEPS |
| 29 | + |
| 30 | +if [ "$1" == "mingw" -o "$1" == "mingw32" ]; then |
| 31 | + if [ ! -f "$(winepath 'C:/Program Files (x86)/Inno Setup 5/ISCC.exe')" ]; then |
| 32 | + /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 |
| 33 | + export DISPLAY=:99.0 |
| 34 | + [ -d isetup ] || mkdir isetup |
| 35 | + pushd isetup |
| 36 | + [ -f isetup-5.5.6.exe ] || wget http://files.jrsoftware.org/is/5/isetup-5.5.6.exe |
| 37 | + sleep 5 # make sure the X server is ready ? |
| 38 | + wine isetup-5.5.6.exe /SILENT /VERYSILENT /SP- /SUPPRESSMSGBOXES /NORESTART |
| 39 | + popd |
| 40 | + fi |
| 41 | +fi |
0 commit comments