# https://fedoraproject.org/wiki/Packaging:Haskell %global ghc_without_dynamic 1 %global ghc_without_shared 1 %global without_prof 1 %global without_haddock 1 %global pkg_name rpmbuild-order %global pkgver %{pkg_name}-%{version} # nothing to see here %global debug_package %{nil} Name: %{pkg_name} Version: 0.1 Release: 2%{?dist} Summary: Order RPM packages by dependencies License: BSD Url: https://hackage.haskell.org/package/%{name} Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros # Begin cabal-rpm deps: %if %{defined fedora} BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel %if 0%{?fedora} >= 29 BuildRequires: ghc-explicit-exception-devel %endif BuildRequires: ghc-fgl-devel BuildRequires: ghc-filepath-devel BuildRequires: ghc-process-devel BuildRequires: ghc-transformers-devel %else BuildRequires: ghc-libraries %endif # End cabal-rpm deps BuildRequires: cabal-install # for rpmspec Requires: rpm-build %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 originates 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 neighbouring directories. This is also useful to see what packages are affected when a low-level package changes. %prep %setup -q %build [ -d "$HOME/.cabal" ] || cabal update %global cabal cabal %cabal sandbox init %cabal install --only-dependencies %ghc_bin_build %install %ghc_bin_install %files %license LICENSE %doc ChangeLog README.md TODO %{_bindir}/%{name} %changelog * Wed Jul 25 2018 Jens Petersen - 0.1-1 - initial copr build