name:                btrfs
version:             0.1.1.1
synopsis:            Bindings to the btrfs API
description:
  This package provides low-level bindings to the btrfs API (i.e. the
  @BTRFS_IOC_@* @ioctl@s). Currently, only a subset of the API is
  supported, including functions needed to work with subvolumes/snapshots
  as well as file cloning.
  .
  In order to build this package, @linux-headers@ need to be installed.
  .
  Warning: btrfs is still considered experimental. This module is also
  experimental and may contain serious bugs that may result in data loss.
  Do not use it on data that has not been backed up yet.
homepage:            https://github.com/redneb/hs-btrfs
bug-reports:         https://github.com/redneb/hs-btrfs/issues
license:             BSD3
license-file:        LICENSE
author:              Marios Titas <rednebΑΤgmxDΟΤcom>
maintainer:          Marios Titas <rednebΑΤgmxDΟΤcom>
category:            System, Filesystem
build-type:          Simple
cabal-version:       >=1.10

extra-source-files:
  ChangeLog
  include/missing.h
  include/btrfs/ctree.h
  include/btrfs/extent-cache.h
  include/btrfs/extent_io.h
  include/btrfs/ioctl.h
  include/btrfs/kerncompat.h
  include/btrfs/list.h
  include/btrfs/radix-tree.h
  include/btrfs/rbtree.h
  make-bytestring.hs

source-repository head
  type: git
  location: https://github.com/redneb/hs-btrfs.git

flag examples
  description:         Build examples
  default:             False

library
  exposed-modules:     System.Linux.Btrfs, System.Linux.Btrfs.ByteString,
                       System.Linux.Btrfs.UUID
  other-modules:       Data.Word.Endian, System.Linux.Btrfs.Time,
                       System.Linux.Btrfs.FilePathLike
  build-depends:       base >=4.6 && <5, unix >=2.6,
                       time >=1.4, bytestring >=0.9
  include-dirs:        include
  build-tools:         hsc2hs
  default-language:    Haskell2010
  ghc-options:         -Wall

executable btrfs-defrag
  hs-source-dirs:      examples
  main-is:             btrfs-defrag.hs
  if !flag(examples)
    buildable:           False
  else
    build-depends:       base >=4.6 && <5, btrfs, unix, filepath
    default-language:    Haskell2010
    ghc-options:         -Wall

executable btrfs-clone-range
  hs-source-dirs:      examples
  main-is:             btrfs-clone-range.hs
  if !flag(examples)
    buildable:           False
  else
    build-depends:       base >=4.6 && <5, btrfs
    default-language:    Haskell2010
    ghc-options:         -Wall

executable btrfs-list-subvols
  hs-source-dirs:      examples
  main-is:             btrfs-list-subvols.hs
  if !flag(examples)
    buildable:           False
  else
    build-depends:       base >=4.6 && <5, btrfs
    default-language:    Haskell2010
    ghc-options:         -Wall