]> woffs.de Git - fd/haskell-amqp-utils.git/commitdiff
fix stack install
authorFrank Doepper <[email protected]>
Mon, 30 Jul 2018 11:30:08 +0000 (13:30 +0200)
committerFrank Doepper <[email protected]>
Mon, 30 Jul 2018 11:30:08 +0000 (13:30 +0200)
Makefile

index 836364e5460930152dc71df599c91bacb84ca4a7..a65a088db7a2e47738e76d58be9f61d495799ec6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ DESTDIR=
 pfx = /usr/local
 flavour = $(shell if stack --version >/dev/null 2>&1; then echo stack; elif cabal --version >/dev/null 2>&1; then echo cabal; else echo simple; fi)
 parallel = $(filter -j%, $(MAKEFLAGS))
-nix = $(if $(findstring nix,$(shell bash -c "readlink $$(type -p stack)")),--nix,)
+nix = $(if $(findstring nix,$(shell realpath `which stack`)),--nix,)
 
 build: build-$(flavour)
 install: install-$(flavour) install-common
@@ -13,8 +13,7 @@ build-stack:
 
 install-stack: build-stack
        install -d -m755 $(DESTDIR)$(pfx)/bin
-       install -m755 $$(stack $(nix) path --local-install-root)/bin/konsum $(DESTDIR)$(pfx)/bin/
-       install -m755 $$(stack $(nix) path --local-install-root)/bin/agitprop $(DESTDIR)$(pfx)/bin/
+       stack $(nix) --local-bin-path $(DESTDIR)$(pfx)/bin/ install
 
 install-common:
        install -d -m755 $(DESTDIR)$(pfx)/lib/haskell-amqp-utils
@@ -53,4 +52,6 @@ uninstall:
        rm -f $(DESTDIR)$(pfx)/lib/haskell-amqp-utils/callback.config.sh
        rm -f $(DESTDIR)$(pfx)/bin/konsum
        rm -f $(DESTDIR)$(pfx)/bin/agitprop
+       rm -f $(DESTDIR)$(pfx)/bin/arbeite
+       rm -f $(DESTDIR)$(pfx)/bin/plane
        -rmdir $(DESTDIR)$(pfx)/lib/haskell-amqp-utils
don't click here