]>
Commit | Line | Data |
---|---|---|
0216f3b2 JP |
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} | |
c6eedc2e | 8 | Version: 0.10.3 |
72200def | 9 | Release: 2 |
0216f3b2 JP |
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 | |
c6eedc2e | 14 | # Source0-md5: 023154bdde151da707b345d38553b451 |
0216f3b2 JP |
15 | URL: http://hackage.haskell.org/package/ansi-terminal |
16 | BuildRequires: ghc >= 6.12.3 | |
17 | BuildRequires: ghc-base >= 4 | |
c6eedc2e | 18 | BuildRequires: ghc-colour >= 2.1.0 |
0216f3b2 JP |
19 | %if %{with prof} |
20 | BuildRequires: ghc-prof >= 6.12.3 | |
21 | BuildRequires: ghc-base-prof >= 4 | |
c6eedc2e | 22 | BuildRequires: ghc-colour-prof >= 2.1.0 |
0216f3b2 JP |
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 | |
c6eedc2e | 28 | Requires: ghc-colour >= 2.1.0 |
0216f3b2 JP |
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 | |
c6eedc2e | 49 | Requires: ghc-colour-prof >= 2.1.0 |
0216f3b2 JP |
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 | |
c6eedc2e | 63 | runhaskell Setup.hs configure -v2 \ |
0216f3b2 JP |
64 | %{?with_prof:--enable-library-profiling} \ |
65 | --prefix=%{_prefix} \ | |
66 | --libdir=%{_libdir} \ | |
67 | --libexecdir=%{_libexecdir} \ | |
68 | --docdir=%{_docdir}/%{name}-%{version} | |
69 | ||
c6eedc2e JR |
70 | runhaskell Setup.hs build |
71 | runhaskell Setup.hs haddock --executables | |
0216f3b2 JP |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
76 | ||
c6eedc2e | 77 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT |
0216f3b2 JP |
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 | ||
c6eedc2e | 84 | runhaskell Setup.hs register \ |
0216f3b2 JP |
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} | |
c6eedc2e JR |
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 | |
0216f3b2 JP |
104 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System |
105 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console | |
106 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.hi | |
c6eedc2e | 107 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.dyn_hi |
0216f3b2 JP |
108 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI |
109 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.hi | |
c6eedc2e | 110 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.dyn_hi |
0216f3b2 JP |
111 | |
112 | %if %{with prof} | |
113 | %files prof | |
114 | %defattr(644,root,root,755) | |
c6eedc2e | 115 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSansi-terminal-%{version}-*_p.a |
0216f3b2 JP |
116 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/*.p_hi |
117 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/System/Console/ANSI/*.p_hi | |
118 | %endif |