3 %bcond_without prof # profiling library
5 %define pkgname ansi-terminal
6 Summary: Simple ANSI terminal support
11 Group: Development/Languages
12 #Source0Download: http://hackage.haskell.org/package/ansi-terminal
13 Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz
14 # Source0-md5: 023154bdde151da707b345d38553b451
15 URL: http://hackage.haskell.org/package/ansi-terminal
16 BuildRequires: ghc >= 6.12.3
17 BuildRequires: ghc-base >= 4
18 BuildRequires: ghc-colour >= 2.1.0
20 BuildRequires: ghc-prof >= 6.12.3
21 BuildRequires: ghc-base-prof >= 4
22 BuildRequires: ghc-colour-prof >= 2.1.0
24 BuildRequires: rpmbuild(macros) >= 1.608
25 Requires(post,postun): /usr/bin/ghc-pkg
27 Requires: ghc-base >= 4
28 Requires: ghc-colour >= 2.1.0
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 # debuginfo is not useful for ghc
32 %define _enable_debug_packages 0
34 # don't compress haddock files
35 %define _noautocompressdoc *.haddock
38 ANSI terminal support for Haskell: allows cursor movement, screen
39 clearing, color output showing or hiding the cursor, and changing the
43 Summary: Profiling %{pkgname} library for GHC
44 Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC
45 Group: Development/Libraries
46 Requires: %{name} = %{version}-%{release}
47 Requires: ghc-prof >= 6.12.3
48 Requires: ghc-base-prof >= 4
49 Requires: ghc-colour-prof >= 2.1.0
52 Profiling %{pkgname} library for GHC. Should be installed when
53 GHC's profiling subsystem is needed.
55 %description prof -l pl.UTF-8
56 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
57 kiedy potrzebujemy systemu profilującego z GHC.
60 %setup -q -n %{pkgname}-%{version}
63 runhaskell Setup.hs configure -v2 \
64 %{?with_prof:--enable-library-profiling} \
67 --libexecdir=%{_libexecdir} \
68 --docdir=%{_docdir}/%{name}-%{version}
70 runhaskell Setup.hs build
71 runhaskell Setup.hs haddock --executables
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
77 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
79 # work around automatic haddock docs installation
80 %{__rm} -rf %{name}-%{version}-doc
81 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
82 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
84 runhaskell Setup.hs register \
85 --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
88 rm -rf $RPM_BUILD_ROOT
97 %defattr(644,root,root,755)
98 %doc %{name}-%{version}-doc/*
99 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
100 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
101 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}-*.so
102 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}-*.a
103 %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}-*_p.a
104 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
105 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console
106 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.hi
107 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.dyn_hi
108 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI
109 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.hi
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.dyn_hi
114 %defattr(644,root,root,755)
115 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}-*_p.a
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.p_hi
117 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.p_hi