]> git.pld-linux.org Git - packages/ghc-mtl.git/blob - ghc-mtl.spec
- added -prof package
[packages/ghc-mtl.git] / ghc-mtl.spec
1 #
2 # Conditional build:
3 %bcond_without  prof    # profiling library
4 #
5 %define         pkgname mtl
6 Summary:        A Haskell binding to the mtl graphics library
7 Summary(pl.UTF-8):      Wiązanie Haskella do biblioteki graficznej mtl
8 Name:           ghc-%{pkgname}
9 Version:        2.1.2
10 Release:        1
11 License:        BSD
12 Group:          Development/Languages
13 #Source0Download: http://hackage.haskell.org/package/mtl
14 Source0:        http://hackage.haskell.org/package/mtl-%{version}/%{pkgname}-%{version}.tar.gz
15 # Source0-md5:  943c110524d96126bfa0e61f7df1ebcd
16 URL:            http://hackage.haskell.org/package/mtl
17 BuildRequires:  ghc >= 6.12.3
18 %{?with_prof:BuildRequires:     ghc-prof >= 6.12.3}
19 BuildRequires:  ghc-transformers >= 0.3
20 %{?with_prof:BuildRequires:     ghc-transformers-prof >= 0.3}
21 BuildRequires:  rpmbuild(macros) >= 1.608
22 %requires_eq    ghc
23 Requires:       ghc-transformers >= 0.3
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26 # debuginfo is not useful for ghc
27 %define         _enable_debug_packages  0
28
29 %description
30 Monad classes using functional dependencies, with instances for
31 various monad transformers, inspired by the paper "Functional
32 Programming with Overloading and Higher-Order Polymorphism", by Mark P
33 Jones, in "Advanced School of Functional Programming", 1995
34 (<http://web.cecs.pdx.edu/~mpj/pubs/springschool.html>).
35
36 %description -l pl.UTF-8
37 Klasy monad wykorzystujące zależności funkcyjne z instancjami dla
38 różnych przekształceń monad, zainspirowane dokumentem "Functional
39 Programming with Overloading and Higher-Order Polymorphism" autorstwa
40 Marka P. Jonesa, opublikowanym w "Advanced School of Functional
41 Programming", 1995
42 (<http://web.cecs.pdx.edu/~mpj/pubs/springschool.html>).
43
44 %package prof
45 Summary:        Profiling %{pkgname} library for GHC
46 Summary(pl.UTF-8):      Biblioteka profilująca %{pkgname} dla GHC
47 Group:          Development/Libraries
48 Requires:       %{name} = %{version}-%{release}
49 Requires:       ghc-transformers-prof >= 0.3
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 %package doc
60 Summary:        HTML documentation for ghc %{pkgname} package
61 Summary(pl.UTF-8):      Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}
62 Group:          Documentation
63
64 %description doc
65 HTML documentation for ghc %{pkgname} package.
66
67 %description doc -l pl.UTF-8
68 Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}.
69
70 %prep
71 %setup -q -n %{pkgname}-%{version}
72
73 %build
74 runhaskell Setup.hs configure -v2 \
75         %{?with_prof:--enable-library-profiling} \
76         --prefix=%{_prefix} \
77         --libdir=%{_libdir} \
78         --libexecdir=%{_libexecdir} \
79         --docdir=%{_docdir}/%{name}-%{version}
80
81 runhaskell Setup.hs build
82 runhaskell Setup.hs haddock --executables
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86 install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d
87
88 runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT
89
90 # work around automatic haddock docs installation
91 rm -rf %{name}-%{version}-doc
92 cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc
93 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
94
95 runhaskell Setup.hs register \
96         --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %post
102 %ghc_pkg_recache
103
104 %postun
105 %ghc_pkg_recache
106
107 %files
108 %defattr(644,root,root,755)
109 %doc LICENSE
110 %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf
111 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}
112 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/HSmtl-%{version}.o
113 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSmtl-%{version}.a
114 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control
115 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad
116 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/*.hi
117 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Cont
118 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Cont/*.hi
119 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Error
120 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Error/*.hi
121 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/RWS
122 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/RWS/*.hi
123 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Reader
124 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Reader/*.hi
125 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/State
126 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/State/*.hi
127 %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Writer
128 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Writer/*.hi
129
130 %if %{with prof}
131 %files prof
132 %defattr(644,root,root,755)
133 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSmtl-%{version}_p.a
134 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/*.p_hi
135 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Cont/*.p_hi
136 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Error/*.p_hi
137 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/RWS/*.p_hi
138 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Reader/*.p_hi
139 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/State/*.p_hi
140 %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Writer/*.p_hi
141 %endif
142
143 %files doc
144 %defattr(644,root,root,755)
145 %doc %{name}-%{version}-doc/*
This page took 0.050825 seconds and 3 git commands to generate.