[packages/ghc-attoparsec-enumerator] - pl, unified, added prof bcond; release 2

qboosh qboosh at pld-linux.org
Mon Dec 23 17:17:21 CET 2013


commit ef6278e6d3a0b3d3c880c9b984aa95bf6e74ff43
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Dec 23 17:17:30 2013 +0100

    - pl, unified, added prof bcond; release 2

 ghc-attoparsec-enumerator.spec | 63 ++++++++++++++++++++++++++++++------------
 1 file changed, 45 insertions(+), 18 deletions(-)
---
diff --git a/ghc-attoparsec-enumerator.spec b/ghc-attoparsec-enumerator.spec
index e3838e4..34b6b7d 100644
--- a/ghc-attoparsec-enumerator.spec
+++ b/ghc-attoparsec-enumerator.spec
@@ -1,28 +1,48 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
 %define		pkgname	attoparsec-enumerator
 Summary:	Pass input from an enumerator to an Attoparsec parser
+Summary(pl.UTF-8):	Przekazywanie wejścia z enumeratora do analizatora Attoparsec
 Name:		ghc-%{pkgname}
 Version:	0.3.1
-Release:	1
+Release:	2
 License:	MIT
 Group:		Development/Languages
-Source0:	http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+#Source0Download: http://hackage.haskell.org/package/attoparsec-enumerator
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5:	6748ce61ed642c0cf95d246075d42282
-URL:		http://hackage.haskell.org/package/attoparsec-enumerator/
+URL:		http://hackage.haskell.org/package/attoparsec-enumerator
 BuildRequires:	ghc >= 6.12.3
-BuildRequires:	ghc-prof
-BuildRequires:	ghc-attoparsec
-BuildRequires:	ghc-attoparsec-prof
-BuildRequires:	ghc-enumerator
-BuildRequires:	ghc-enumerator-prof
+BuildRequires:	ghc-attoparsec >= 0.10
+BuildRequires:	ghc-attoparsec < 0.11
+BuildRequires:	ghc-base >= 4.0
+BuildRequires:	ghc-base < 5
+BuildRequires:	ghc-bytestring >= 0.9
+BuildRequires:	ghc-enumerator >= 0.4
+BuildRequires:	ghc-enumerator < 0.5
+BuildRequires:	ghc-text
+%if %{with prof}
+BuildRequires:	ghc-prof >= 6.12.3
+BuildRequires:	ghc-attoparsec-prof >= 0.10
+BuildRequires:	ghc-attoparsec-prof < 0.11
+BuildRequires:	ghc-base-prof >= 4.0
+BuildRequires:	ghc-base-prof < 5
+BuildRequires:	ghc-bytestring-prof >= 0.9
+BuildRequires:	ghc-enumerator-prof >= 0.4
+BuildRequires:	ghc-enumerator-prof < 0.5
+BuildRequires:	ghc-text-prof
+%endif
 BuildRequires:	rpmbuild(macros) >= 1.608
-%requires_releq	ghc
 Requires(post,postun):	/usr/bin/ghc-pkg
+%requires_releq	ghc
 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
@@ -30,6 +50,12 @@ This library allows an Attoparsec parser to receive input
 incrementally from an enumerator. This could be used for parsing
 large files, or implementing binary network protocols.
 
+%description -l pl.UTF-8
+Ta biblioteka pozwala analizatorowi Attoparsec odbierać dane wejściowe
+przyrostowo od enumeratora. Jest to przydatne na przykład przy
+analizie dużych plików lub implementowaniu binarnych protokołów
+sieciowych.
+
 %package prof
 Summary:	Profiling %{pkgname} library for GHC
 Summary(pl.UTF-8):	Biblioteka profilująca %{pkgname} dla GHC.
@@ -48,7 +74,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} \
@@ -66,10 +93,10 @@ runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
 # work around automatic haddock docs installation
 %{__rm} -rf %{name}-%{version}-doc
 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
-%{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+%{__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
@@ -85,15 +112,15 @@ 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}/HSattoparsec-enumerator-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSattoparsec-enumerator-%{version}.a
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/*.hi
 
+%if %{with prof}
 %files prof
 %defattr(644,root,root,755)
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSattoparsec-enumerator-%{version}_p.a
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Attoparsec/*.p_hi
+%endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-attoparsec-enumerator.git/commitdiff/ef6278e6d3a0b3d3c880c9b984aa95bf6e74ff43



More information about the pld-cvs-commit mailing list