[packages/ghc-transformers-base] - pl, unified, added -prof package
qboosh
qboosh at pld-linux.org
Sat Dec 21 09:45:55 CET 2013
commit 9c4de2fc1f56d86cd59e456cc4457631be41ca0a
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Dec 21 09:45:58 2013 +0100
- pl, unified, added -prof package
ghc-transformers-base.spec | 71 ++++++++++++++++++++++++++++++++++++++++------
1 file changed, 62 insertions(+), 9 deletions(-)
---
diff --git a/ghc-transformers-base.spec b/ghc-transformers-base.spec
index 8b3c474..2a4a1ae 100644
--- a/ghc-transformers-base.spec
+++ b/ghc-transformers-base.spec
@@ -1,26 +1,67 @@
+#
+# Conditional build:
+%bcond_without prof # profiling library
+#
%define pkgname transformers-base
-Summary: This package provides a straightforward port of monadLib's BaseM typeclass to transformers
+Summary: Straightforward port of monadLib's BaseM typeclass to transformers
+Summary(pl.UTF-8): Bezpośredni port klasy typu BaseM z biblioteki monadLib do transformers
Name: ghc-%{pkgname}
Version: 0.4.1
Release: 1
License: BSD
Group: Development/Languages
-Source0: http://hackage.haskell.org/packages/archive/transformers-base/%{version}/%{pkgname}-%{version}.tar.gz
+#Source0Download: http://hackage.haskell.org/package/transformers-base
+Source0: http://hackage.haskell.org/package/transformers-base-%{version}/%{pkgname}-%{version}.tar.gz
# Source0-md5: bd99282e2daae5eecd1c953b7b77c990
-URL: http://hackage.haskell.org/package/transformers-base/
+URL: http://hackage.haskell.org/package/transformers-base
BuildRequires: ghc >= 6.12.3
-BuildRequires: ghc-transformers
+BuildRequires: ghc-base >= 3
+BuildRequires: ghc-base < 5
+BuildRequires: ghc-transformers >= 0.2
+%if %{with prof}
+BuildRequires: ghc-base-prof >= 3
+BuildRequires: ghc-base-prof < 5
+BuildRequires: ghc-transformers-prof >= 0.2
+%endif
BuildRequires: rpmbuild(macros) >= 1.608
+Requires(post,postun): /usr/bin/ghc-pkg
%requires_eq ghc
+Requires: ghc-base >= 3
+Requires: ghc-base < 5
+Requires: ghc-transformers >= 0.2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
# debuginfo is not useful for ghc
%define _enable_debug_packages 0
+# don't compress haddock files
+%define _noautocompressdoc *.haddock
+
%description
This package provides a straightforward port of monadLib's BaseM
typeclass to transformers.
+%description
+Ten pakiet udostępnia bezpośredni port klasy typu BaseM z biblioteki
+monadLib do transformers.
+
+%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 >= 3
+Requires: ghc-base-prof < 5
+Requires: ghc-transformers-prof >= 0.2
+
+%description prof
+Profiling %{pkgname} library for GHC. Should be installed when
+GHC's profiling subsystem is needed.
+
+%description prof -l pl.UTF-8
+Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
+kiedy potrzebujemy systemu profilującego z GHC.
+
%package doc
Summary: HTML documentation for %{pkgname}
Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu %{pkgname}
@@ -37,6 +78,7 @@ Dokumentacja w formacie HTML dla pakietu %{pkgname}.
%build
runhaskell Setup.hs configure -v2 \
+ %{?with_prof:--enable-library-profiling} \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--libexecdir=%{_libexecdir} \
@@ -52,13 +94,12 @@ install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
# work around automatic haddock docs installation
-rm -rf %{name}-%{version}-doc
+%{__rm} -rf %{name}-%{version}-doc
cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
+%{__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
-
-%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/
+ --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
%clean
rm -rf $RPM_BUILD_ROOT
@@ -73,7 +114,19 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc LICENSE
%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HStransformers-base-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}.a
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Base.hi
+
+%if %{with prof}
+%files prof
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Base.p_hi
+%endif
%files doc
%defattr(644,root,root,755)
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ghc-transformers-base.git/commitdiff/9c4de2fc1f56d86cd59e456cc4457631be41ca0a
More information about the pld-cvs-commit
mailing list