cpp-d1064d
[projects.git] / debian / eibd.prebuild
1 #!/bin/bash
2 set -e
3
4 # TODO: should be replaced by a mbuild environment variable
5 project_dir="$HOME/projects"
6
7 # Quelle: https://www.meintechblog.de/2014/06/knx-eib-gateway-in-fhem-einbinden/
8
9 # $CONFIGURE_OPTS may be set by cross compile environment
10
11 if [ "$DEB_HOST_GNU_TYPE" == "arm-linux-gnueabihf" ]
12 then 
13         PTH_OPTS="--with-mctx-mth=sjlj --with-mctx-dsp=ssjlj --with-mctx-stk=sas"
14 fi
15
16 wget --no-check-certificate http://www.auto.tuwien.ac.at/~mkoegler/pth/pthsem_2.0.8.tar.gz
17 tar xf pthsem_2.0.8.tar.gz
18 pushd pthsem-2.0.8 >/dev/null
19         ./configure --prefix=$project_dir/debian/tmp/usr $PTH_OPTS $CONFIGURE_OPTS
20         make
21 popd >/dev/null
22
23 wget --no-check-certificate http://www.auto.tuwien.ac.at/~mkoegler/eib/bcusdk_0.0.5.tar.gz
24 tar xf bcusdk_0.0.5.tar.gz
25 cp ~/projects/eibd/configure bcusdk-0.0.5/
26 pushd bcusdk-0.0.5
27         ./configure --with-pth=subdir:$HOME/build/pthsem-2.0.8 --without-pth-test --enable-onlyeibd --enable-eibnetip --enable-eibnetiptunnel --enable-eibnetipserver --enable-tpuarts --prefix=$project_dir/debian/tmp/usr $CONFIGURE_OPTS
28 popd >/dev/null
29
30