]> git.pld-linux.org Git - packages/ghc-ansi-terminal.git/blob - ghc-ansi-terminal.spec
new; version 0.6.2.3
[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.6.2.3
9 Release:        1
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:  8afe9864ce4600841a83febb40a2c753
15 URL:            http://hackage.haskell.org/package/ansi-terminal
16 BuildRequires:  ghc >= 6.12.3
17 BuildRequires:  ghc-base >= 4
18 BuildRequires:  ghc-base < 5
19 BuildRequires:  ghc-unix >= 2.3.0.0
20 %if %{with prof}
21 BuildRequires:  ghc-prof >= 6.12.3
22 BuildRequires:  ghc-base-prof >= 4
23 BuildRequires:  ghc-base-prof < 5
24 BuildRequires:  ghc-unix-prof >= 2.3.0.0
25 %endif
26 BuildRequires:  rpmbuild(macros) >= 1.608
27 Requires(post,postun):  /usr/bin/ghc-pkg
28 %requires_eq    ghc
29 Requires:       ghc-base >= 4
30 Requires:       ghc-base < 5
31 Requires:       ghc-unix >= 2.3.0.0
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 # don't compress haddock files
38 %define         _noautocompressdoc      *.haddock
39
40 %description
41 ANSI terminal support for Haskell: allows cursor movement, screen
42 clearing, color output showing or hiding the cursor, and changing the
43 title. 
44
45 %package prof
46 Summary:        Profiling %{pkgname} library for GHC
47 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
48 Group:          Development/Libraries
49 Requires:       %{name} = %{version}-%{release}
50 Requires:       ghc-prof >= 6.12.3
51 Requires:       ghc-base-prof >= 4
52 Requires:       ghc-base-prof < 5
53
54 %description prof
55 Profiling %{pkgname} library for GHC. Should be installed when
56 GHC's profiling subsystem is needed.
57
58 %description prof -l pl.UTF-8
59 Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana
60 kiedy potrzebujemy systemu profilującego z GHC.
61
62 %prep
63 %setup -q -n %{pkgname}-%{version}
64
65 %build
66 runhaskell Setup.lhs configure -v2 \
67         %{?with_prof:--enable-library-profiling} \
68         --prefix=%{_prefix} \
69         --libdir=%{_libdir} \
70         --libexecdir=%{_libexecdir} \
71         --docdir=%{_docdir}/%{name}-%{version}
72
73 runhaskell Setup.lhs build
74 runhaskell Setup.lhs haddock --executables
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
79
80 runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT
81
82 # work around automatic haddock docs installation
83 %{__rm} -rf %{name}-%{version}-doc
84 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc
85 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
86
87 runhaskell Setup.lhs register \
88         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post
94 %ghc_pkg_recache
95
96 %postun
97 %ghc_pkg_recache
98
99 %files
100 %defattr(644,root,root,755)
101 %doc %{name}-%{version}-doc/*
102 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
103 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
104 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSansi-terminal-%{version}.o
105 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}.a
106 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System
107 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console
108 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.hi
109 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI
110 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.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.065916 seconds and 3 git commands to generate.