]> www.average.org Git - pdns-pipe-nmc.git/blobdiff - build
attempt to make portable build
[pdns-pipe-nmc.git] / build
diff --git a/build b/build
index 319e038d4041bdf6992342cf6332bde4b05c6e1d..fe589f915b9c51bc164c4c987583b40ecabf4cac 100755 (executable)
--- a/build
+++ b/build
@@ -1,17 +1,18 @@
 #!/bin/sh
 
 file="pdns-pipe-nmc"
 #!/bin/sh
 
 file="pdns-pipe-nmc"
-sfx="linux-glibc6.`uname -m`.`date +%Y-%m-%d`.git-`git rev-parse --verify HEAD | cut -c 1-7`"
+sfx="linux-glibc6.`uname -m`.`date +%Y-%m-%d`.git-`git describe`"
 echo "Making $file.$sfx"
 
 # tried this:
 echo "Making $file.$sfx"
 
 # tried this:
-#ghc --make -static -optc-static -optl-shared-libgcc -optl-static -optl-pthread
+#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.
 # but cannot make it "only glibc is shared". And with static glibc,
 # getaddrinfo does not work on systems with different glibc.
-ghc --make "$file"
+cabal build
 case $? in
 0) ;;
 *) echo build falied; exit 1 ;;
 esac
 case $? in
 0) ;;
 *) echo build falied; exit 1 ;;
 esac
-mv "$file" "$file.$sfx" || exit 1
+mv "dist/build/$file/$file" "$file.$sfx" || exit 1
 gpg --detach-sign "$file.$sfx"
 gpg --detach-sign "$file.$sfx"