[Pkg-haskell-commits] r708 - in /packages/haskell-http/trunk: ./ Network/ debian/ debian/patches/ test/

arjan at users.alioth.debian.org arjan at users.alioth.debian.org
Mon May 28 03:44:12 UTC 2007


Author: arjan
Date: Mon May 28 03:44:12 2007
New Revision: 708

URL: http://svn.debian.org/wsvn/pkg-haskell/?sc=1&rev=708
Log:
* New upstream release.

Added:
    packages/haskell-http/trunk/HTTP.cabal
      - copied unchanged from r707, packages/haskell-http/branches/upstream/current/HTTP.cabal
    packages/haskell-http/trunk/debian/
    packages/haskell-http/trunk/debian/changelog
    packages/haskell-http/trunk/debian/compat
    packages/haskell-http/trunk/debian/control
    packages/haskell-http/trunk/debian/copyright
    packages/haskell-http/trunk/debian/haskell-http-doc.dirs
    packages/haskell-http/trunk/debian/haskell-http-doc.doc-base
    packages/haskell-http/trunk/debian/haskell-http-doc.docs
    packages/haskell-http/trunk/debian/haskell-http-doc.examples
    packages/haskell-http/trunk/debian/libhugs-http.install
    packages/haskell-http/trunk/debian/libhugs-http.linda-overrides
    packages/haskell-http/trunk/debian/mk-haskell-depends
    packages/haskell-http/trunk/debian/patches/
    packages/haskell-http/trunk/debian/patches/00list
    packages/haskell-http/trunk/debian/rules
    packages/haskell-http/trunk/debian/watch
Removed:
    packages/haskell-http/trunk/Makefile
    packages/haskell-http/trunk/README
    packages/haskell-http/trunk/http.cabal
    packages/haskell-http/trunk/test/
Modified:
    packages/haskell-http/trunk/Network/Browser.hs
    packages/haskell-http/trunk/Network/HTTP.hs

Modified: packages/haskell-http/trunk/Network/Browser.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/Network/Browser.hs?rev=708&op=diff
==============================================================================
--- packages/haskell-http/trunk/Network/Browser.hs (original)
+++ packages/haskell-http/trunk/Network/Browser.hs Mon May 28 03:44:12 2007
@@ -37,6 +37,14 @@
     setAllowRedirects,
     getAllowRedirects,
     
+    Authority(..),
+    getAuthorities, 
+    setAuthorities, 
+    addAuthority, 
+    getAuthorityGen, 
+    setAuthorityGen, 
+    setAllowBasicAuth,
+
     setCookieFilter,
     defaultCookieFilter,
     userCookieFilter,
@@ -90,8 +98,7 @@
        ; return str
        }
 
-word = many1 (satisfy (\x -> isAlphaNum x || x=='_' || x=='.'))
-
+word = many1 (satisfy (\x -> isAlphaNum x || x=='_' || x=='.' || x=='-' || x==':'))
 
 -- misc string fns
 trim :: String -> String
@@ -157,8 +164,10 @@
 
 
 
-
+defaultCookieFilter :: URI -> Cookie -> IO Bool
 defaultCookieFilter url cky = return True
+
+userCookieFilter :: URI -> Cookie -> IO Bool
 userCookieFilter url cky =
     do putStrLn ("Set-Cookie received when requesting: " ++ show url)
        case ckComment cky of
@@ -222,14 +231,14 @@
         -- all keys in the result list MUST be in lower case
         cdetail :: Parser [(String,String)]
         cdetail = many $
-            do { spaces
+            try (do { spaces
                ; char ';'
                ; spaces
                ; s1 <- word
                ; spaces
                ; s2 <- option "" (do { char '=' ; spaces ; v <- cvalue ; return v })
                ; return (map toLower s1,s2)
-               }
+               })
 
         mkCookie :: String -> String -> [(String,String)] -> Cookie
         mkCookie nm val more = MkCookie { ckName=nm
@@ -248,7 +257,10 @@
     where
         fn = filter (not . (==c))
 
+setCookies :: [Cookie] -> BrowserAction ()
 setCookies cs = alterBS (\b -> b { bsCookies=cs })
+
+getCookies :: BrowserAction [Cookie]
 getCookies = getBS bsCookies
 
 -- ...get domain specific cookies...
@@ -444,7 +456,7 @@
         match (AuthDigest _ _ _ _ _ ds _ _) = or (map matchURI ds)            
 
         matchURI :: URI -> Bool
-        matchURI s = (authority s == dom) && (path s `isPrefixOf` pth)
+        matchURI s = (uriToAuthorityString s == dom) && (uriPath s `isPrefixOf` pth)
     
 
 -- | Interacting with browser state:
@@ -479,7 +491,7 @@
 anticipateChallenge :: Request -> BrowserAction (Maybe Authority)
 anticipateChallenge rq =
     let uri = rqURI rq in
-    do { authlist <- getAuthFor (authority uri) (path uri)
+    do { authlist <- getAuthFor (uriToAuthorityString uri) (uriPath uri)
        ; return (listToMaybe authlist)
        }
 
@@ -693,6 +705,7 @@
 
 
 -- Surely the most important bit:
+request :: Request -> BrowserAction (URI,Response)
 request = request' initialState
     where
         initialState = (0,0,0,True)
@@ -702,7 +715,7 @@
 request' (denycount,redirectcount,retrycount,preempt) rq =
     do -- add cookies to request
        let uri = rqURI rq
-       cookies <- getCookiesFor (authority uri) (path uri)
+       cookies <- getCookiesFor (uriToAuthorityString uri) (uriPath uri)
        
        when (not $ null cookies) 
             (out $ "Adding cookies to request.  Cookie names: " 
@@ -738,7 +751,7 @@
 
                -- add new cookies to browser state
                let cookieheaders = retrieveHeaders HdrSetCookie rsp
-               let newcookies = concat (map (headerToCookies $ authority uri) cookieheaders)
+               let newcookies = concat (map (headerToCookies $ uriToAuthorityString uri) cookieheaders)
 
                when (not $ null newcookies)
                     (out $ foldl (\x y -> x ++ "\n  " ++ show y) "Cookies received:" newcookies)
@@ -827,7 +840,7 @@
                             (Header _ u:_) -> case parseURIReference u of
                                 Just newuri ->
                                     do { out ("Retrying with proxy " ++ show newuri ++ "...")
-                                       ; setProxy (Proxy (authority newuri) Nothing)
+                                       ; setProxy (Proxy (uriToAuthorityString newuri) Nothing)
                                        ; request' (0,0,retrycount+1,True) rq
                                        }
                                 Nothing ->
@@ -914,6 +927,10 @@
                      . (regname++)
                      . (port++)) ""
 
+-- This function duplicates old Network.URI.authority behaviour.
+uriToAuthorityString :: URI -> String
+uriToAuthorityString u = maybe "" uriAuthToString (uriAuthority u)
+
 
 
 ------------------------------------------------------------------
@@ -923,6 +940,7 @@
 
 libUA = "haskell-libwww/0.1"
 
+defaultGETRequest :: URI -> Request
 defaultGETRequest uri = 
     Request { rqURI=uri
             , rqBody=""
@@ -951,7 +969,8 @@
                        , rqURI=u { uriQuery= '?' : enc }  -- What about old query?
                        }
         POST -> Request { rqMethod=POST
-                        , rqHeaders=[ Header HdrContentLength (show $ length enc) ]
+                        , rqHeaders=[ Header HdrContentType "application/x-www-form-urlencoded",
+                                      Header HdrContentLength (show $ length enc) ]
                         , rqBody=enc
                         , rqURI=u
                         }

Modified: packages/haskell-http/trunk/Network/HTTP.hs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/Network/HTTP.hs?rev=708&op=diff
==============================================================================
--- packages/haskell-http/trunk/Network/HTTP.hs (original)
+++ packages/haskell-http/trunk/Network/HTTP.hs Mon May 28 03:44:12 2007
@@ -724,7 +724,7 @@
 				           ++ auth ++ "'"
 		 where auth = case findHeader HdrHost r of
 			      Just h -> h
-			      Nothing -> authority (rqURI r)
+			      Nothing -> uriToAuthorityString (rqURI r)
 
 sendHTTP :: Stream s => s -> Request -> IO (Result Response)
 sendHTTP conn rq = 
@@ -834,7 +834,7 @@
         fixHostHeader :: Request -> Request
         fixHostHeader rq =
             let uri = rqURI rq
-                host = authority uri
+                host = uriToAuthorityString uri
             in insertHeaderIfMissing HdrHost host rq
                                      
         -- Looks for a "Connection" header with the value "close".
@@ -844,6 +844,13 @@
             case lookupHeader HdrConnection hdrs of
                 Nothing -> False
                 Just x  -> map toLower (trim x) == "close"
+
+-- This function duplicates old Network.URI.authority behaviour.
+uriToAuthorityString :: URI -> String
+uriToAuthorityString URI{uriAuthority=Nothing} = ""
+uriToAuthorityString URI{uriAuthority=Just ua} = uriUserInfo ua ++
+                                                 uriRegName ua ++
+                                                 uriPort ua
 
 -- | Receive and parse a HTTP request from the given Stream. Should be used 
 --   for server side interactions.

Added: packages/haskell-http/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/changelog?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/changelog (added)
+++ packages/haskell-http/trunk/debian/changelog Mon May 28 03:44:12 2007
@@ -1,0 +1,182 @@
+haskell-http (30000000-1~pre1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - Update XS-Vcs-* fields as the packages has moved to the pkg-haskell
+      subversion archive.
+    - Add the missing (build) dependencies on lib*parsec-* packages.
+  * debian/{mk-haskell-depends,rules}:
+    - Small cleanups.
+  * debian/watch:
+    - Updated for the new location of upstream tarballs.
+  * Generate links to other API documentation packages:
+    - debian/control:
+      + Add libghc6-base-doc, libghc6-network-doc and libghc6-parsec-doc
+        to the Build-Depends-Indep so haddock can link to names in other
+        packages.
+      + Add libghc6-base-doc, libghc6-network-doc and libghc5-parsec-doc
+        to the Recommends of haskell-http-doc.
+  
+ -- Arjan Oosting <arjan at debian.org>  Mon, 28 May 2007 04:47:52 +0200
+
+haskell-http (20060707-4) unstable; urgency=low
+
+  * debian/control:
+    - Update Build-Depends-Indep and Depends for the modular packaging of
+      Hugs version 98.200609.21.
+    - Wrap Build-Depends, Build-Depends-Indep and Depends lines.
+    - Add ${misc:Depends} entries.
+    - Add doc-base to the Recommends field of haskell-edison-doc.
+
+ -- Arjan Oosting <arjan at debian.org>  Tue, 17 Apr 2007 10:44:16 +0200
+
+haskell-http (20060707-3) unstable; urgency=low
+
+  * debian/control:
+      - Add XS-Vcs-Browser field.
+      - Indent Homepage field.
+  * debian/mk-haskell-depends: update script to take installed package
+    configuration files as arguments.
+
+ -- Arjan Oosting <arjan at debian.org>  Thu, 12 Apr 2007 10:14:34 +0200
+
+haskell-http (20060707-2) unstable; urgency=medium
+
+  * Rebuild against latest GHC (Closes: #394656)
+  * Stop using update-haskell-control and $ghc6_* variables, as it is not
+    necessary and not using it simplifies the work for porters and for me.
+  * debian/control: 
+    - added XS-Vcs-Svn field pointing to Subversion archive which contains
+      this package.
+    - added libghc6-network-dev to Build-Depends.
+    - added dctrl-tools to Build-Depends as it is needed by
+      debian/mk-haskell-depends.
+    - change maintainer email address.
+  * debian/rules:
+    - add debian/mk-haskell-depends script which determines all
+      dependencies by using the installed package description file used by
+      ghc-pkg.
+    - ensure the correct path for haddock-interfaces and haddock-html is
+      used when registering the package.
+  
+ -- Arjan Oosting <arjan at debian.org>  Mon, 23 Oct 2006 14:53:38 +0200
+
+haskell-http (20060707-1) unstable; urgency=low
+
+  * New upstream release. (Closes: #375588)
+  * All the dpatches are obsolete due to changes upstream, thus all
+    dpatches are dropped.  
+  * debian/control.in: remove cpphs from Build-Depends.
+  * debian/copyright: update copyright years with information from
+    LICENSE file.
+  * debian/rules: 
+  
+ -- Arjan Oosting <arjanoosting at home.nl>  Sat,  8 Jul 2006 16:41:34 +0200
+
+haskell-http (0.4.20050430-4) unstable; urgency=low
+
+  * Cleanup the diff.gz a little by switching to dpatch. The diff.gz now
+    only touches the files in the debian directory.
+  * Drop patch to README which is not installed anyway.
+  * Remove the support for the old Network.URI module from the diff.gz as
+    ghc6 and hugs both have the new Network.URI module.
+  * debian/control.in:
+    - remove duplicate build dependencies
+    - add versioned Build-Depends on ghc6 to get the latest version of Cabal.
+    - drop the Build-Depends on libghc6-cabal-dev.
+    - added ppc64 to Architectures line. (Closes: #375609)
+    - add dpatch to Build-Depends.
+  * debian/haskell-http-doc.docs: added. Install the API documentation.
+  * debian/haskell-http-doc.doc-base: added. Register API documentation.
+  * debian/patches/01_zord64-haddock.dpatch: added. Remove preprocessing
+    stuff which is confusing haddock and breaks build with Cabal 1.1.4.
+  * debian/patches/02_update-cabal.dpatch: added. Move the patches to the
+    http.cabal file in here.
+  * debian/rules:
+    - remove unnecessary variables.
+    - only call ./setup clean when it is configured.
+  * Only install example in haskell-http-doc.
+
+ -- Arjan Oosting <arjanoosting at home.nl>  Fri, 30 Jun 2006 20:32:34 +0200
+
+haskell-http (0.4.20050430-3) unstable; urgency=low
+
+  * debian/rules:
+    - remove INSTALL_PROGRAM += -s cruft, we use dh_strip.
+    - remove configure and install targets, almost everything is done in
+      the binary-arch and binary-indep targets.
+  * debian/control.in:
+    - remove the versioned dependency on ghc6 version 6.4.2 as it is not
+      yet in the archive anyway.
+    - Upgrade to Standards-Version 3.7.2. No changes needed.	
+    - Use the new substitution variables source:Version and build depend
+      on dpkg-dev (>= 1.13.19) which introduces these new variables.
+
+ -- Arjan Oosting <arjanoosting at home.nl>  Mon,  8 May 2006 19:59:36 +0200
+
+haskell-http (0.4.20050430-2) unstable; urgency=low
+
+  * Take over maintainership with permission of previous maintainer.
+  * Run update-haskell-control to update the Build-Depends, Depends and
+    Architecture lines. (Closes: #337979, #360878, #336396, #336268)   
+  * Remove support for nhc98 from the package.
+  * debian/control.in:
+    - Move haskell-http-doc to section doc.
+    - Change to Standards-Version 3.6.2. No changes needed.
+    - Cleanup the Build-Depends and Build-Depends-Indep
+    - Add Homepage: http://www.haskell.org/http/ to the descriptions.
+    - Properly escape ${haskell:Depends}.  
+    - Add versioned libghc6-cabal-dev and ghc6 to the Build-Depends to use
+      Cabal version 1.1.1 or later which introduces a new installation
+      prefix for libraries.
+    libghc6-http-dev determinable.
+  * debian/compat: added and set debhelper compatability level to 5.
+  * debian/copyright: updated.
+  * debian/haskell-http-doc.dirs: added.
+  * debian/libhugs-http.install: added.
+  * debian/libhugs-http.linda-overrides: added. The *.hs files need to be
+    installed in /usr/lib/hugs/ so override linda warning. 
+  * debian/rules: 
+    - split the dh_haskell -a -i call two calls. Move all the architecture
+      independent stuff to binary-indep and all the architecture dependent
+      stuff to binary-arch. (Closes: #315333)
+    - remove the empty directory usr/lib/haskell-packages/ghc6/bin 
+      (Closes: #324718)
+    - do not ignore errors on clean and remove redundant make clean call.
+    - general cleanup.
+  * debian/watch: added watch file.
+  * http.cabal: add package base to Build-Depends.
+  
+ -- Arjan Oosting <arjanoosting at home.nl>  Thu, 20 Apr 2006 11:45:51 +0200
+
+haskell-http (0.4.20050430-1) unstable; urgency=low
+
+  * Updated to upstream snapshot 20050430
+  * Add .examples files with test/get.hs (Closes: #304760)
+  * A new upstream version (2005.5.5) is available, but will have
+    to wait until licensing issues on a newly-introduced library
+    dependency can be resolved
+  * Add haddock docs in the haskell-http-doc package
+  * Use update-haskell-control from haskell-utils for build deps (Closes: #310111)
+
+ -- Ganesh Sittampalam <ganesh at earth.li>  Fri, 10 Jun 2005 15:11:38 +0100
+
+haskell-http (0.4.20041219-2) unstable; urgency=low
+
+  * Updated to use haskell-devscripts 0.5.6 (fixes #303073)
+
+ -- Ganesh Sittampalam <ganesh at earth.li>  Mon, 11 Apr 2005 23:07:33 +0100
+
+haskell-http (0.4.20041219-1) unstable; urgency=low
+
+  * New upstream snapshot
+  * Added hugs package
+
+ -- Ganesh Sittampalam <ganesh at earth.li>  Sun, 19 Dec 2004 21:39:19 +0000
+
+haskell-http (0.4-1) unstable; urgency=low
+
+  * Initial Debian package.
+
+ -- Ganesh Sittampalam <ganesh at earth.li>  Tue,  7 Dec 2004 02:11:23 +0000
+

Added: packages/haskell-http/trunk/debian/compat
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/compat?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/compat (added)
+++ packages/haskell-http/trunk/debian/compat Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+5

Added: packages/haskell-http/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/control?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/control (added)
+++ packages/haskell-http/trunk/debian/control Mon May 28 03:44:12 2007
@@ -1,0 +1,51 @@
+Source: haskell-http
+Priority: optional
+Section: net
+Maintainer: Arjan Oosting <arjan at debian.org>
+Build-Depends: dctrl-tools, dpkg-dev (>= 1.13.19), debhelper (>= 5.0.0), dpatch, 
+ haskell-devscripts (>= 0.5.6), ghc6 (>= 6.4.2), libghc6-network-dev,
+ libghc6-parsec-dev 
+Build-Depends-Indep: haddock, hugs, 
+ libhugs-network | hugs (<< 98.200609.21),
+ libhugs-parsec  | hugs (<< 98.200609.21),
+ libghc6-base-doc, libghc6-network-doc, libghc6-parsec-doc
+Standards-Version: 3.7.2
+XS-Vcs-Svn: svn://svn.debian.org/svn/pkg-haskell/packages/haskell-http
+XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http
+
+Package: libghc6-http-dev
+Section: devel
+Architecture: any
+Depends: ${haskell:Depends}, ${misc:Depends}
+Suggests: haskell-http-doc (= ${source:Version})
+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.
+ .
+  Homepage: http://www.haskell.org/http/
+
+Package: libhugs-http
+Section: devel
+Architecture: all
+Depends: ${haskell:Depends}, libhugs-network | hugs (<< 98.200609.21),
+ libhugs-parsec | hugs (<< 98.200609.21), ${misc:Depends}
+Suggests: haskell-http-doc (= ${source:Version})
+Description: Hugs 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 for use by the Hugs interpreter.
+ .
+  Homepage: http://www.haskell.org/http/
+
+Package: haskell-http-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}
+Recommends: doc-base, libghc6-base-doc, libghc6-network-doc, libghc6-parsec-doc
+Description: Haskell HTTP client library documentation
+ HTTP is a set of Haskell client libraries for HTTP/1.0 and HTTP/1.1.
+ .
+ This package contains the library documentation.
+ .
+  Homepage: http://www.haskell.org/http/

Added: packages/haskell-http/trunk/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/copyright?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/copyright (added)
+++ packages/haskell-http/trunk/debian/copyright Mon May 28 03:44:12 2007
@@ -1,0 +1,67 @@
+This package was originally debianised by Ganesh Sittampalam
+<ganesh at earth.li> on Mon, 13 Dec 2004.
+
+The current Debian maintainer is Arjan Oosting <arjanoosting at home.nl>
+
+It was downloaded from the darcs repository at
+http://cvs.haskell.org/darcs/http/ - you can install darcs using
+apt-get, then do 'darcs get http://cvs.haskell.org/darcs/http/' to get
+the latest version of the program. The list of patch IDs that were
+included in this specific release can be found in the file
+upstream-spec. Running the command 'darcs init' in an empty directory
+followed by 'darcs pull "hash 2004..."'  for each of these patch IDs
+will allow you to reconstruct the version used in this release.
+
+The homepage for the module is http://www.haskell.org/http/
+
+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-2005, Ganesh Sittampalam
+  Copyright (c) 2004-2005, Dominic Steinitz
+
+  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.
+
+Debian packaging copyright:
+
+  (C) 2004-2005 Ganesh Sittampalam <ganesh at earth.li> 
+  (C) 2006 Arjan Oosting <arjanoosting at home.nl>
+
+  The initial Debian packaging was done by Ganesh Sittampalam and did
+  not have explicit copyright statements. See the Debian changelog for
+  the list of changes.  Presumably all his changes may be
+  redistributed under the same terms as haskell-http itself. 
+
+  Changes by Arjan Oosting may be redistributed under the same terms
+  as haskell-http itself.

Added: packages/haskell-http/trunk/debian/haskell-http-doc.dirs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/haskell-http-doc.dirs?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/haskell-http-doc.dirs (added)
+++ packages/haskell-http/trunk/debian/haskell-http-doc.dirs Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+usr/share/doc/haskell-http-doc

Added: packages/haskell-http/trunk/debian/haskell-http-doc.doc-base
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/haskell-http-doc.doc-base?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/haskell-http-doc.doc-base (added)
+++ packages/haskell-http/trunk/debian/haskell-http-doc.doc-base Mon May 28 03:44:12 2007
@@ -1,0 +1,9 @@
+Document: haskell-http-api
+Title: Haskell HTTP API documentation
+Author: Bjorn Bringert
+Abstract: The API documentation for the Haskell HTTP library.
+Section: Apps/Programming
+
+Format: HTML
+Index: /usr/share/doc/haskell-http-doc/html/index.html
+Files: /usr/share/doc/haskell-http-doc/html/*.html

Added: packages/haskell-http/trunk/debian/haskell-http-doc.docs
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/haskell-http-doc.docs?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/haskell-http-doc.docs (added)
+++ packages/haskell-http/trunk/debian/haskell-http-doc.docs Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+dist/doc/html

Added: packages/haskell-http/trunk/debian/haskell-http-doc.examples
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/haskell-http-doc.examples?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/haskell-http-doc.examples (added)
+++ packages/haskell-http/trunk/debian/haskell-http-doc.examples Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+test/get.hs

Added: packages/haskell-http/trunk/debian/libhugs-http.install
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/libhugs-http.install?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/libhugs-http.install (added)
+++ packages/haskell-http/trunk/debian/libhugs-http.install Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+debian/libhugs-http.linda-overrides usr/share/linda/overrides/libhugs-http

Added: packages/haskell-http/trunk/debian/libhugs-http.linda-overrides
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/libhugs-http.linda-overrides?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/libhugs-http.linda-overrides (added)
+++ packages/haskell-http/trunk/debian/libhugs-http.linda-overrides Mon May 28 03:44:12 2007
@@ -1,0 +1,2 @@
+Tag: usr-lib-in-arch-all
+Data:.*hs

Added: packages/haskell-http/trunk/debian/mk-haskell-depends
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/mk-haskell-depends?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/mk-haskell-depends (added)
+++ packages/haskell-http/trunk/debian/mk-haskell-depends Mon May 28 03:44:12 2007
@@ -1,0 +1,250 @@
+#! /bin/sh
+#
+# Determine package dependencies from installed-pkg-config file
+#
+# Copyright (C) 2006 Arjan Oosting <arjan at debian.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of either:
+#
+# 1) The terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License along
+#    with this program; if not, write to the Free Software Foundation, Inc.,
+#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# 2) BSD 3-clause license.
+# 
+#    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.
+
+set -e 
+
+sort_uniq(){
+    { 
+	for i in "$@" ; do
+	    echo $i
+	done
+    } | sort -u | tr "\n" " "
+}
+
+dependency(){
+    local package
+    local version
+    local next_upstream_version
+    package=$1
+    version=`dpkg-query --showformat='${Version}' -W $package` 
+    next_upstream_version=`echo $version | sed -e 's/-[^-]*$/+/'`
+    echo "$package (>= $version), $package (<< $next_upstream_version)"
+}
+
+dependencies(){
+    local package
+    local packages
+    local deps
+    packages=$@
+    for package in `sort_uniq $packages` ; do
+	deps="$deps, `dependency $package`"
+    done
+
+    echo $deps | sed -e 's/^,[ ]*//'
+}
+
+providing_package_for_ghc6(){
+    local package
+    local dep
+    local dir
+    local dirs
+    local lib
+    dep=$1
+    dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
+    lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+    for dir in $dirs ; do
+	if [ -e "$dir/lib$lib.a" ] ; then
+	    package=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+	    continue
+	fi
+    done
+    echo $package
+}
+
+providing_package_for_ghc6_prof(){
+    local package
+    local dep
+    local dir
+    local dirs
+    local lib
+    dep=$1
+    dirs=`ghc-pkg6 field $dep library-dirs | cut -d':' -f 2`
+    lib=`ghc-pkg6 field $dep hs-libraries | sed -e 's|hs-libraries: *\([^ ]*\).*|\1|' `
+    for dir in $dirs ; do
+	if [ -e "$dir/lib$lib_p.a" ] ; then
+	    package=`dpkg-query -S $dir/lib$lib.a | cut -d':' -f 1` || exit $?
+	    continue
+	fi
+    done
+    echo $package
+}
+
+cabal_depends(){
+    local config
+    local dep
+    local depends
+    local final_depends
+    until [ -z "$1" ]
+    do
+      config=$1
+      depends="$depends `grep-dctrl -n -i -s Depends "" $config | tr "," " "`"
+      shift
+    done
+    for dep in `sort_uniq $depends` ; do
+	# The package is not mentioned in the ignored package list with the same version 
+	# or mentioned without any version in the ignored package list?
+	if  echo " $ignores " | grep -qv " $dep " && 
+	    echo " $ignores " | grep -qv " `echo $dep | sed s%-[0-9][.0-9a-zA-Z]*$%%` " ; 
+	then
+	    final_depends="$final_depends $dep"
+	fi
+    done
+    echo $final_depends
+}
+
+depends_for_ghc6(){
+    local dep
+    local packages
+    for dep in `cabal_depends $@` ; do
+	packages="$packages `providing_package_for_ghc6 $dep`"
+    done
+ 
+    dependencies $packages
+}
+
+depends_for_ghc6_prof(){
+    local dep
+    local packages
+    for dep in `cabal_depends $@` ; do
+	packages="$packages `providing_package_for_ghc6_prof $dep`"
+    done
+ 
+    dependencies $packages
+}
+
+find_config_for_ghc6(){
+    local f
+    local pkg
+    pkg=$1
+    case "$pkg" in
+	libghc6-*-prof)
+	    pkg=`echo $pkg | sed -e 's/-prof$/-dev$/'`
+	    ;;
+	*)
+	    ;;
+    esac
+    for f in debian/$pkg/usr/lib/haskell-packages/ghc6/lib/*/installed-pkg-config ; do
+	if [ -f "$f" ] ; then
+	    echo $f
+	    break
+	fi
+    done
+}
+
+
+if ! [ `which grep-dctrl` > /dev/null ] ; then 
+    echo "grep-dctrl is missing" >&2 
+    exit 1
+fi
+
+args=
+ignores=
+files=
+until [ -z "$1" ]
+do 
+  case "$1" in
+      -X*)
+          pkg=${1##-X}
+	  ignores="$ignores $pkg"
+	  ;;
+
+      --exclude=*)
+	  pkg=${1##--exclude=}
+	  ignores="$ignores $pkg"
+	  ;;
+
+      -*)
+	  args="$args $1"
+	  ;;
+      *)
+	  if [ -f $1 ] ; then
+	      files="$files $1"
+	  else
+	      echo "Installed package description file $1 can not be found" >&2
+	      exit 1
+	  fi
+	  ;;
+  esac
+  shift
+done
+
+for pkg in `dh_listpackages $args`; do
+    sfile=debian/$pkg.substvars
+    touch $sfile
+
+    case "$pkg" in
+	libghc6-*-dev|libghc6-*-prof)
+	    config=`find_config_for_ghc6 $pkg`
+	    if [ -f "$config" ] ; then
+		files="$files $config"
+	    fi
+	    if [ -z "$files" ] ; then
+	      echo "No installed package description files can not be found" >&2
+	      exit 1
+	    fi
+	    grep -v ^haskell:Depends $sfile > $sfile.tmp || true
+	    case "$pkg" in
+		libghc6-*-dev)
+		    echo "haskell:Depends=`depends_for_ghc6 $files`" >> $sfile.tmp
+		    ;;
+		libghc6-*-prof)
+		    echo "haskell:Depends=`depends_for_ghc6_prof $files`" >> $sfile.tmp
+		    ;;
+	    esac
+	    mv $sfile.tmp $sfile
+	    ;;
+	*)
+	    ;;
+    esac
+done

Added: packages/haskell-http/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/patches/00list?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/patches/00list (added)
+++ packages/haskell-http/trunk/debian/patches/00list Mon May 28 03:44:12 2007
@@ -1,0 +1,1 @@
+

Added: packages/haskell-http/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/rules?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/rules (added)
+++ packages/haskell-http/trunk/debian/rules Mon May 28 03:44:12 2007
@@ -1,0 +1,67 @@
+#!/usr/bin/make -f
+
+# include dpatch
+include /usr/share/dpatch/dpatch.make
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+build: patch-stamp
+
+clean: clean-patched unpatch
+clean-patched:
+	dh_testdir
+	dh_testroot
+	if [ -x setup ] && [ -e .setup-config ]; then ./setup clean ; fi
+	rm -rf setup Setup.hi Setup.ho Setup.o .*config* dist html
+	dh_clean 
+
+install: install-arch install-indep
+install-arch: patch-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k -s
+	dh_installdirs -s
+	dh_haskell -s
+	find "$(CURDIR)/debian/libghc6-http-dev/usr/lib/haskell-packages/" -empty -type d -delete
+	sed -i -e "s%haddock-interfaces:.*%haddock-interfaces: /usr/share/doc/haskell-http-doc/html/HTTP.haddock%" \
+	    -e "s%haddock-html: .*%haddock-html: /usr/share/doc/haskell-http-doc/html%" \
+	    -e "s%include-dirs: .*%include-dirs:%" \
+	    debian/libghc6-http-dev/usr/lib/haskell-packages/ghc6/lib/*/installed-pkg-config
+	dh_install -s
+
+install-indep: patch-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k -i
+	dh_installdirs -i
+	dh_haskell -i
+	./setup haddock
+	dh_install -i
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common: 
+	dh_installchangelogs 
+	dh_installdocs 
+	dh_installexamples 
+	dh_compress -X.haddock 
+	dh_fixperms 
+	dh_installdeb 
+	dh_shlibdeps 
+	sh -e debian/mk-haskell-depends
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Build architecture independant packages using the common target.
+binary-indep: install-indep
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+# Build architecture dependant packages using the common target.
+binary-arch: install-arch
+	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: binary-arch  binary-indep
+.PHONY: build clean clean-patched binary-arch binary-indep binary install-indep install-arch install

Added: packages/haskell-http/trunk/debian/watch
URL: http://svn.debian.org/wsvn/pkg-haskell/packages/haskell-http/trunk/debian/watch?rev=708&op=file
==============================================================================
--- packages/haskell-http/trunk/debian/watch (added)
+++ packages/haskell-http/trunk/debian/watch Mon May 28 03:44:12 2007
@@ -1,0 +1,3 @@
+version=3
+opts="uversionmangle=s/\.(\d)(?=\.|$)/0$1/g;s/\.(\d\d)(?=\.|$)/$1/g" \
+http://hackage.haskell.org/cgi-bin/hackage-scripts/package/HTTP /packages/archive/HTTP/.*/HTTP-([\d\.]*)\.tar\.gz




More information about the Pkg-haskell-commits mailing list