From c83bf5437e85fe671f6e113cfc6f0b4961f543c7 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Thu, 24 Apr 2014 19:51:44 +0400 Subject: [PATCH] Spellbind it under Cabal --- README.md | 19 +++++++++++++------ Setup.hs | 2 ++ pdns-pipe-nmc.cabal | 45 +++++++++++++++++++++++++++++++++++++++++++++ pdns-pipe-nmc.hs | 2 +- 4 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 Setup.hs create mode 100644 pdns-pipe-nmc.cabal diff --git a/README.md b/README.md index 462e334..bbb361c 100644 --- a/README.md +++ b/README.md @@ -15,16 +15,23 @@ frontend, and has simple backend interface. ## Building -The program is built as a single executable to be run by PowerDns's -pipe backend. It is written in [Haskell](http://www.haskell.org/). -There is no `cabal` configuration at the moment, so to build it, -simply run +The program is a single executable to be run by PowerDns's pipe +backend. It is written in [Haskell](http://www.haskell.org/). +If you have haskell installed on your system, run ``` -ghc --make pdns-pipe-nmc +cabal configure ``` -and install any missing packages it complains about. +followed by + +``` +cabal build +``` + +and hopefully it will tell you what packages are missing. You can +install them either with your OS package manager (if they exist in +your distribution) or with `cabal install`. ## Installing diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/pdns-pipe-nmc.cabal b/pdns-pipe-nmc.cabal new file mode 100644 index 0000000..7b0c66c --- /dev/null +++ b/pdns-pipe-nmc.cabal @@ -0,0 +1,45 @@ +name: pdns-pipe-nmc +version: 0.9.0.0 +synopsis: Namecoin pipe backend for PowerDNS +description: Realtime bridge between Namecoin "d/" namespace + (http://namecoin.info/) and DNS implemented as + a pipe backend coprocess for PowerDns + (http://www.powerdns.com/). +homepage: http://www.average.org/pdns-pipe-nmc/ +license: OtherLicense +license-file: LICENSE +author: Eugene Crosser +maintainer: crosser@average.org +copyright: 2014, Eugene Crosser +category: Database +build-type: Simple +extra-source-files: README.md +cabal-version: >=1.10 + +executable pdns-pipe-nmc + main-is: pdns-pipe-nmc.hs + other-modules: Config + , JsonRpcClient + , NmcDom + , NmcRpc + , NmcTransform + , PowerDns + other-extensions: OverloadedStrings + build-depends: base >=4.6 && <4.7 + , bytestring >=0.10 && <0.11 + , text >=0.11 && <0.12 + , split >=0.2 && <0.3 + , containers >=0.5 && <0.6 + , aeson >=0.6 && <0.7 + , ConfigFile >=1.1 && <1.2 + , MissingH >=1.2 && <1.3 + , vector >=0.10 && <0.11 + , unordered-containers >=0.2 && <0.3 + , data-default-class >=0.0.1 && <1.0 + , http-client >=0.3 && <1.0 + , http-types >=0.8 && <1.0 + , mtl >=2.0 && <3.0 + , pretty-show >=1.2 && <2.0 + , time >=1.4 && <2.0 + -- hs-source-dirs: + default-language: Haskell98 diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index eed5795..49cce86 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -21,7 +21,7 @@ import Data.Map.Lazy (Map, empty, lookup, insert, delete, size) import Data.Aeson (encode, decode, Value(..)) import Network.HTTP.Types import Network.HTTP.Client -import Data.Default (def) +import Data.Default.Class (def) import JsonRpcClient import Config -- 2.39.2