From d860689e8c9d2ad30d4cd169aa82ef44ea7db6a2 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Wed, 24 Jan 2018 14:11:45 +0100 Subject: [PATCH] refresh to cabal-rpm-0.12.1 --- ghc-pem.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ghc-pem.spec b/ghc-pem.spec index 8c154a2..23d192f 100644 --- a/ghc-pem.spec +++ b/ghc-pem.spec @@ -1,7 +1,8 @@ -# generated by cabal-rpm-0.10.0 +# generated by cabal-rpm-0.12.1 # https://fedoraproject.org/wiki/Packaging:Haskell %global pkg_name pem +%global pkgver %{pkg_name}-%{version} %bcond_with tests @@ -12,7 +13,7 @@ Summary: Privacy Enhanced Mail (PEM) format reader and writer License: BSD Url: https://hackage.haskell.org/package/%{pkg_name} -Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source0: https://hackage.haskell.org/package/%{pkgver}/%{pkgver}.tar.gz BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros @@ -36,9 +37,12 @@ Privacy Enhanced Mail (PEM) format reader and writer. %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} %description devel @@ -46,7 +50,7 @@ This package provides the Haskell %{pkg_name} library development files. %prep -%setup -q -n %{pkg_name}-%{version} +%setup -q -n %{pkgver} %build @@ -56,13 +60,19 @@ This package provides the Haskell %{pkg_name} library development files. %install %ghc_lib_install -rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/README.md +rm %{buildroot}%{_datadir}/%{pkgver}/README.md %check %cabal_test +%post -p /sbin/ldconfig + + +%postun -p /sbin/ldconfig + + %post devel %ghc_pkg_recache @@ -73,7 +83,6 @@ rm %{buildroot}%{_datadir}/%{pkg_name}-%{version}/README.md %files -f %{name}.files %license LICENSE -%{_datadir}/%{pkg_name}-%{version} %files devel -f %{name}-devel.files