]> git.pld-linux.org Git - packages/ghc-pcre-light.git/commitdiff
- pl, unified, added -prof package
authorJakub Bogusz <qboosh@pld-linux.org>
Thu, 19 Dec 2013 16:56:18 +0000 (17:56 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Thu, 19 Dec 2013 16:56:18 +0000 (17:56 +0100)
ghc-pcre-light.spec

index 7f550520b8bf2251ee439a0c863caa4dcfd45eaf..f28ac6606569043ee36013707c72ccc61a50a364 100644 (file)
@@ -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)
This page took 0.126739 seconds and 4 git commands to generate.