Blob Blame Raw
# generated by cabal-rpm-0.12.3
# https://fedoraproject.org/wiki/Packaging:Haskell
# But see the comment at the top of the files section

%global pkg_name bdcs
%global pkgver %{pkg_name}-%{version}

%bcond_with tests

Name:           ghc-%{pkg_name}
Version:        0.6.1
Release:        3%{?dist}
Summary:        Tools for managing a content store of software packages

License:        LGPLv2+
Url:            https://hackage.haskell.org/package/%{pkg_name}
Source0:        https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz

BuildRequires:  ghc-Cabal-devel
BuildRequires:  ghc-rpm-macros
# Begin cabal-rpm deps:
BuildRequires:  chrpath
BuildRequires:  ghc-aeson-devel
BuildRequires:  ghc-aeson-pretty-devel
BuildRequires:  ghc-bytestring-devel
BuildRequires:  ghc-codec-rpm-devel
BuildRequires:  ghc-cond-devel
BuildRequires:  ghc-conduit-combinators-devel
BuildRequires:  ghc-conduit-devel
BuildRequires:  ghc-conduit-extra-devel
BuildRequires:  ghc-containers-devel
BuildRequires:  ghc-content-store-devel
BuildRequires:  ghc-cpio-conduit-devel
BuildRequires:  ghc-cryptonite-devel
BuildRequires:  ghc-directory-devel
BuildRequires:  ghc-esqueleto-devel
BuildRequires:  ghc-exceptions-devel
BuildRequires:  ghc-filepath-devel
BuildRequires:  ghc-gi-gio-devel
BuildRequires:  ghc-gi-glib-devel
BuildRequires:  ghc-gi-ostree-devel
BuildRequires:  ghc-gitrev-devel
BuildRequires:  ghc-http-conduit-devel
BuildRequires:  ghc-lifted-base-devel
BuildRequires:  ghc-listsafe-devel
BuildRequires:  ghc-memory-devel
BuildRequires:  ghc-monad-control-devel
BuildRequires:  ghc-monad-logger-devel
BuildRequires:  ghc-monad-loops-devel
BuildRequires:  ghc-mtl-devel
BuildRequires:  ghc-network-uri-devel
BuildRequires:  ghc-parsec-devel
BuildRequires:  ghc-parsec-numbers-devel
BuildRequires:  ghc-persistent-devel
BuildRequires:  ghc-persistent-sqlite-devel
BuildRequires:  ghc-persistent-template-devel
BuildRequires:  ghc-regex-pcre-devel
BuildRequires:  ghc-resourcet-devel
BuildRequires:  ghc-split-devel
BuildRequires:  ghc-string-conversions-devel
BuildRequires:  ghc-tar-conduit-devel
BuildRequires:  ghc-tar-devel
BuildRequires:  ghc-temporary-devel
BuildRequires:  ghc-text-devel
BuildRequires:  ghc-time-devel
BuildRequires:  ghc-typed-process-devel
BuildRequires:  ghc-unix-devel
BuildRequires:  ghc-unordered-containers-devel
BuildRequires:  ghc-xml-conduit-devel
BuildRequires:  pkgconfig(ostree-1)
%if %{with tests}
BuildRequires:  ghc-HUnit-devel
BuildRequires:  ghc-hspec-devel
%endif
# End cabal-rpm deps

%description
This module provides a library and various tools for managing a content store
and metadata database. These store the contents of software packages that make
up a Linux distribution as well as a lot of metadata about those software
packages. Tools are included to construct those stores from pre-built software
and to pull files back out to turn into bootable images.


%package devel
Summary:        Haskell %{pkg_name} library development files
Provides:       %{name}-static = %{version}-%{release}
Provides:       %{name}-doc = %{version}-%{release}
%if %{defined ghc_version}
Requires:       ghc-compiler = %{ghc_version}
Requires(post): ghc-compiler = %{ghc_version}
Requires(postun): ghc-compiler = %{ghc_version}
%endif
Requires:       %{name}%{?_isa} = %{version}-%{release}
# Begin cabal-rpm deps:
Requires:       pkgconfig(ostree-1)
# End cabal-rpm deps

%description devel
This package provides the Haskell %{pkg_name} library development files.

%package devel-doc
Summary:        Haskell %{pkg_name} library development documentation
BuildArch:      noarch

%description devel-doc
This package provides the Haskell %{pkg_name} development documentation.


%prep
%setup -q -n %{pkgver}


%build
%ghc_lib_build


%install
%ghc_lib_install
%ghc_fix_rpath %{pkgver}
grep -v "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-nodoc.files
%if %{undefined without_haddock}
grep "%{_docdir}/ghc/html/libraries/%{pkgver}" %{name}-devel.files > %{name}-devel-doc.files
%endif


%check
%cabal_test


%post devel
%ghc_pkg_recache


%postun devel
%ghc_pkg_recache


# cabal-rpm does two things wrong here:
# (1) It puts all the executables into the devel package when they should be in the main.
# (2) It doesn't seem to understand "scope: private" on the subcommands, which means they
#     should live in libexecdir, not bindir.
%files -f %{name}.files
%license LICENSE
%{_bindir}/%{pkg_name}
%{_datadir}/%{pkgver}
%{_libexecdir}/%{pkgver}
%{_libexecdir}/%{pkgver}/bdcs-depsolve
%{_libexecdir}/%{pkgver}/bdcs-export
%{_libexecdir}/%{pkgver}/bdcs-import
%{_libexecdir}/%{pkgver}/bdcs-inspect
%{_libexecdir}/%{pkgver}/bdcs-tmpfiles
%{_libexecdir}/%{pkgver}/inspect-groups
%{_libexecdir}/%{pkgver}/inspect-ls
%{_libexecdir}/%{pkgver}/inspect-nevras


%files devel -f %{name}-devel-nodoc.files
%doc ChangeLog.md Dockerfile Dockerfile.build README.md


%if %{undefined without_haddock}
%files devel-doc -f %{name}-devel-doc.files
%doc ChangeLog.md
%endif


%changelog
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Thu May 17 2018 Fedora Haskell SIG <haskell@lists.fedoraproject.org> - 0.6.1-1
- spec file generated by cabal-rpm-0.12.3