+#
+# Conditional build:
+%bcond_without prof # profiling library
+#
%define pkgname th-orphans
Summary: Orphan instances for TH datatypes
+Summary(pl.UTF-8): Osierocone instancje typów danych TH
Name: ghc-%{pkgname}
-Version: 0.6
+Version: 0.8
Release: 1
License: BSD
Group: Development/Languages
-Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
-# Source0-md5: 5a83e65313d0db9c044a440d664421fe
+#Source0Download: http://hackage.haskell.org/package/th-orphans
+Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: a2de789100ad8d7e5be157b9cd4255d5
Patch0: haddock.patch
-URL: http://hackage.haskell.org/package/th-orphans/
+Patch1: %{name}-deps.patch
+URL: http://hackage.haskell.org/package/th-orphans
BuildRequires: ghc >= 6.12.3
-BuildRequires: ghc-prof
-BuildRequires: ghc-th-lift
-BuildRequires: ghc-th-lift-prof
+BuildRequires: ghc-base >= 4.2
+BuildRequires: ghc-base < 4.8
+BuildRequires: ghc-template-haskell >= 2.4
+BuildRequires: ghc-template-haskell < 2.10
+BuildRequires: ghc-th-lift >= 0.5
+BuildRequires: ghc-th-lift < 0.7
+%if %{with prof}
+BuildRequires: ghc-prof >= 6.12.3
+BuildRequires: ghc-base-prof >= 4.2
+BuildRequires: ghc-base-prof < 4.8
+BuildRequires: ghc-template-haskell-prof >= 2.4
+BuildRequires: ghc-template-haskell-prof < 2.10
+BuildRequires: ghc-th-lift-prof >= 0.5
+BuildRequires: ghc-th-lift-prof < 0.7
+%endif
BuildRequires: rpmbuild(macros) >= 1.608
%requires_releq ghc
Requires(post,postun): /usr/bin/ghc-pkg
-Requires: ghc-th-lift
+Requires: ghc-base >= 4.2
+Requires: ghc-base < 4.8
+Requires: ghc-template-haskell >= 2.4
+Requires: ghc-template-haskell < 2.10
+Requires: ghc-th-lift >= 0.5
+Requires: ghc-th-lift < 0.7
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# debuginfo is not useful for ghc
%define _enable_debug_packages 0
-# don't compress haddoc files
+# don't compress haddock files
%define _noautocompressdoc *.haddock
%description
and Lift, as well as a few missing Show / Eq. These instances used to
live in haskell-src-meta, and that's where the version number started.
+%description -l pl.UTF-8
+Osierocone instancje typów danych TH - w szczególności instancje Ord i
+Lift, a także kilka brakujących Show / Eq. Instancje te były wcześniej
+w haskell-src-meta, i w tym pakiecie zaczęła się numeracja wersji.
+
%package prof
Summary: Profiling %{pkgname} library for GHC
Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
+Requires: ghc-base-prof >= 4.2
+Requires: ghc-base-prof < 4.8
+Requires: ghc-template-haskell-prof >= 2.4
+Requires: ghc-template-haskell-prof < 2.10
+Requires: ghc-th-lift-prof >= 0.5
+Requires: ghc-th-lift-prof < 0.7
%description prof
Profiling %{pkgname} library for GHC. Should be installed when
%prep
%setup -q -n %{pkgname}-%{version}
%patch0 -p1
+%patch1 -p1
%build
-runhaskell Setup.hs configure -v2 --enable-library-profiling \
+runhaskell Setup.hs configure -v2 \
+ %{?with_prof:--enable-library-profiling} \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
runhaskell Setup.hs register \
- --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+ --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
%clean
rm -rf $RPM_BUILD_ROOT
%doc %{name}-%{version}-doc/*
%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.o
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
-%exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
-
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSth-orphans-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-orphans-%{version}.a
%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language
%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell
%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH
%files prof
%defattr(644,root,root,755)
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSth-orphans-%{version}_p.a
%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Language/Haskell/TH/*.p_hi
---- th-orphans-0.6/src/Language/Haskell/TH/Instances.hs.orig 2013-05-31 22:14:01.155238298 +0200
-+++ th-orphans-0.6/src/Language/Haskell/TH/Instances.hs 2013-05-31 22:16:41.706978731 +0200
-@@ -2,17 +2,17 @@
- {-# LANGUAGE StandaloneDeriving, TemplateHaskell #-}
- {-# LANGUAGE TypeSynonymInstances #-}
+--- th-orphans-0.8/src/Language/Haskell/TH/Instances.hs.orig 2013-12-24 07:30:29.166154606 +0100
++++ th-orphans-0.8/src/Language/Haskell/TH/Instances.hs 2013-12-24 08:07:10.199395571 +0100
+@@ -1,17 +1,17 @@
+ {-# LANGUAGE CPP #-}
+ {-# LANGUAGE StandaloneDeriving, DeriveGeneric, TypeSynonymInstances, TemplateHaskell #-}
-{- |
- Module : Language.Haskell.TH.Instances.Lift
- Maintainer : Michael Sloan <mgsloan at gmail>
- Stability : experimental
- Portability : portable (template-haskell)
---}
+-- |
+-- Module : Language.Haskell.TH.Instances.Lift
+-- Copyright : (c) Matt Morrow 2008
+-- Stability : experimental
+-- Portability : portable (template-haskell)
+--
-+-- Provides Ord and Lift instances for the TH datatypes.
-+-- Also provides Show Eq for Loc, and Ppr for Loc Lit.
++-- Provides Ord and Lift instances for the TH datatypes. Also provides
++-- Show / Eq for Loc, and Ppr for Loc / Lit.
---- | Provides Ord and Lift instances for the TH datatypes. Also provides
---- Show / Eq for Loc, and Ppr for Loc / Lit.
+- Provides Ord and Lift instances for the TH datatypes. Also provides
+- Show / Eq for Loc, and Ppr for Loc / Lit.
+--}
module Language.Haskell.TH.Instances () where
import Language.Haskell.TH.Syntax