Name:             rpmbuild-order
Version:          0.4.1
License:          BSD3
License-File:     LICENSE
Author:           Henning Thielemann <haskell@henning-thielemann.de>
Maintainer:       Jens Petersen <petersen@redhat.com>
Copyright:        2010-2018  Henning Thielemann,
                  2018-2020 Jens Petersen <petersen@redhat.com>
Category:         Distribution
Homepage:         https://github.com/juhp/rpmbuild-order
Bug-reports:      https://github.com/juhp/rpmbuild-order/issues
Synopsis:         Order RPM packages by dependencies
Description:
  The rpmbuild-order tool orders RPM packages by dependencies, so that they can
  be built in the correct order. It does this by reading RPM package spec files
  and then topologically sorts them according to their dependencies.
  The code originated from cabal-sort by Henning Thielemann.
  It can also output the ordered dependencies or reverse depends
  for one or more packages, provided all the packages are checked out
  in neighboring directories. This is also useful to see what packages
  are affected when a low-level package changes.

  Since version 0.4 there is a library too.
Tested-with:       GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4,
                   GHC == 7.10.3, GHC == 8.0.2, GHC == 8.2.2,
                   GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4,
                   GHC == 8.10.1
Cabal-Version:     >=1.10
Build-Type:        Simple
Extra-source-files: README.md TODO ChangeLog.md rpmbuild-order.1
                    test/pkgs/A/A.spec
                    test/pkgs/B/B.spec
                    test/pkgs/C/C.spec
                    test/pkgs/D1.0/D1.0.spec

source-repository head
  type:     git
  location: https://github.com/juhp/rpmbuild-order

Executable rpmbuild-order
  Build-Depends: base < 5,
                 bytestring,
                 directory,
                 extra,
                 fgl,
                 optparse-applicative,
                 rpmbuild-order,
                 simple-cmd-args

  Main-Is:          src/Main.hs
  Other-modules:    Paths_rpmbuild_order
  GHC-Options:         -Wall
  if impl(ghc >= 8.0)
    ghc-options:       -Wcompat
                       -Widentities
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wredundant-constraints
  if impl(ghc >= 8.2)
    ghc-options:       -fhide-source-paths
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
                       -Wpartial-fields
  default-language: Haskell2010

Library
  Exposed-Modules:  Distribution.RPM.Build.Graph
                    Distribution.RPM.Build.Order
  Build-Depends: base < 5,
                 Cabal,
                 case-insensitive,
                 containers,
                 directory,
                 extra >= 1.6.4,
                 filepath,
                 fgl,
                 process
  HS-Source-Dirs:      src
  GHC-Options:         -Wall
  if impl(ghc >= 8.0)
    ghc-options:       -Wcompat
                       -Widentities
                       -Wincomplete-uni-patterns
                       -Wincomplete-record-updates
                       -Wredundant-constraints
  if impl(ghc >= 8.2)
    ghc-options:       -fhide-source-paths
  if impl(ghc >= 8.4)
    ghc-options:       -Wmissing-export-lists
                       -Wpartial-fields

  default-language:    Haskell2010

test-suite test
    main-is: Spec.hs
    type: exitcode-stdio-1.0
    hs-source-dirs: test

    default-language: Haskell2010

    ghc-options:   -Wall
    build-depends: base >= 4 && < 5
                 , extra
                 , hspec >= 1.3
                 , rpmbuild-order
                 , unix