]> git.pld-linux.org Git - packages/ghc-hslogger.git/blob - ghc-hslogger.spec
062939c61f17192740fc70e5388dc758afdcab16
[packages/ghc-hslogger.git] / ghc-hslogger.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname hslogger
6 Summary:        Versatile logging framework for Haskell
7 Name:           ghc-%{pkgname}
8 Version:        1.3.1.0
9 Release:        1
10 License:        LGPL
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
20 %if %{with prof}
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
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.608
27 %requires_eq    ghc
28 Requires:       ghc-mtl
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)
33
34 # debuginfo is not useful for ghc
35 %define         _enable_debug_packages  0
36
37 %description
38 hslogger is a logging framework for Haskell, roughly similar to
39 Python's logging module.
40
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.
45
46 %package prof
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
54
55 %description prof
56 Profiling %{pkgname} library for GHC.  Should be installed when
57 GHC's profiling subsystem is needed.
58
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.
62
63 %prep
64 %setup -q -n %{pkgname}-%{version}
65 %patch0 -p1
66
67 %build
68 runhaskell Setup.hs configure -v2 \
69         %{?with_prof:--enable-library-profiling} \
70         --prefix=%{_prefix} \
71         --libdir=%{_libdir} \
72         --libexecdir=%{_libexecdir} \
73         --docdir=%{_docdir}/%{name}-%{version}
74
75 runhaskell Setup.hs build
76 runhaskell Setup.hs haddock --executables
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
81
82 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
83
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}
88
89 runhaskell Setup.hs register \
90         --gen-pkg-config=$RPM_BUILD_ROOT/%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post
96 %ghc_pkg_recache
97
98 %postun
99 %ghc_pkg_recache
100
101 %files
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
109
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
121
122 %if %{with prof}
123 %files prof
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
130 %endif
This page took 0.046271 seconds and 2 git commands to generate.