[Pkg-haskell-commits] r710 - in /packages/haskell-http/branches/upstream/30000000: Makefile README debian/ debian/changelog debian/control debian/copyright debian/rules http.cabal test/ test/Makefile test/get.hs

arjan at users.alioth.debian.org arjan at users.alioth.debian.org
Mon May 28 04:02:49 UTC 2007


Author: arjan
Date: Mon May 28 04:02:49 2007
New Revision: 710

URL: http://svn.debian.org/wsvn/pkg-haskell/?sc=1&rev=710
Log: (empty)

Added:
    packages/haskell-http/branches/upstream/30000000/Makefile
    packages/haskell-http/branches/upstream/30000000/README
    packages/haskell-http/branches/upstream/30000000/debian/
    packages/haskell-http/branches/upstream/30000000/debian/changelog
    packages/haskell-http/branches/upstream/30000000/debian/control
    packages/haskell-http/branches/upstream/30000000/debian/copyright
    packages/haskell-http/branches/upstream/30000000/debian/rules
    packages/haskell-http/branches/upstream/30000000/http.cabal
    packages/haskell-http/branches/upstream/30000000/test/
    packages/haskell-http/branches/upstream/30000000/test/Makefile
    packages/haskell-http/branches/upstream/30000000/test/get.hs

Added: packages/haskell-http/branches/upstream/30000000/Makefile
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/Makefile?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/Makefile (added)
+++ packages/haskell-http/branches/upstream/30000000/Makefile Mon May 28 04:02:49 2007
@@ -1,0 +1,35 @@
+HADDOCK = haddock
+
+TODAY = $(shell date +%Y%m%d)
+DIST_NAME = http-$(TODAY)
+
+HADDOCK_FILES = Network/HTTP.hs Network/Browser.hs 
+
+.PHONY: all configure build install dist haddock clean
+
+default all: configure build
+
+configure:
+	./Setup.lhs configure
+
+build:
+	./Setup.lhs build
+
+install:
+	./Setup.lhs install
+
+dist:
+	darcs dist --dist-name=$(DIST_NAME)
+
+haddock: $(HADDOCK_FILES)
+	mkdir -p haddock
+	$(HADDOCK) -o haddock -h $^
+
+clean:
+	-./Setup.lhs clean
+	-rm -rf haddock
+	-rm -rf dist
+	$(MAKE) -C test clean
+
+setup: Setup.lhs
+	ghc --make -package Cabal -o setup Setup.lhs

Added: packages/haskell-http/branches/upstream/30000000/README
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/README?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/README (added)
+++ packages/haskell-http/branches/upstream/30000000/README Mon May 28 04:02:49 2007
@@ -1,0 +1,25 @@
+DESCRIPTION
+
+This is the Haskell HTTP and Browser module package. It was originally
+written by Wariick Gray and the original version is still available
+from: http://homepages.paradise.net.nz/warrickg/haskell/http/
+
+REQUIREMENTS
+
+* A Haskell implementation such as GHC (http://www.haskell.org/ghc/)
+or Hugs (http://www.haskell.org/hugs/) with support for Cabal.
+
+INSTALLATION
+
+
+* Configure:
+
+$ runhaskell Setup.lhs configure
+
+* Compile:
+
+$ runhaskell Setup.lhs build
+
+* Install (as root):
+
+# runhaskell Setup.lhs install

Added: packages/haskell-http/branches/upstream/30000000/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/debian/changelog?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/debian/changelog (added)
+++ packages/haskell-http/branches/upstream/30000000/debian/changelog Mon May 28 04:02:49 2007
@@ -1,0 +1,6 @@
+haskell-http (0.4-1) unstable; urgency=low
+
+  * Initial Debian package.
+
+ -- Ganesh Sittampalam <ganesh-debs at earth.li>  Tue,  7 Dec 2004 02:11:23 +0000
+

Added: packages/haskell-http/branches/upstream/30000000/debian/control
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/debian/control?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/debian/control (added)
+++ packages/haskell-http/branches/upstream/30000000/debian/control Mon May 28 04:02:49 2007
@@ -1,0 +1,27 @@
+Source: haskell-http
+Priority: optional
+Section: net
+Maintainer: Ganesh Sittampalam <ganesh-debs at earth.li>
+Build-Depends: debhelper (>= 4.0.0), haskell-devscripts (>=0.5.2), ghc6 (>=6.2.2), ghc6 (<6.2.3), libghc6-cabal-dev (>=0.2-3)
+Standards-Version: 3.6.1
+
+Package: libghc6-http-dev
+Section: devel
+Architecture: any
+Depends: ${haskell:Depends}
+Description: GHC 6 libraries for the Haskell HTTP client library
+ HTTP is a set of Haskell client libraries for HTTP/1.0 and HTTP/1.1.
+ .
+ This package contains the libraries compiled for GHC 6.
+
+# Package: libnhc98-http-dev
+# Section: devel
+# Architecture: any
+# Description: <insert up to 60 chars description>
+#  <insert long description, indented with spaces>
+# 
+# Package: libhugs-http-dev
+# Section: devel
+# Architecture: any
+# Description: <insert up to 60 chars description>
+#  <insert long description, indented with spaces>

Added: packages/haskell-http/branches/upstream/30000000/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/debian/copyright?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/debian/copyright (added)
+++ packages/haskell-http/branches/upstream/30000000/debian/copyright Mon May 28 04:02:49 2007
@@ -1,0 +1,42 @@
+This package was debianised by Ganesh Sittampalam <ganesh-debs at earth.li>
+on Mon, 13 Dec 2004.
+
+It was downloaded using 'darcs get http://cvs.haskell.org/darcs/http/' ;
+the homepage for the module is
+http://www.dtek.chalmers.se/~d00bring/haskell-xml-rpc/http.html
+
+Copyright (c) 2002, Warrick Gray
+Copyright (c) 2002, Ian Lynagh
+Copyright (c) 2003-2004, Bjorn Bringert
+Copyright (c) 2004, Andre Furtado
+Copyright (c) 2004, Ganesh Sittampalam
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+
+    * Redistributions in binary form must reproduce the above
+      copyright notice, this list of conditions and the following
+      disclaimer in the documentation and/or other materials provided
+      with the distribution.
+
+    * The names of contributors may not be used to endorse or promote
+      products derived from this software without specific prior
+      written permission. 
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Added: packages/haskell-http/branches/upstream/30000000/debian/rules
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/debian/rules?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/debian/rules (added)
+++ packages/haskell-http/branches/upstream/30000000/debian/rules Mon May 28 04:02:49 2007
@@ -1,0 +1,93 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+        CFLAGS += -O0
+else
+        CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+        INSTALL_PROGRAM += -s
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+	ghc -package Cabal Setup.lhs -o setup
+	./setup configure --prefix=$(LIBPATH) --ghc
+
+	touch configure-stamp
+
+build: build-stamp
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	-./setup clean
+	-make clean
+	-rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist html
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs -a 
+
+	# Add here commands to install the package into debian/tmp
+	dh_haskell -a
+
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -a
+	dh_installdocs -a
+	dh_installexamples -a
+#	dh_install
+#	dh_installmenu
+#	dh_installdebconf       
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman -a
+	dh_link -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+binary: binary-arch
+.PHONY: build clean binary-arch binary install configure

Added: packages/haskell-http/branches/upstream/30000000/http.cabal
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/http.cabal?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/http.cabal (added)
+++ packages/haskell-http/branches/upstream/30000000/http.cabal Mon May 28 04:02:49 2007
@@ -1,0 +1,26 @@
+Name: HTTP
+Version: 2006.7.7
+License: BSD3
+License-file: LICENSE
+Copyright: 
+  Copyright (c) 2002, Warrick Gray
+  Copyright (c) 2002-2005, Ian Lynagh
+  Copyright (c) 2003-2006, Bjorn Bringert
+  Copyright (c) 2004, Andre Furtado
+  Copyright (c) 2004, Ganesh Sittampalam
+  Copyright (c) 2004-2005, Dominic Steinitz
+Author: Warrick Gray <warrick.gray at hotmail.com>
+Maintainer: Bjorn Bringert <bjorn at bringert.net>
+Homepage: http://www.haskell.org/http/
+Description: A library for client-side HTTP
+Build-depends: base, network, parsec
+Exposed-modules: 
+                 Network.Stream,
+                 Network.TCP,                
+		 Network.HTTP,
+                 Network.Browser
+Other-modules:
+                 Network.HTTP.Base64,
+                 Network.HTTP.MD5,
+                 Network.HTTP.MD5Aux
+GHC-options: -O

Added: packages/haskell-http/branches/upstream/30000000/test/Makefile
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/test/Makefile?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/test/Makefile (added)
+++ packages/haskell-http/branches/upstream/30000000/test/Makefile Mon May 28 04:02:49 2007
@@ -1,0 +1,16 @@
+GHC = ghc
+GHCFLAGS = -O2 -package HTTP
+
+TEST_PROGS = get
+
+.SUFFIXES: .hs .hi .o
+
+.PHONY: all clean
+
+default all: $(TEST_PROGS)
+
+%: %.hs
+	$(GHC) $(GHCFLAGS) --make -o $@ $<
+
+clean:
+	-rm -f *.hi *.o $(TEST_PROGS)

Added: packages/haskell-http/branches/upstream/30000000/test/get.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/branches/upstream/30000000/test/get.hs?rev=710&op=file
==============================================================================
--- packages/haskell-http/branches/upstream/30000000/test/get.hs (added)
+++ packages/haskell-http/branches/upstream/30000000/test/get.hs Mon May 28 04:02:49 2007
@@ -1,0 +1,49 @@
+-- A simple test program which takes a url on the commandline
+-- and outputs the contents to stdout.
+
+-- ghc --make -package HTTP get.hs -o get
+
+import Data.Char (intToDigit)
+import Network.HTTP
+import Network.URI
+import System.Environment (getArgs)
+import System.Exit (exitFailure)
+import System.IO (hPutStrLn, stderr)
+
+main = 
+    do
+    args <- getArgs
+    case args of 
+	[addr] -> case parseURI addr of
+		       Nothing -> err "Could not parse URI"
+		       Just uri -> do
+				   cont <- get uri
+			           putStr cont
+	_ -> err "Usage: get <url>"
+
+err :: String -> IO a
+err msg = do 
+	  hPutStrLn stderr msg
+	  exitFailure
+
+get :: URI -> IO String
+get uri =
+    do
+    eresp <- simpleHTTP (request uri)
+    resp <- handleE (err . show) eresp
+    case rspCode resp of
+                      (2,0,0) -> return (rspBody resp)
+                      _ -> err (httpError resp)
+    where
+    showRspCode (a,b,c) = map intToDigit [a,b,c]
+    httpError resp = showRspCode (rspCode resp) ++ " " ++ rspReason resp
+
+request :: URI -> Request
+request uri = Request{ rqURI = uri,
+                       rqMethod = GET,
+                       rqHeaders = [],
+                       rqBody = "" }
+
+handleE :: Monad m => (ConnError -> m a) -> Either ConnError a -> m a
+handleE h (Left e) = h e
+handleE _ (Right v) = return v




More information about the Pkg-haskell-commits mailing list