]> gitweb @ CieloNegro.org - blackboard-dns.git/commitdiff
Initial revision of the Blackboard DDNS.
authorPHO <pho@cielonegro.org>
Sat, 30 May 2009 03:14:30 +0000 (12:14 +0900)
committerPHO <pho@cielonegro.org>
Sat, 30 May 2009 03:14:30 +0000 (12:14 +0900)
.gitignore [new file with mode: 0644]
GNUmakefile [new file with mode: 0644]
Main.hs [new file with mode: 0644]
Setup.lhs [new file with mode: 0644]
blackboard-ddns.cabal [new file with mode: 0644]
cabal-package.mk [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..30e9e85
--- /dev/null
@@ -0,0 +1,5 @@
+dist
+Setup
+
+*.o
+*.hi
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644 (file)
index 0000000..f258db0
--- /dev/null
@@ -0,0 +1,3 @@
+RUN_COMMAND = ./dist/build/blackboard-ddns/blackboard-ddns
+
+include cabal-package.mk
diff --git a/Main.hs b/Main.hs
new file mode 100644 (file)
index 0000000..d82a4bd
--- /dev/null
+++ b/Main.hs
@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = return ()
diff --git a/Setup.lhs b/Setup.lhs
new file mode 100644 (file)
index 0000000..5bde0de
--- /dev/null
+++ b/Setup.lhs
@@ -0,0 +1,3 @@
+#!/usr/bin/env runhaskell
+> import Distribution.Simple
+> main = defaultMain
diff --git a/blackboard-ddns.cabal b/blackboard-ddns.cabal
new file mode 100644 (file)
index 0000000..d30a78a
--- /dev/null
@@ -0,0 +1,21 @@
+Name:                blackboard-ddns
+Version:             0.1
+Synopsis:            <Project description>
+Description:         <Project description>
+Category:            Network
+License:             PublicDomain
+Author:              PHO <pho at cielonegro.org>
+Maintainer:          PHO <pho at cielonegro.org>
+Stability:           Experimental
+Cabal-Version:       >= 1.2
+Build-Type:          Simple
+
+Executable blackboard-ddns
+    Build-Depends:
+        base, haskelldb
+
+    Main-Is:
+        Main.hs
+
+    GHC-Options:
+        -Wall
diff --git a/cabal-package.mk b/cabal-package.mk
new file mode 100644 (file)
index 0000000..a37d18e
--- /dev/null
@@ -0,0 +1,56 @@
+# -*- makefile-gmake -*-
+#
+# Variables:
+#
+#   CONFIGURE_ARGS :: arguments to be passed to ./Setup configure
+#     default: --disable-optimization
+#
+#   RUN_COMMAND :: command to be run for "make run"
+#
+
+GHC   ?= ghc
+FIND  ?= find
+RM_RF ?= rm -rf
+SUDO  ?= sudo
+
+SETUP_FILE ?= $(wildcard Setup.*hs)
+CABAL_FILE ?= $(wildcard *.cabal)
+
+CONFIGURE_ARGS := --disable-optimization
+
+build: dist/setup-config Setup
+       ./Setup build
+
+ifeq ($(RUN_COMMAND),)
+run:
+       @echo "cabal-package.mk: No command to run."
+       @echo "cabal-package.mk: If you want to run something, define RUN_COMMAND variable."
+else
+run: build
+       @echo ".:.:. Let's go .:.:."
+       $(RUN_COMMAND)
+endif
+
+dist/setup-config: $(CABAL_FILE) Setup
+       ./Setup configure $(CONFIGURE_ARGS)
+
+Setup: $(SETUP_FILE)
+       $(GHC) --make Setup
+
+clean:
+       $(RM_RF) dist Setup *.o *.hi .setup-config *.buildinfo
+       $(FIND) . -name '*~' -exec rm -f {} \;
+
+doc: dist/setup-config Setup
+       ./Setup haddock
+
+install: build
+       $(SUDO) ./Setup install
+
+sdist: Setup
+       ./Setup sdist
+
+test: build
+       ./Setup test
+
+.PHONY: build run clean install doc sdist test