packages feed

Hayoo-1.2.3: Hayoo.cabal

name:          Hayoo
version:       1.2.3
license:       MIT
license-file:  LICENSE
author:        Sebastian M. Gauck, Timo B. Kranz, Uwe Schmidt
copyright:     Copyright (c) 2007 - 2012 Uwe Schmidt, Sebastian M. Gauck and Timo B. Kranz
maintainer:    Timo B. Kranz <tbh@holumbus.org>, Uwe Schmidt <uwe@fh-wedel.de>
stability:     experimental
category:      Text, Data
synopsis:      The Hayoo! search engine for Haskell API search on hackage
homepage:      http://holumbus.fh-wedel.de
description:   The Hayoo! search engine based no the Holumbus framework provides a document indexer
               and a crawler to build indexes over Haddock generated API documentation and packages
               as well as a query interface for these indexes.
               .
               Changes from 1.2.2: Optional use of new HashedIndex with DocIds generated by a hash function
cabal-version: >=1.6
build-type:    Simple
-- tested-with:  ghc-7.0.3 and ghc-7.4

extra-source-files:
    README
    index/hayoo/hayoo.css
    index/hayoo/fhw.gif
    index/hayoo/loader.gif
    index/hayoo/favicon.ico
    index/hayoo/content.js
    index/hayoo/hayoo.js
    index/hayoo/prototype.js
    index/hayoo/ft.png
    index/hayoo/hayoo.png
    index/hayoo/hol.png
    index/hayoo/holumbus.png
    index/hayoo/minus.png
    index/hayoo/plus.png
    index/hayoo/opensearch.xml

-- ------------------------------------------------------------

source-repository head
  type:     git
  location: https://github.com/fortytools/holumbus

-- ------------------------------------------------------------

Flag hayooSnap4
  Description: Build Hayoo! search with Snap server version 4 or version 7
  Default: True

Flag hashedIndex
  Description:  Build with hashed index instead of compact index.
                The main difference between CompactIndex (default) and
                HashedIndex is the generation of document ids.
                With CompactIndex the document ids are generated sequentially
                by using a counter. So the ids are only valid per index.
                With HashedIndex the ids are generated by computing a hash value (64 bit)
                from the document URL. So these ids are valid across different indexes.
                This enables easy and efficient merging of separatly generated indexes.
                Updating indexes becomes mutch easier with this strategy.
                The drawback is a larger inverted index. The small numbers in the CompactIndex
                can be compressed much better than the large numbers generated by the hash function.
  Default:      False

-- ------------------------------------------------------------

executable hayooIndexer
  main-is:      HayooIndexer.hs

  other-modules:  Hayoo.PackageInfo
                , Hayoo.URIConfig
                , Hayoo.PackageArchive
                , Hayoo.IndexTypes
                , Hayoo.Haddock
                , Hayoo.HackagePackage
                , Hayoo.IndexConfig

  build-depends:  base                   >= 4     && < 5
                , binary                 >= 0.5   && < 1
                , bytestring             >= 0.9   && < 1
                , bzlib                  >= 0.4   && < 1
                , enummapset             >= 0     && < 1
                , filepath               >= 1     && < 2
                , Holumbus-Searchengine  >= 1.2.3 && < 2
                , hxt                    >= 9.1   && < 10
                , hxt-cache              >= 9     && < 10
                , hxt-charproperties     >= 9     && < 10
                , hxt-curl               >= 9     && < 10
                , hxt-http               >= 9     && < 10
                , hxt-regex-xmlschema    >= 9     && < 10
                , hxt-xpath              >= 9.1   && < 10
                , network                >= 2.1   && < 3
                , old-time               >= 1     && < 2
                , parsec                 >= 2.1   && < 4
                , process                >= 1     && < 2
                , tar                    >= 0.3   && < 1
                , zlib                   >= 0.5   && < 1 

  -- instance NFData (Map k v) has moved from deepseq into containers (dependency hell)
  if impl( ghc < 7.4 )
    build-depends: containers             >= 0.2   && < 0.4.2
                 , deepseq                >= 1.1   && < 1.2
  else
    build-depends: containers             >= 0.4.2
                 , deepseq                >= 1.2

  hs-source-dirs: src

  ghc-options:   -threaded
                 -Wall
                 -funbox-strict-fields

  if impl( ghc >= 7 )
    ghc-options: -rtsopts
                 -fwarn-tabs

  extensions:    CPP

  if flag(hashedIndex)
    cpp-options: -DhashedIndex=1
  else
    cpp-options: -DhashedIndex=0

-- ------------------------------------------------------------

Executable hayooSnap
  hs-source-dirs: src

  main-is:        HayooSnap.hs
  
  other-modules:  Hayoo.FunctionInfo
                , Hayoo.IndexTypes
                , Hayoo.PackageInfo
                , Hayoo.PackageRank
                , Hayoo.Search.Common
                , Hayoo.Search.EvalSearch
                , Hayoo.Search.HTML
                , Hayoo.Search.JSON
                , Hayoo.Search.Pages.Static
                , Hayoo.Search.Pages.Template
                , Hayoo.Search.Parser
                , Hayoo.Signature

  if flag(hayooSnap4)
    other-modules: Hayoo.Snap.Application
                 , Hayoo.Snap.Extension.HayooState
                 , Hayoo.Snap.Site

  build-depends:   base                      >= 4     && < 5
                 , bytestring                >= 0.9.1 && < 0.10
                 , Holumbus-Searchengine     >= 1.2.3 && < 2
                 , hxt                       >= 9     && < 10
                 , hxt-unicode               >= 9     && < 10
                 , json                      >= 0.4   && < 1
                 , MonadCatchIO-transformers >= 0.2.1 && < 0.3
                 , mtl                       >= 2     && < 3
                 , text                      >= 0.11  && < 1
                 , transformers              >= 0.2.2 && < 0.3
                 , xhtml-combinators         >= 0.2.2 && < 0.3

  if flag(hayooSnap4)
    build-depends: base                      >= 4     && < 5
                 , snap                      >= 0.4   && < 0.6
                 , snap-core                 >= 0.4   && < 0.6
                 , snap-server               >= 0.4   && < 0.6
  else
    build-depends: containers
                 , data-lens                 >= 2
                 , data-lens-template        >= 2.1   && < 2.2
                 , filepath
                 , heist                     >= 0.7   && < 0.9
                 , snap                      >= 0.7   && <0.8
                 , snap-core                 >= 0.7   && <0.8
                 , snap-server               >= 0.7   && <0.8

  extensions:    TypeSynonymInstances MultiParamTypeClasses

  ghc-options:   -threaded
                 -Wall
                 -funbox-strict-fields
                 -fno-warn-orphans

  if impl( ghc >= 7 )
    ghc-options: -rtsopts
                 -fwarn-tabs
                 -fno-warn-unused-do-bind

  extensions:    CPP

  if flag(hashedIndex)
    cpp-options: -DhashedIndex=1
  else
    cpp-options: -DhashedIndex=0

  if flag(hayooSnap4)
    cpp-options: -DhayooSnap4=1
  else
    cpp-options: -DhayooSnap4=0

-- ------------------------------------------------------------