anchor.diff:      sed -i '/#include <stdlib.h>/a #include <unistd.h>' src/CTPP2FileSourceLoader.cpp && \
       make -j4 && \
       make install && \
  -    if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/ctpp2-2.8.3; fi
  +    if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/ctpp2-2.8.3; fi && \
  +    if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/ctpp2-2.8.3.tar.gz; fi
   
   RUN cd /usr/local/src/smartmet && \
       wget http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz && \
  
positive.code:     export CPPFLAGS="-I/usr/include/glib-2.0/" && \
      ./configure --disable-static --disable-gtk-doc --disable-gtk-theme --enable-introspection && \
      make -j4 && make install && \
      if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/librsvg-2.40.6; fi
  
  RUN cd /usr/local/src/smartmet && \
      wget http://il.ma/json_spirit_v4.08.zip && \
  
negative.code:     make -j4 && make install && \
      if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/smartmet-server; fi
  
  RUN for ENGINE in ${SMARTMET_ENGINES}; \
        do \
  	 cd /usr/local/src/smartmet && \    
           git clone https://github.com/fmidev/smartmet-engine-${ENGINE}.git && \
  	 cd smartmet-engine-${ENGINE} && \
  	 make -j4 && make install  && \
  	 if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/smartmet-engine-${ENGINE}; fi \
        done
  
  RUN for PLUGIN in ${SMARTMET_PLUGINS}; \
        do \
        	 cd /usr/local/src/smartmet && \
      	 git clone https://github.com/fmidev/smartmet-plugin-${PLUGIN}.git && \
      	 cd smartmet-plugin-${PLUGIN} && \
  	 if [ -f smartmet-plugin-frontend.spec ]; then sed -e 's/json_spirit\/json_spirit.h/json_spirit.h/g' -i source/Plugin.cpp; fi && \
      	 make -j4 && make install && \
      	 if [ $SMARTMET_DEVEL -ne 1 ]; then rm -rf /usr/local/src/smartmet/smartmet-plugin-${PLUGIN}; fi \
        done
  
  RUN mkdir -p /usr/share/smartmet/timezones && \
      cd /usr/share/smartmet/timezones && \
      wget https://raw.githubusercontent.com/boost-vault/date_time/master/date_time_zonespec.csv
  
  COPY smartmetconf /etc/smartmet
  COPY timezones /usr/share/smartmet/timezones
  