diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-03 00:59:26 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-03 01:55:49 -0400 |
| commit | 42f207232beb57c18f67884e7c28424dba3c84c6 (patch) | |
| tree | fe389f774e2f0de6cd5562b9b349f727319cc03f /Makefile | |
| parent | 167609746d22951477abd6490b34480205c659af (diff) | |
debianization and a wrapper program for /usr/bin
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 27 |
1 files changed, 21 insertions, 6 deletions
@@ -1,20 +1,30 @@ -run: build +CABAL?=cabal + +run: deps build ./propellor dev: build tags -build: deps dist/setup-config - if ! cabal build; then cabal configure; cabal build; fi - ln -sf dist/build/propellor/propellor +build: dist/setup-config + if ! $(CABAL) build; then $(CABAL) configure; $(CABAL) build; fi + ln -sf dist/build/config/config propellor deps: @if [ $$(whoami) = root ]; then apt-get -y install gnupg ghc cabal-install libghc-missingh-dev libghc-ansi-terminal-dev libghc-ifelse-dev libghc-unix-compat-dev libghc-hslogger-dev libghc-network-dev libghc-async-dev; fi || true dist/setup-config: propellor.cabal - cabal configure + if [ "$(CABAL)" = ./Setup ]; then ghc --make Setup; fi + $(CABAL) configure + +install: + install -d $(DESTDIR)/usr/bin $(DESTDIR)/usr/src/propellor + install -s dist/build/propellor/propellor $(DESTDIR)/usr/bin + $(CABAL) sdist + cat dist/propellor-*.tar.gz | \ + (cd $(DESTDIR)/usr/src/propellor && tar zx --strip-components=1) clean: - rm -rf dist Setup tags propellor privdata/local + rm -rf dist Setup tags propellor propellor-wrapper privdata/local find -name \*.o -exec rm {} \; find -name \*.hi -exec rm {} \; @@ -22,4 +32,9 @@ clean: tags: find . | grep -v /.git/ | grep -v /tmp/ | grep -v /dist/ | grep -v /doc/ | egrep '\.hs$$' | xargs hothasktags > tags 2>/dev/null +# Upload to hackage. +hackage: + @cabal sdist + @cabal upload dist/*.tar.gz + .PHONY: tags |
