]>
Commit | Line | Data |
---|---|---|
9c4de2fc JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
d1722ead | 5 | %define pkgname transformers-base |
9c4de2fc JB |
6 | Summary: Straightforward port of monadLib's BaseM typeclass to transformers |
7 | Summary(pl.UTF-8): Bezpośredni port klasy typu BaseM z biblioteki monadLib do transformers | |
d1722ead | 8 | Name: ghc-%{pkgname} |
895fe672 | 9 | Version: 0.4.5.2 |
ba84ac84 | 10 | Release: 2 |
d1722ead CM |
11 | License: BSD |
12 | Group: Development/Languages | |
9c4de2fc JB |
13 | #Source0Download: http://hackage.haskell.org/package/transformers-base |
14 | Source0: http://hackage.haskell.org/package/transformers-base-%{version}/%{pkgname}-%{version}.tar.gz | |
895fe672 | 15 | # Source0-md5: 07093f89dd8720ce338e55a169eb5839 |
9c4de2fc | 16 | URL: http://hackage.haskell.org/package/transformers-base |
d1722ead | 17 | BuildRequires: ghc >= 6.12.3 |
9c4de2fc JB |
18 | BuildRequires: ghc-base >= 3 |
19 | BuildRequires: ghc-base < 5 | |
20 | BuildRequires: ghc-transformers >= 0.2 | |
895fe672 | 21 | BuildRequires: ghc-transformers-compat >= 0.6.1 |
9c4de2fc JB |
22 | %if %{with prof} |
23 | BuildRequires: ghc-base-prof >= 3 | |
24 | BuildRequires: ghc-base-prof < 5 | |
895fe672 | 25 | BuildRequires: ghc-transformers-compat-prof >= 0.6.1 |
9c4de2fc JB |
26 | BuildRequires: ghc-transformers-prof >= 0.2 |
27 | %endif | |
d1722ead | 28 | BuildRequires: rpmbuild(macros) >= 1.608 |
9c4de2fc | 29 | Requires(post,postun): /usr/bin/ghc-pkg |
d1722ead | 30 | %requires_eq ghc |
9c4de2fc JB |
31 | Requires: ghc-base >= 3 |
32 | Requires: ghc-base < 5 | |
33 | Requires: ghc-transformers >= 0.2 | |
895fe672 | 34 | Requires: ghc-transformers-compat >= 0.6.1 |
d1722ead CM |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | # debuginfo is not useful for ghc | |
38 | %define _enable_debug_packages 0 | |
39 | ||
9c4de2fc JB |
40 | # don't compress haddock files |
41 | %define _noautocompressdoc *.haddock | |
42 | ||
d1722ead | 43 | %description |
142d5ccb ER |
44 | This package provides a straightforward port of monadLib's BaseM |
45 | typeclass to transformers. | |
d1722ead | 46 | |
9c4de2fc JB |
47 | %description |
48 | Ten pakiet udostępnia bezpośredni port klasy typu BaseM z biblioteki | |
49 | monadLib do transformers. | |
50 | ||
51 | %package prof | |
52 | Summary: Profiling %{pkgname} library for GHC | |
53 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
54 | Group: Development/Libraries | |
55 | Requires: %{name} = %{version}-%{release} | |
56 | Requires: ghc-base-prof >= 3 | |
57 | Requires: ghc-base-prof < 5 | |
895fe672 | 58 | Requires: ghc-transformers-compat-prof >= 0.6.1 |
9c4de2fc JB |
59 | Requires: ghc-transformers-prof >= 0.2 |
60 | ||
61 | %description prof | |
62 | Profiling %{pkgname} library for GHC. Should be installed when | |
63 | GHC's profiling subsystem is needed. | |
64 | ||
65 | %description prof -l pl.UTF-8 | |
66 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
67 | kiedy potrzebujemy systemu profilującego z GHC. | |
68 | ||
d1722ead CM |
69 | %package doc |
70 | Summary: HTML documentation for %{pkgname} | |
71 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu %{pkgname} | |
72 | Group: Documentation | |
73 | ||
74 | %description doc | |
75 | HTML documentation for %{pkgname}. | |
76 | ||
77 | %description doc -l pl.UTF-8 | |
78 | Dokumentacja w formacie HTML dla pakietu %{pkgname}. | |
79 | ||
80 | %prep | |
81 | %setup -q -n %{pkgname}-%{version} | |
82 | ||
83 | %build | |
84 | runhaskell Setup.hs configure -v2 \ | |
9c4de2fc | 85 | %{?with_prof:--enable-library-profiling} \ |
d1722ead CM |
86 | --prefix=%{_prefix} \ |
87 | --libdir=%{_libdir} \ | |
88 | --libexecdir=%{_libexecdir} \ | |
89 | --docdir=%{_docdir}/%{name}-%{version} | |
90 | ||
91 | runhaskell Setup.hs build | |
92 | runhaskell Setup.hs haddock --executables | |
93 | ||
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
97 | ||
98 | runhaskell Setup.hs copy --destdir=$RPM_BUILD_ROOT | |
99 | ||
100 | # work around automatic haddock docs installation | |
9c4de2fc | 101 | %{__rm} -rf %{name}-%{version}-doc |
d1722ead | 102 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc |
9c4de2fc | 103 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} |
d1722ead CM |
104 | |
105 | runhaskell Setup.hs register \ | |
9c4de2fc | 106 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
d1722ead CM |
107 | |
108 | %clean | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %post | |
112 | %ghc_pkg_recache | |
113 | ||
114 | %postun | |
115 | %ghc_pkg_recache | |
116 | ||
117 | %files | |
118 | %defattr(644,root,root,755) | |
119 | %doc LICENSE | |
120 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
9c4de2fc | 121 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
895fe672 JR |
122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}-*.so |
123 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}-*.a | |
124 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}-*_p.a | |
9c4de2fc JB |
125 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control |
126 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad | |
127 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Base.hi | |
895fe672 | 128 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Base.dyn_hi |
9c4de2fc JB |
129 | |
130 | %if %{with prof} | |
131 | %files prof | |
132 | %defattr(644,root,root,755) | |
895fe672 | 133 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStransformers-base-%{version}-*_p.a |
9c4de2fc JB |
134 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Control/Monad/Base.p_hi |
135 | %endif | |
d1722ead CM |
136 | |
137 | %files doc | |
138 | %defattr(644,root,root,755) | |
139 | %doc %{name}-%{version}-doc/* |