packages feed

libarchive-2.1.3.2: libarchive.cabal

cabal-version:   1.18
name:            libarchive
version:         2.1.3.2
license:         BSD3
license-file:    LICENSE
copyright:       Copyright: (c) 2018-2019 Vanessa McHale
maintainer:      vamchale@gmail.com
author:          Vanessa McHale
tested-with:     ghc ==8.4.4 ghc ==8.6.5 ghc ==8.8.1
bug-reports:     https://github.com/vmchale/libarchive/issues
synopsis:        Haskell interface to libarchive
description:
    Haskell bindings for [libarchive](https://www.libarchive.org/). Provides the ability to unpack archives, including the ability to unpack archives lazily.

category:        Codec
build-type:      Custom
extra-doc-files:
    README.md
    CHANGELOG.md

source-repository head
    type:     git
    location: https://github.com/vmchale/libarchive

custom-setup
    setup-depends:
        base -any,
        Cabal -any,
        chs-cabal -any

flag cross
    description: Set this flag if cross-compiling
    default:     False
    manual:      True

library
    exposed-modules:
        Codec.Archive
        Codec.Archive.Foreign
        Codec.Archive.Foreign.Archive
        Codec.Archive.Foreign.ArchiveEntry

    pkgconfig-depends: libarchive (==3.4.0 || >3.4.0) && <4.0
    hs-source-dirs:    src
    other-modules:
        Codec.Archive.Foreign.Archive.Macros
        Codec.Archive.Foreign.ArchiveEntry.Macros
        Codec.Archive.Pack
        Codec.Archive.Pack.Lazy
        Codec.Archive.Pack.Common
        Codec.Archive.Unpack.Lazy
        Codec.Archive.Unpack
        Codec.Archive.Types
        Codec.Archive.Types.Foreign
        Codec.Archive.Permissions
        Codec.Archive.Common
        Codec.Archive.Monad

    default-language:  Haskell2010
    other-extensions:  DeriveGeneric DeriveAnyClass
    ghc-options:
        -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
        -Wredundant-constraints

    build-depends:
        base >=4.9 && <5,
        bytestring -any,
        composition-prelude >=2.0.5.0,
        dlist -any,
        filepath -any,
        mtl >=2.2.1,
        unix-compat >=0.1.2.1,
        deepseq >=1.4.0.0

    if !flag(cross)
        build-tool-depends: c2hs:c2hs >=0.26.1

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

test-suite libarchive-test
    type:             exitcode-stdio-1.0
    main-is:          Spec.hs
    hs-source-dirs:   test
    other-modules:
        Codec.Archive.Roundtrip
        Codec.Archive.Test

    default-language: Haskell2010
    other-extensions: OverloadedStrings
    ghc-options:
        -threaded -rtsopts -with-rtsopts=-N -Wall -Wincomplete-uni-patterns
        -Wincomplete-record-updates -Wredundant-constraints

    build-depends:
        base -any,
        libarchive -any,
        hspec -any,
        bytestring -any,
        directory >=1.2.5.0,
        filepath -any,
        temporary -any,
        mtl >=2.2.2,
        dir-traverse -any,
        composition-prelude >=2.0.5.0

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists

benchmark libarchive-bench
    type:             exitcode-stdio-1.0
    main-is:          Bench.hs
    hs-source-dirs:   bench
    default-language: Haskell2010
    ghc-options:
        -Wall -Wincomplete-uni-patterns -Wincomplete-record-updates
        -Wredundant-constraints

    build-depends:
        base -any,
        libarchive -any,
        criterion -any,
        bytestring -any,
        tar -any,
        tar-conduit >=0.2.5,
        temporary -any

    if impl(ghc >=8.4)
        ghc-options: -Wmissing-export-lists