-- Initial filelock.cabal generated by cabal init.  For further 
-- documentation, see http://haskell.org/cabal/users-guide/

name:                filelock
version:             0.1.1.5
synopsis:            Portable interface to file locking (flock / LockFileEx)
description:         This package provides an interface to Windows and Unix
                     file locking functionalities.
homepage:            http://github.com/takano-akio/filelock
license:             PublicDomain
license-file:        LICENSE
author:              Takano Akio
maintainer:          tak@anoak.io
-- copyright:           
category:            System
build-type:          Simple
-- extra-source-files:  
cabal-version:       >=1.10
extra-source-files:  tests/lock.log.expected
tested-with:         GHC ==8.4.2 || ==8.6.5 || ==8.8.3

library
  exposed-modules:     System.FileLock
  other-modules:       System.FileLock.Internal.Flock
                       System.FileLock.Internal.LockFileEx
  -- other-extensions:    
  build-depends:       base >=4.9.0.0 && <5
  -- hs-source-dirs:      
  default-language:    Haskell2010

  ghc-options:        -Wall
  if os(windows)
    cpp-options:      -DUSE_LOCKFILEEX
    build-depends:    Win32
  else
    cpp-options:      -DUSE_FLOCK
    build-depends:    unix

test-suite test
  type:               exitcode-stdio-1.0
  hs-source-dirs:     tests
  main-is:            test.hs
  build-depends:      filelock, process >= 1.2.1.0, async, base
  ghc-options:        -threaded
  default-language:   Haskell2010

test-suite interrupt
  type:               exitcode-stdio-1.0
  hs-source-dirs:     tests
  main-is:            interrupt.hs
  build-depends:      filelock, process >= 1.2.1.0, async, base
  ghc-options:        -threaded
  default-language:   Haskell2010
  if os(windows)
    buildable:        False

source-repository head
  type: git
  location: https://github.com/takano-akio/filelock.git