[packages/ghc-pcre-light] - pl, unified, added -prof package

qboosh qboosh at pld-linux.org
Thu Dec 19 17:56:19 CET 2013


commit fb89bcdbd99de80c0e0c66a25845a0993d13d11f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Dec 19 17:56:18 2013 +0100

    - pl, unified, added -prof package

 ghc-pcre-light.spec | 77 ++++++++++++++++++++++++++++++++++++++++++++++-------
 1 file changed, 68 insertions(+), 9 deletions(-)
---
diff --git a/ghc-pcre-light.spec b/ghc-pcre-light.spec
index 7f55052..f28ac66 100644
--- a/ghc-pcre-light.spec
+++ b/ghc-pcre-light.spec
@@ -1,42 +1,85 @@
+#
+# Conditional build:
+%bcond_without	prof	# profiling library
+#
 %define		pkgname	pcre-light
 Summary:	A library for Perl 5 compatible regular expressions
+Summary(pl.UTF-8):	Biblioteka wyrażeń regularnych zgodnych z Perlem 5
 Name:		ghc-%{pkgname}
 Version:	0.4
 Release:	4
 License:	BSD
 Group:		Development/Languages
-Source0:	http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
+#Source0Download: http://hackage.haskell.org/package/pcre-light
+Source0:	http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5:	4907d8d239d3c41f06855faee340d052
-URL:		http://hackage.haskell.org/package/pcre-light/
+URL:		http://hackage.haskell.org/package/pcre-light
 BuildRequires:	ghc >= 6.12.3
+BuildRequires:	ghc-base >= 3
+BuildRequires:	ghc-base <= 5
+BuildRequires:	ghc-bytestring >= 0.9
+%if %{with prof}
+BuildRequires:	ghc-prof >= 6.12.3
+BuildRequires:	ghc-base-prof >= 3
+BuildRequires:	ghc-base-prof <= 5
+BuildRequires:	ghc-bytestring-prof >= 0.9
+%endif
 BuildRequires:	pcre-devel
 BuildRequires:	rpmbuild(macros) >= 1.608
 %requires_eq	ghc
+Requires:	ghc-base >= 3
+Requires:	ghc-base <= 5
+Requires:	ghc-bytestring >= 0.9
 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
 A small, efficient and portable regex library for Perl 5 compatible
-regular expressions
+regular expressions.
+
+%description -l pl.UTF-8
+Mała, wydajna i przenośna biblioteka wyrażeń regularnych zgodnych z
+Perlem 5.
+
+%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-bytestring-prof >= 0.9
+
+%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 %{pkgname}
+Summary:	HTML documentation for ghc %{pkgname} package
+Summary(pl.UTF-8):	Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
 Group:		Documentation
 
 %description doc
-HTML documentation for %{pkgname}.
+HTML documentation for ghc %{pkgname} package.
 
 %description doc -l pl.UTF-8
-Dokumentacja w formacie HTML dla %{pkgname}.
+Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
 
 %prep
 %setup -q -n %{pkgname}-%{version}
 
 %build
 runhaskell Setup.lhs configure -v2 \
+	%{?with_prof:--enable-library-profiling} \
 	--prefix=%{_prefix} \
 	--libdir=%{_libdir} \
 	--libexecdir=%{_libexecdir} \
@@ -57,7 +100,7 @@ cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 
 runhaskell Setup.lhs 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
@@ -72,7 +115,23 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc LICENSE TODO
 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
-%{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSpcre-light-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}.a
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.hi
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.hi
+
+%if %{with prof}
+%files prof
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSpcre-light-%{version}_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light.p_hi
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/Regex/PCRE/Light/*.p_hi
+%endif
 
 %files doc
 %defattr(644,root,root,755)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ghc-pcre-light.git/commitdiff/fb89bcdbd99de80c0e0c66a25845a0993d13d11f



More information about the pld-cvs-commit mailing list