Name:                zip-archive
Version:             0.3.2.6
Cabal-Version:       >= 1.10
Build-type:          Custom
Synopsis:            Library for creating and modifying zip archives.
Description:         The zip-archive library provides functions for creating, modifying,
                     and extracting files from zip archives.
Category:            Codec
Tested-with:         GHC == 7.8.2, GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2
License:             BSD3
License-file:        LICENSE
Homepage:            http://github.com/jgm/zip-archive
Author:              John MacFarlane
Maintainer:          jgm@berkeley.edu
Extra-Source-Files:  changelog
                     README.markdown
                     tests/test4.zip
                     tests/test4/a.txt
                     tests/test4/b.bin
                     "tests/test4/c/with spaces.txt"
                     tests/zip_with_symlinks.zip

Source-repository    head
  type:              git
  location:          git://github.com/jgm/zip-archive.git

flag splitBase
  Description:       Choose the new, smaller, split-up base package.
  Default:           True
flag executable
  Description:       Build the Zip executable.
  Default:           False

Library
  if flag(splitBase)
    Build-depends:   base >= 3 && < 5, pretty, containers
  else
    Build-depends:   base < 3
  Build-depends:     binary >= 0.6, zlib, filepath, bytestring >= 0.10.0,
                     array, mtl, text >= 0.11, digest >= 0.0.0.1,
                     directory >= 1.2.0, time
  Exposed-modules:   Codec.Archive.Zip
  Default-Language:  Haskell98
  Hs-Source-Dirs:    src
  Ghc-Options:       -Wall
  if os(windows)
    cpp-options:     -D_WINDOWS
  else
    Build-depends:   unix

custom-setup
  setup-depends: base, Cabal

Executable zip-archive
  if flag(executable)
    Buildable:       True
  else
    Buildable:       False
  Main-is:           Main.hs
  Hs-Source-Dirs:    .
  Build-Depends:     base >= 4.2 && < 5,
                     directory >= 1.1,
                     bytestring >= 0.9.0,
                     zip-archive
  Other-Modules:     Paths_zip_archive
  Ghc-Options:       -Wall
  Default-Language:  Haskell98

Test-Suite test-zip-archive
  Type:           exitcode-stdio-1.0
  Main-Is:        test-zip-archive.hs
  Hs-Source-Dirs: tests
  Build-Depends:  base >= 4.2 && < 5,
                  directory >= 1.3, bytestring >= 0.9.0, process, time,
                  HUnit, zip-archive, temporary, filepath
  Default-Language:  Haskell98
  Ghc-Options:    -Wall
  if os(windows)
    cpp-options:     -D_WINDOWS
  else
    Build-tools:     unzip
    Build-depends:   unix