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

qboosh qboosh at pld-linux.org
Wed Dec 25 19:33:01 CET 2013


commit 920221c6c34859bc1d7ac126908ef49c2141f40c
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Dec 25 19:33:11 2013 +0100

    - pl, unified, added prof bcond

 ghc-alex-meta.spec | 78 +++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 60 insertions(+), 18 deletions(-)
---
diff --git a/ghc-alex-meta.spec b/ghc-alex-meta.spec
index 15430b7..38a5300 100644
--- a/ghc-alex-meta.spec
+++ b/ghc-alex-meta.spec
@@ -1,36 +1,79 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
 %define		pkgname	alex-meta
 Summary:	Quasi-quoter for Alex lexers
+Summary(pl.UTF-8):	Quasi-quoter dla analizatorów leksykalnych narzędzia Alex
 Name:		ghc-%{pkgname}
 Version:	0.3.0.5
 Release:	3
 License:	BSD
 Group:		Development/Languages
-Source0:	http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+#Source0Download: http://hackage.haskell.org/package/alex-meta
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5:	a2c39f21b06d2c186ff5b66f53dffc17
-URL:		http://hackage.haskell.org/package/alex-meta/
+URL:		http://hackage.haskell.org/package/alex-meta
 BuildRequires:	ghc >= 6.12.3
-BuildRequires:	ghc-haskell-src-meta
-BuildRequires:	ghc-haskell-src-meta-prof
+BuildRequires:	ghc-QuickCheck >= 2
+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-template-haskell >= 2.5
+BuildRequires:	ghc-template-haskell < 2.9
+%if %{with prof}
+BuildRequires:	ghc-prof >= 6.12.3
+BuildRequires:	ghc-QuickCheck-prof >= 2
+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-template-haskell-prof >= 2.5
+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-template-haskell >= 2.5
+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 Alex lexers.
 
+%description -l pl.UTF-8
+Quasi-quoter dla analizatorów leksykalnych narzędzia Alex.
+
 %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-template-haskell-prof >= 2.5
+Requires:	ghc-template-haskell-prof < 2.9
 
 %description prof
 Profiling %{pkgname} library for GHC.  Should be installed when
@@ -44,7 +87,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 +109,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,25 +125,23 @@ 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}/HSalex-meta-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSalex-meta-%{version}.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data
-%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged/*.hi
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex.hi
 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex/*.hi
 
 %files prof
 %defattr(644,root,root,755)
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSalex-meta-%{version}_p.a
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/*.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Ranged/*.p_hi
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex.p_hi
 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Alex/*.p_hi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-alex-meta.git/commitdiff/920221c6c34859bc1d7ac126908ef49c2141f40c



More information about the pld-cvs-commit mailing list