refresh to cabal-rpm-2.0.2

This commit is contained in:
Jens Petersen 2020-02-08 22:52:37 +08:00
parent 7aa2508117
commit 8a7be6ded3
1 changed files with 15 additions and 18 deletions

View File

@ -1,11 +1,9 @@
# generated by cabal-rpm-1.0.1
# generated by cabal-rpm-2.0.2
# https://fedoraproject.org/wiki/Packaging:Haskell
%global pkg_name uri-bytestring
%global pkgver %{pkg_name}-%{version}
%bcond_with tests
Name: ghc-%{pkg_name}
Version: 0.3.2.1
Release: 4%{?dist}
@ -27,18 +25,6 @@ BuildRequires: ghc-bytestring-prof
BuildRequires: ghc-containers-prof
BuildRequires: ghc-template-haskell-prof
BuildRequires: ghc-th-lift-instances-prof
%if %{with tests}
BuildRequires: ghc-HUnit-devel
BuildRequires: ghc-QuickCheck-devel
BuildRequires: ghc-base-compat-devel
BuildRequires: ghc-generics-sop-devel
BuildRequires: ghc-quickcheck-instances-devel
BuildRequires: ghc-semigroups-devel
BuildRequires: ghc-tasty-devel
BuildRequires: ghc-tasty-hunit-devel
BuildRequires: ghc-tasty-quickcheck-devel
BuildRequires: ghc-transformers-devel
%endif
# End cabal-rpm deps
%description
@ -62,6 +48,7 @@ This package provides the Haskell %{pkg_name} library development files.
%if %{with haddock}
%package doc
Summary: Haskell %{pkg_name} library documentation
BuildArch: noarch
%description doc
This package provides the Haskell %{pkg_name} library documentation.
@ -72,6 +59,7 @@ This package provides the Haskell %{pkg_name} library documentation.
%package prof
Summary: Haskell %{pkg_name} profiling library
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Supplements: (%{name}-devel and ghc-prof)
%description prof
This package provides the Haskell %{pkg_name} profiling library.
@ -82,6 +70,8 @@ This package provides the Haskell %{pkg_name} profiling library.
# Begin cabal-rpm setup:
%setup -q -n %{pkgver}
# End cabal-rpm setup
mv licenses/http-types/LICENSE licenses/LICENSE.http-types
sed -i -e s%licenses/http-types/LICENSE%licenses/LICENSE.http-types% %{pkg_name}.cabal
%build
@ -94,11 +84,16 @@ This package provides the Haskell %{pkg_name} profiling library.
# Begin cabal-rpm install
%ghc_lib_install
# End cabal-rpm install
mv licenses/http-types/LICENSE licenses/LICENSE.http-types
%check
%cabal_test
%if 0%{?fedora} < 31 || 0%{?rhel} < 8
%post devel
%ghc_pkg_recache
%postun devel
%ghc_pkg_recache
%endif
%files -f %{name}.files
@ -114,6 +109,8 @@ mv licenses/http-types/LICENSE licenses/LICENSE.http-types
%if %{with haddock}
%files doc -f %{name}-doc.files
%license LICENSE
%license licenses/LICENSE.http-types
%endif