#!/bin/sh file="pdns-pipe-nmc" sfx="linux-glibc6.`uname -m`.`date +%Y-%m-%d`.git-`git describe`" echo "Making $file.$sfx" # tried this: #ghc --make -static -optc-static -optl-shared-libgcc -optl-static \ # -optl-pthread -pgml g++ "$file" # but cannot make it "only glibc is shared". And with static glibc, # getaddrinfo does not work on systems with different glibc. # # To build with ghc, run this: #ghc --make -optP-include -optPdist/build/autogen/cabal_macros.h "$file" # but it is still necessary to run `cabal configure` before to generate # the file `dist/build/autogen/cabal_macros.h`. cabal build case $? in 0) ;; *) echo build falied; exit 1 ;; esac mv "dist/build/$file/$file" "$file.$sfx" || exit 1 gpg --detach-sign "$file.$sfx"