[packages/ghc-clock] new; version 0.7.2
atler
atler at pld-linux.org
Mon Aug 1 19:45:07 CEST 2016
commit 8ec434eb6ebf06d582a3770bda4f283b402c5afe
Author: Jan Palus <atler at pld-linux.org>
Date: Mon Aug 1 19:44:46 2016 +0200
new; version 0.7.2
ghc-clock.spec | 110 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 110 insertions(+)
---
diff --git a/ghc-clock.spec b/ghc-clock.spec
new file mode 100644
index 0000000..c8c330a
--- /dev/null
+++ b/ghc-clock.spec
@@ -0,0 +1,110 @@
+#
+# Conditional build:
+%bcond_without prof # profiling library
+#
+%define pkgname clock
+Summary: High-resolution clock functions: monotonic, realtime, cputime
+Name: ghc-%{pkgname}
+Version: 0.7.2
+Release: 1
+License: BSD
+Group: Development/Languages
+#Source0Download: http://hackage.haskell.org/package/clock
+Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: 3bb91ede556cde92a64c635da68699cd
+URL: http://hackage.haskell.org/package/clock
+BuildRequires: ghc >= 6.12.3
+BuildRequires: ghc-base >= 2
+BuildRequires: ghc-base <= 5
+%if %{with prof}
+BuildRequires: ghc-prof >= 6.12.3
+BuildRequires: ghc-base-prof >= 2
+BuildRequires: ghc-base-prof <= 5
+%endif
+BuildRequires: rpmbuild(macros) >= 1.608
+Requires(post,postun): /usr/bin/ghc-pkg
+%requires_eq ghc
+Requires: ghc-base >= 2
+Requires: ghc-base <= 5
+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 package for convenient access to high-resolution clock and timer
+functions of different operating systems via a unified API.
+
+%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 < 6
+Requires: ghc-bytestring-prof
+Requires: ghc-text-prof
+
+%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.
+
+%prep
+%setup -q -n %{pkgname}-%{version}
+
+%build
+runhaskell Setup.hs configure -v2 \
+ %{?with_prof:--enable-library-profiling} \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --libexecdir=%{_libexecdir} \
+ --docdir=%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs build
+runhaskell Setup.hs haddock --executables
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
+
+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} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+
+runhaskell Setup.hs register \
+ --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+%ghc_pkg_recache
+
+%postun
+%ghc_pkg_recache
+
+%files
+%defattr(644,root,root,755)
+%doc %{name}-%{version}-doc/*
+%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSclock-%{version}.o
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}.a
+%dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
+
+%if %{with prof}
+%files prof
+%defattr(644,root,root,755)
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSclock-%{version}_p.a
+%{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ghc-clock.git/commitdiff/8ec434eb6ebf06d582a3770bda4f283b402c5afe
More information about the pld-cvs-commit
mailing list