]>
Commit | Line | Data |
---|---|---|
9589cc16 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
51ee7479 JP |
5 | %define pkgname dlist |
6 | Summary: Differences lists | |
9589cc16 | 7 | Summary(pl.UTF-8): Listy różnic |
51ee7479 | 8 | Name: ghc-%{pkgname} |
dbb4ceb0 | 9 | Version: 0.8.0.8 |
fd2e03ac | 10 | Release: 2 |
51ee7479 JP |
11 | License: BSD |
12 | Group: Development/Languages | |
9589cc16 JB |
13 | #Source0Download: http://hackage.haskell.org/package/dlist |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
dbb4ceb0 | 15 | # Source0-md5: 2765820965532ac11c4f67d907ca0e63 |
9589cc16 | 16 | URL: http://hackage.haskell.org/package/dlist |
51ee7479 | 17 | BuildRequires: ghc >= 6.12.3 |
64a5c4af JB |
18 | BuildRequires: ghc-base >= 2 |
19 | BuildRequires: ghc-base < 5 | |
20 | %if %{with prof} | |
21 | BuildRequires: ghc-prof >= 6.12.3 | |
22 | BuildRequires: ghc-base-prof >= 2 | |
23 | BuildRequires: ghc-base-prof < 5 | |
24 | %endif | |
51ee7479 JP |
25 | BuildRequires: rpmbuild(macros) >= 1.608 |
26 | %requires_eq ghc | |
64a5c4af JB |
27 | Requires: ghc-base >= 2 |
28 | Requires: ghc-base < 5 | |
51ee7479 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 | ||
64a5c4af JB |
34 | # don't compress haddock files |
35 | %define _noautocompressdoc *.haddock | |
36 | ||
51ee7479 JP |
37 | %description |
38 | Differences lists: a list-like type supporting O(1) append. This is | |
39 | particularly useful for efficient logging and pretty printing, (e.g. | |
40 | with the Writer monad), where list append quickly becomes too | |
41 | expensive. | |
42 | ||
9589cc16 JB |
43 | %description -l pl.UTF-8 |
44 | Listy różnic: typ podobny do listy obsługujący dołączanie O(1). Jest | |
45 | przydatny szczególnie do wydajnego logowania i ładnego wypisywania | |
46 | (np. przy użyciu monady Writer), gdzie dołączanie do zwykłej listy | |
47 | szybko staje się zbyt kosztowne. | |
48 | ||
49 | %package prof | |
50 | Summary: Profiling %{pkgname} library for GHC | |
51 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
52 | Group: Development/Libraries | |
53 | Requires: %{name} = %{version}-%{release} | |
64a5c4af JB |
54 | Requires: ghc-base-prof >= 2 |
55 | Requires: ghc-base-prof < 5 | |
9589cc16 JB |
56 | |
57 | %description prof | |
58 | Profiling %{pkgname} library for GHC. Should be installed when | |
59 | GHC's profiling subsystem is needed. | |
60 | ||
61 | %description prof -l pl.UTF-8 | |
62 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
63 | kiedy potrzebujemy systemu profilującego z GHC. | |
64 | ||
51ee7479 | 65 | %package doc |
9589cc16 JB |
66 | Summary: HTML documentation for ghc %{pkgname} package |
67 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
51ee7479 JP |
68 | Group: Documentation |
69 | ||
70 | %description doc | |
9589cc16 | 71 | HTML documentation for ghc %{pkgname} package. |
51ee7479 JP |
72 | |
73 | %description doc -l pl.UTF-8 | |
9589cc16 | 74 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. |
51ee7479 JP |
75 | |
76 | %prep | |
77 | %setup -q -n %{pkgname}-%{version} | |
78 | ||
79 | %build | |
80 | runhaskell Setup.lhs configure -v2 \ | |
9589cc16 | 81 | %{?with_prof:--enable-library-profiling} \ |
51ee7479 JP |
82 | --prefix=%{_prefix} \ |
83 | --libdir=%{_libdir} \ | |
84 | --libexecdir=%{_libexecdir} \ | |
85 | --docdir=%{_docdir}/%{name}-%{version} | |
86 | ||
87 | runhaskell Setup.lhs build | |
88 | runhaskell Setup.lhs haddock --executables | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
93 | ||
94 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
95 | ||
96 | # work around automatic haddock docs installation | |
97 | rm -rf %{name}-%{version}-doc | |
98 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/html %{name}-%{version}-doc | |
99 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
100 | ||
101 | runhaskell Setup.lhs register \ | |
9589cc16 | 102 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf |
51ee7479 JP |
103 | |
104 | %clean | |
105 | rm -rf $RPM_BUILD_ROOT | |
106 | ||
107 | %post | |
108 | %ghc_pkg_recache | |
109 | ||
110 | %postun | |
111 | %ghc_pkg_recache | |
112 | ||
113 | %files | |
114 | %defattr(644,root,root,755) | |
115 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
9589cc16 | 116 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} |
dbb4ceb0 JR |
117 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*.so |
118 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*.a | |
119 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*_p.a | |
9589cc16 JB |
120 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
121 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.hi | |
dbb4ceb0 | 122 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.dyn_hi |
9589cc16 JB |
123 | |
124 | %if %{with prof} | |
125 | %files prof | |
126 | %defattr(644,root,root,755) | |
dbb4ceb0 | 127 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSdlist-%{version}-*_p.a |
9589cc16 JB |
128 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/DList.p_hi |
129 | %endif | |
51ee7479 JP |
130 | |
131 | %files doc | |
132 | %defattr(644,root,root,755) | |
133 | %doc %{name}-%{version}-doc/* |