~singpolyma/cheogram

1ee27b573992d67f4368f22c24b318309d1ed0f8 — Stephen Paul Weber 5 years ago 7c42e96
Cabalize
6 files changed, 94 insertions(+), 1 deletions(-)

A .gitignore
M COPYING
A Makefile
A README
A Setup.hs
A cheogram.cabal
A .gitignore => .gitignore +2 -0
@@ 0,0 1,2 @@
dist/
report.html

M COPYING => COPYING +1 -1
@@ 1,4 1,4 @@
Copyright © 2015, Stephen Paul Weber <singpolyma.net>
Copyright © 2015-2017, Stephen Paul Weber <singpolyma.net>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above

A Makefile => Makefile +41 -0
@@ 0,0 1,41 @@
GHCFLAGS=-Wall -fno-warn-name-shadowing -XHaskell2010 -O2
HLINTFLAGS=-XHaskell98 -XCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8
VERSION=0.6

.PHONY: all shell clean doc install

all: report.html doc dist/build/libHScheogram-$(VERSION).a dist/cheogram-$(VERSION).tar.gz

install: dist/build/libHScheogram-$(VERSION).a
	cabal install

shell:
	ghci $(GHCFLAGS)

report.html: Main.hs
	-hlint $(HLINTFLAGS) --report $^

doc: dist/doc/html/cheogram/index.html README

README: cheogram.cabal
	tail -n+$$(( `grep -n ^description: $^ | head -n1 | cut -d: -f1` + 1 )) $^ > .$@
	head -n+$$(( `grep -n ^$$ .$@ | head -n1 | cut -d: -f1` - 1 )) .$@ > $@
	-printf ',s/        //g\n,s/^.$$//g\n,s/\\\\\\//\\//g\nw\nq\n' | ed $@
	$(RM) .$@

dist/doc/html/cheogram/index.html: dist/setup-config Main.hs
	cabal haddock --hyperlink-source

dist/setup-config: cheogram.cabal
	cabal configure

clean:
	find -name '*.o' -o -name '*.hi' | xargs $(RM)
	$(RM) -r dist

dist/build/libHScheogram-$(VERSION).a: dist/setup-config Main.hs
	cabal build --ghc-options="$(GHCFLAGS)"

dist/cheogram-$(VERSION).tar.gz: README dist/setup-config Main.hs
	cabal check
	cabal sdist

A README => README +1 -0
@@ 0,0 1,1 @@
Bridge between XMPP MUC and SMS.

A Setup.hs => Setup.hs +3 -0
@@ 0,0 1,3 @@
import Distribution.Simple

main = defaultMain

A cheogram.cabal => cheogram.cabal +46 -0
@@ 0,0 1,46 @@
name:            cheogram
version:         0.0.1
cabal-version:   >= 1.16
license:         OtherLicense
license-file:    COPYING
category:        Network
copyright:       © 2015-2017 Stephen Paul Weber
author:          Stephen Paul Weber <singpolyma@singpolyma.net>
maintainer:      Stephen Paul Weber <singpolyma@singpolyma.net>
stability:       experimental
tested-with:     GHC == 7.6.3
synopsis:        Groupchat for everyone!
homepage:        https://github.com/singpolyma/sgx-vitelity
bug-reports:     https://github.com/singpolyma/vgx-vitelity/issues
build-type:      Simple
description:
        Bridge between XMPP MUC and SMS.

extra-source-files:
        README

executable cheogram
        main-is: Main.hs
        default-language: Haskell2010

        build-depends:
                base == 4.*,
                basic-prelude,
                case-insensitive,
                containers,
                errors < 2.0.0,
                monads-tf,
                network,
                network-protocol-xmpp == 0.4.8,
                random,
                random-shuffle,
                stm,
                text,
                time,
                tokyocabinet-haskell,
                uuid,
                xml-types

source-repository head
        type:     git
        location: git://github.com/singpolyma/sgx-vitelity.git