summaryrefslogtreecommitdiff
path: root/libarchive.cabal
blob: 35ff19875962f6de54e46bce8f73ce8c457d6bda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
cabal-version:   1.18
name:            libarchive
version:         2.2.0.1
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