packages feed

flac-0.2.1: flac.cabal

cabal-version:      2.4
name:               flac
version:            0.2.1
license:            BSD-3-Clause
license-file:       LICENSE.md
maintainer:         Mark Karpov <markkarpov92@gmail.com>
author:             Mark Karpov <markkarpov92@gmail.com>
tested-with:        ghc ==9.4.7 ghc ==9.6.3 ghc ==9.8.1
homepage:           https://github.com/mrkkrp/flac
bug-reports:        https://github.com/mrkkrp/flac/issues
synopsis:           Complete high-level binding to libFLAC
description:        Complete high-level binding to libFLAC.
category:           Codec, Audio
build-type:         Simple
data-files:
    audio-samples/sample.flac
    audio-samples/*.rf64
    audio-samples/*.wav

extra-source-files: cbits/*.h
extra-doc-files:
    CHANGELOG.md
    README.md

source-repository head
    type:     git
    location: https://github.com/mrkkrp/flac.git

flag dev
    description: Turn on development settings.
    default:     False
    manual:      True

library
    exposed-modules:
        Codec.Audio.FLAC.Metadata
        Codec.Audio.FLAC.Metadata.CueSheet
        Codec.Audio.FLAC.StreamDecoder
        Codec.Audio.FLAC.StreamEncoder
        Codec.Audio.FLAC.StreamEncoder.Apodization

    c-sources:
        cbits/metadata_level2_helpers.c
        cbits/stream_decoder_helpers.c
        cbits/stream_encoder_helpers.c

    other-modules:
        Codec.Audio.FLAC.Metadata.Internal.Level2Interface
        Codec.Audio.FLAC.Metadata.Internal.Level2Interface.Helpers
        Codec.Audio.FLAC.Metadata.Internal.Object
        Codec.Audio.FLAC.Metadata.Internal.Types
        Codec.Audio.FLAC.StreamDecoder.Internal
        Codec.Audio.FLAC.StreamDecoder.Internal.Helpers
        Codec.Audio.FLAC.StreamDecoder.Internal.Types
        Codec.Audio.FLAC.StreamEncoder.Internal
        Codec.Audio.FLAC.StreamEncoder.Internal.Helpers
        Codec.Audio.FLAC.StreamEncoder.Internal.Types
        Codec.Audio.FLAC.Util

    default-language: GHC2021
    extra-libraries:  FLAC
    include-dirs:     cbits
    build-depends:
        base >=4.15 && <5,
        bytestring >=0.2 && <0.12,
        containers >=0.5 && <0.7,
        directory >=1.2.2 && <1.4,
        exceptions >=0.6 && <0.11,
        filepath >=1.2 && <1.5,
        mtl >=2 && <3,
        text >=0.2 && <2.2,
        vector >=0.10 && <0.14,
        wave >=0.1.2 && <0.3

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    if impl(ghc >=9.8)
        ghc-options: -Wno-x-partial

test-suite tests
    type:               exitcode-stdio-1.0
    main-is:            Spec.hs
    build-tool-depends: hspec-discover:hspec-discover >=2 && <3
    hs-source-dirs:     tests
    other-modules:
        Codec.Audio.FLAC.MetadataSpec
        Codec.Audio.FLAC.StreamEncoderSpec

    default-language:   GHC2021
    build-depends:
        base >=4.15 && <5,
        bytestring >=0.2 && <0.12,
        directory >=1.2.2 && <1.4,
        filepath >=1.2 && <1.5,
        flac,
        hspec >=2 && <3,
        temporary >=1.1 && <1.4,
        vector >=0.10 && <0.14,
        wave >=0.1.2 && <0.3

    if flag(dev)
        ghc-options:
            -Wall -Werror -Wredundant-constraints -Wpartial-fields
            -Wunused-packages

    else
        ghc-options: -Wall