name:                reliable-download
# do not modify version if lib/ code is not changed.
# real app version: 1.3.0.0
version:             1.2.6.0
synopsis:            provide reliable download service via HTTP
description:         reliable-download web application and cli tool
homepage:            "https://gitlab.emacsos.com/sylecn/reliable-download"
bug-reports:         "https://gitlab.emacsos.com/sylecn/reliable-download/issues"
license:             GPL-3
author:              Yuanle Song
maintainer:          sylecn@gmail.com
copyright:           "Copyright: (c) 2018, 2019, 2022, 2024 Yuanle Song"
category:            Utilities
extra-source-files:
- README.md

ghc-options:
  - -Wall
  - -Werror
  - -O2
  # - -fprof-auto

default-extensions:
  - OverloadedStrings
  - ScopedTypeVariables

dependencies:
  - base >= 4.7 && < 5
  # project specific
  - http-types
  - scotty
  - wai
  - warp
  - wai-middleware-static
  - hedis
  - cryptohash
  - byteable
  - network
  - ansi-wl-pprint
  # file system
  - directory
  - filepath
  - unix
  # data types
  - bytestring
  - text
  - utf8-string
  - unordered-containers
  - aeson
  - extra
  # general utils
  - transformers
  - optparse-applicative
  - formatting
  - tinylog
  - errors

library:
  source-dirs: lib

executables:
  rd-api:
    source-dirs: rd-api
    main: RD.Server.Cli.Main
    dependencies:
    - reliable-download
    ghc-options:
    - -threaded
    - -O2
  rd:
    source-dirs: rd
    main: RD.Client.Main
    dependencies:
    - reliable-download
    - io-thread-pool
    - http-conduit
    - http-client
    - retry
    - socket
    ghc-options:
    - -threaded
    - -O2
  maybet:
    source-dirs: misc/maybet
    main: Main
    ghc-options:
    - -threaded
  logtest:
    source-dirs: misc/logtest
    main: Main
    ghc-options:
    - -threaded

tests:
  all-tests:
    main: Main
    source-dirs:
    - test
    - rd-api
    dependencies:
    - reliable-download
    - hspec
    - hspec-wai
    - http-types
    - http-client
    - wai-extra
    - unordered-containers
    - binary
