[packages/ghc-happy-meta] - pl, unified, added prof bcond

qboosh qboosh at pld-linux.org
Thu Dec 26 14:26:25 CET 2013


commit 3e0249aec0079da8aad9c3a84debf7ea742c1512
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 26 14:26:41 2013 +0100

    - pl, unified, added prof bcond

 ghc-happy-meta.spec | 80 +++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 62 insertions(+), 18 deletions(-)
---
diff --git a/ghc-happy-meta.spec b/ghc-happy-meta.spec
index 2aeda56..5d7533a 100644
--- a/ghc-happy-meta.spec
+++ b/ghc-happy-meta.spec
@@ -1,40 +1,85 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
 %define		pkgname	happy-meta
 Summary:	Quasi-quoter for Happy parsers
+Summary(pl.UTF-8):	Quasi-quoter dla analizatorów składniowych narzędzia Happy
 Name:		ghc-%{pkgname}
 Version:	0.2.0.5
 Release:	2
 License:	BSD
 Group:		Development/Languages
-Source0:	http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+#Source0Download: http://hackage.haskell.org/package/happy-meta
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5:	92a3327788ed9de479df9e32fd32bbd2
-URL:		http://hackage.haskell.org/package/happy-meta/
+URL:		http://hackage.haskell.org/package/happy-meta
 BuildRequires:	ghc >= 6.12.3
-BuildRequires:	ghc-haskell-src-meta
-BuildRequires:	ghc-haskell-src-meta-prof
+BuildRequires:	ghc-array
+BuildRequires:	ghc-base >= 4.2
+BuildRequires:	ghc-base < 5
+BuildRequires:	ghc-containers
+BuildRequires:	ghc-haskell-src-meta >= 0.5.1.2
+BuildRequires:	ghc-haskell-src-meta < 1.0
+BuildRequires:	ghc-mtl >= 1.0
+BuildRequires:	ghc-template-haskell >= 2.4
+BuildRequires:	ghc-template-haskell < 2.9
+%if %{with prof}
+BuildRequires:	ghc-prof >= 6.12.3
+BuildRequires:	ghc-array-prof
+BuildRequires:	ghc-base-prof >= 4.2
+BuildRequires:	ghc-base-prof < 5
+BuildRequires:	ghc-containers-prof
+BuildRequires:	ghc-haskell-src-meta-prof >= 0.5.1.2
+BuildRequires:	ghc-haskell-src-meta-prof < 1.0
+BuildRequires:	ghc-mtl-prof >= 1.0
+BuildRequires:	ghc-template-haskell-prof >= 2.4
+BuildRequires:	ghc-template-haskell-prof < 2.9
+%endif
 BuildRequires:	rpmbuild(macros) >= 1.608
+Requires(post,postun):	/usr/bin/ghc-pkg
 %requires_releq	ghc
-Requires:	ghc-haskell-src-meta
+Requires:	ghc-array
+Requires:	ghc-base >= 4.2
+Requires:	ghc-base < 5
+Requires:	ghc-containers
+Requires:	ghc-haskell-src-meta >= 0.5.1.2
+Requires:	ghc-haskell-src-meta < 1.0
+Requires:	ghc-mtl >= 1.0
+Requires:	ghc-template-haskell >= 2.4
+Requires:	ghc-template-haskell < 2.9
 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
 Quasi-quoter for Happy parsers.
 
+%description -l pl.UTF-8
+Quasi-quoter dla analizatorów składniowych narzędzia Happy.
+
 %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-haskell-src-meta-prof
+Requires:	ghc-array-prof
+Requires:	ghc-base-prof >= 4.2
+Requires:	ghc-base-prof < 5
+Requires:	ghc-containers-prof
+Requires:	ghc-haskell-src-meta-prof >= 0.5.1.2
+Requires:	ghc-haskell-src-meta-prof < 1.0
+Requires:	ghc-mtl-prof >= 1.0
+Requires:	ghc-template-haskell-prof >= 2.4
+Requires:	ghc-template-haskell-prof < 2.9
 
 %description prof
-Profiling %{pkgname} library for GHC.  Should be installed when
-GHC's profiling subsystem is needed.
+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
@@ -44,7 +89,8 @@ kiedy potrzebujemy systemu profilującego z GHC.
 %setup -q -n %{pkgname}-%{version}
 
 %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} \
@@ -65,7 +111,7 @@ cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{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
+	--gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -81,19 +127,17 @@ 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
-
-%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
-%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Happy
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HShappy-meta-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShappy-meta-%{version}.a
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Happy
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Happy/*.hi
 
 %files prof
 %defattr(644,root,root,755)
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHShappy-meta-%{version}_p.a
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Happy/*.p_hi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-happy-meta.git/commitdiff/3e0249aec0079da8aad9c3a84debf7ea742c1512



More information about the pld-cvs-commit mailing list