3 %bcond_without prof # profiling library
5 %define pkgname hslogger
6 Summary: Versatile logging framework for Haskell
11 Group: Development/Languages
12 Source0: http://hackage.haskell.org/packages/archive/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
13 # Source0-md5: 4988eed9369f71dda1fba137f5476d9d
14 Patch0: ghc-8.10.patch
15 URL: http://hackage.haskell.org/package/hslogger/
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-mtl
18 BuildRequires: ghc-network >= 2.6
19 BuildRequires: ghc-network-bsd >= 2.8.1
21 BuildRequires: ghc-prof
22 BuildRequires: ghc-mtl-prof
23 BuildRequires: ghc-network-prof >= 2.6
24 BuildRequires: ghc-network-bsd-prof >= 2.8.1
26 BuildRequires: rpmbuild(macros) >= 1.608
29 Requires: ghc-network >= 2.6
30 Requires: ghc-network-bsd >= 2.8.1
31 Obsoletes: ghc-hslogger-doc
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 # debuginfo is not useful for ghc
35 %define _enable_debug_packages 0
38 hslogger is a logging framework for Haskell, roughly similar to
39 Python's logging module.
41 hslogger lets each log message have a priority and source be
42 associated with it. The programmer can then define global handlers
43 that route or filter messages based on the priority and source.
44 hslogger also has a syslog handler built in.
47 Summary: Profiling %{pkgname} library for GHC
48 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC.
49 Group: Development/Libraries
50 Requires: %{name} = %{version}-%{release}
51 Requires: ghc-mtl-prof
52 Requires: ghc-network-prof >= 2.6
53 Requires: ghc-network-bsd-prof >= 2.8.1
56 Profiling %{pkgname} library for GHC. Should be installed when
57 GHC's profiling subsystem is needed.
59 %description prof -l pl.UTF-8
60 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
61 kiedy potrzebujemy systemu profilującego z GHC.
64 %setup -q -n %{pkgname}-%{version}
68 runhaskell Setup.hs configure -v2 \
69 %{?with_prof:--enable-library-profiling} \
72 --libexecdir=%{_libexecdir} \
73 --docdir=%{_docdir}/%{name}-%{version}
75 runhaskell Setup.hs build
76 runhaskell Setup.hs haddock --executables
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
82 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
84 # work around automatic haddock docs installation
85 %{__rm} -rf %{name}-%{version}-doc
86 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
87 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
89 runhaskell Setup.hs register \
90 --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
93 rm -rf $RPM_BUILD_ROOT
102 %defattr(644,root,root,755)
103 %doc %{name}-%{version}-doc/*
104 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.so
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.a
108 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi
111 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi
112 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.hi
114 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.dyn_hi
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/*.hi
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/*.dyn_hi
118 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/Handler
119 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/Handler/*.hi
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/Handler/*.dyn_hi
124 %defattr(644,root,root,755)
125 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*_p.a
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi
127 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/*.p_hi
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/*.p_hi
129 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Log/Handler/*.p_hi