]> git.pld-linux.org Git - packages/ghc-ansi-terminal.git/blob - ghc-ansi-terminal.spec
rebuild with ghc 8.10.7
[packages/ghc-ansi-terminal.git] / ghc-ansi-terminal.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname ansi-terminal
6 Summary:        Simple ANSI terminal support
7 Name:           ghc-%{pkgname}
8 Version:        0.10.3
9 Release:        2
10 License:        BSD
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
19 %if %{with prof}
20 BuildRequires:  ghc-prof >= 6.12.3
21 BuildRequires:  ghc-base-prof >= 4
22 BuildRequires:  ghc-colour-prof >= 2.1.0
23 %endif
24 BuildRequires:  rpmbuild(macros) >= 1.608
25 Requires(post,postun):  /usr/bin/ghc-pkg
26 %requires_eq    ghc
27 Requires:       ghc-base >= 4
28 Requires:       ghc-colour >= 2.1.0
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 # debuginfo is not useful for ghc
32 %define         _enable_debug_packages  0
33
34 # don't compress haddock files
35 %define         _noautocompressdoc      *.haddock
36
37 %description
38 ANSI terminal support for Haskell: allows cursor movement, screen
39 clearing, color output showing or hiding the cursor, and changing the
40 title. 
41
42 %package prof
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
50
51 %description prof
52 Profiling %{pkgname} library for GHC. Should be installed when
53 GHC's profiling subsystem is needed.
54
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.
58
59 %prep
60 %setup -q -n %{pkgname}-%{version}
61
62 %build
63 runhaskell Setup.hs configure -v2 \
64         %{?with_prof:--enable-library-profiling} \
65         --prefix=%{_prefix} \
66         --libdir=%{_libdir} \
67         --libexecdir=%{_libexecdir} \
68         --docdir=%{_docdir}/%{name}-%{version}
69
70 runhaskell Setup.hs build
71 runhaskell Setup.hs haddock --executables
72
73 %install
74 rm -rf $RPM_BUILD_ROOT
75 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
76
77 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
78
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}
83
84 runhaskell Setup.hs register \
85         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post
91 %ghc_pkg_recache
92
93 %postun
94 %ghc_pkg_recache
95
96 %files
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
111
112 %if %{with prof}
113 %files prof
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
118 %endif
This page took 0.062595 seconds and 3 git commands to generate.