]>
Commit | Line | Data |
---|---|---|
c3f35d1a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname semigroups | |
6 | Summary: Anything that associates | |
7 | Summary(pl.UTF-8): Wszystko, co łączne | |
8 | Name: ghc-%{pkgname} | |
6ef1a3be | 9 | Version: 0.19.1 |
30fbbeca | 10 | Release: 2 |
c3f35d1a JB |
11 | License: BSD |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/semigroups | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
6ef1a3be | 15 | # Source0-md5: 5c60017c5afb9d6b84c18a8cee6cba84 |
c3f35d1a JB |
16 | URL: http://hackage.haskell.org/package/semigroups |
17 | BuildRequires: ghc >= 6.12.3 | |
18 | BuildRequires: ghc-base >= 3 | |
c3f35d1a | 19 | BuildRequires: ghc-bytestring >= 0.9 |
c3f35d1a | 20 | BuildRequires: ghc-containers >= 0.3 |
6ef1a3be JR |
21 | BuildRequires: ghc-deepseq >= 1.1 |
22 | BuildRequires: ghc-hashable >= 1.2.5.0 | |
23 | BuildRequires: ghc-tagged >= 0.4.4 | |
24 | BuildRequires: ghc-template-haskell >= 2.5.0.0 | |
c3f35d1a | 25 | BuildRequires: ghc-text >= 0.10 |
6ef1a3be JR |
26 | BuildRequires: ghc-transformers >= 0.2 |
27 | BuildRequires: ghc-transformers-compat >= 0.5 | |
c3f35d1a | 28 | BuildRequires: ghc-unordered-containers >= 0.2 |
c3f35d1a JB |
29 | %if %{with prof} |
30 | BuildRequires: ghc-prof >= 6.12.3 | |
31 | BuildRequires: ghc-base-prof >= 3 | |
c3f35d1a | 32 | BuildRequires: ghc-bytestring-prof >= 0.9 |
c3f35d1a | 33 | BuildRequires: ghc-containers-prof >= 0.3 |
6ef1a3be JR |
34 | BuildRequires: ghc-deepseq-prof >= 1.1 |
35 | BuildRequires: ghc-hashable-prof >= 1.2.5.0 | |
36 | BuildRequires: ghc-tagged-prof >= 0.4.4 | |
37 | BuildRequires: ghc-template-haskell-prof >= 2.5.0.0 | |
c3f35d1a | 38 | BuildRequires: ghc-text-prof >= 0.10 |
6ef1a3be JR |
39 | BuildRequires: ghc-transformers-prof >= 0.2 |
40 | BuildRequires: ghc-transformers-compat-prof >= 0.5 | |
c3f35d1a | 41 | BuildRequires: ghc-unordered-containers-prof >= 0.2 |
c3f35d1a JB |
42 | %endif |
43 | BuildRequires: rpmbuild(macros) >= 1.608 | |
44 | Requires(post,postun): /usr/bin/ghc-pkg | |
45 | %requires_eq ghc | |
46 | Requires: ghc-base >= 3 | |
c3f35d1a | 47 | Requires: ghc-bytestring >= 0.9 |
c3f35d1a | 48 | Requires: ghc-containers >= 0.3 |
6ef1a3be JR |
49 | Requires: ghc-deepseq >= 1.1 |
50 | Requires: ghc-hashable >= 1.2.5.0 | |
51 | Requires: ghc-tagged >= 0.4.4 | |
52 | Requires: ghc-template-haskell >= 2.5.0.0 | |
c3f35d1a | 53 | Requires: ghc-text >= 0.10 |
6ef1a3be JR |
54 | Requires: ghc-transformers >= 0.2 |
55 | Requires: ghc-transformers-compat >= 0.5 | |
c3f35d1a | 56 | Requires: ghc-unordered-containers >= 0.2 |
c3f35d1a JB |
57 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
58 | ||
59 | # debuginfo is not useful for ghc | |
60 | %define _enable_debug_packages 0 | |
61 | ||
62 | # don't compress haddock files | |
63 | %define _noautocompressdoc *.haddock | |
64 | ||
65 | %description | |
66 | In mathematics, a semigroup is an algebraic structure consisting of a | |
67 | set together with an associative binary operation. A semigroup | |
68 | generalizes a monoid in that there might not exist an identity | |
69 | element. It also (originally) generalized a group (a monoid with all | |
70 | inverses) to a type where every element did not have to have an | |
71 | inverse, thus the name semigroup. | |
72 | ||
73 | %description -l pl.UTF-8 | |
74 | W matematyce półgrupa (semigroup) to struktura algebraiczna składająca | |
75 | się ze zbioru wraz z działaniem dwuargumentowym łącznym. Półgrupa jest | |
76 | uogólnieniem monoidu, w którym może nie istnieć element neutralny. | |
77 | Pierwotnie była także uogólnieniem grupy (monoidu ze wszystkimi | |
78 | elementami odwrotnymi) do typu, w którym każdy element nie musiał mieć | |
79 | elementu odwrotnego - stąd nazwa półgrupa. | |
80 | ||
81 | %package prof | |
82 | Summary: Profiling %{pkgname} library for GHC | |
83 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
84 | Group: Development/Libraries | |
85 | Requires: %{name} = %{version}-%{release} | |
86 | Requires: ghc-base-prof >= 3 | |
c3f35d1a | 87 | Requires: ghc-bytestring-prof >= 0.9 |
c3f35d1a | 88 | Requires: ghc-containers-prof >= 0.3 |
6ef1a3be JR |
89 | Requires: ghc-deepseq-prof >= 1.1 |
90 | Requires: ghc-hashable-prof >= 1.2.5.0 | |
91 | Requires: ghc-tagged-prof >= 0.4.4 | |
92 | Requires: ghc-template-haskell-prof >= 2.5.0.0 | |
c3f35d1a | 93 | Requires: ghc-text-prof >= 0.10 |
6ef1a3be JR |
94 | Requires: ghc-transformers-prof >= 0.2 |
95 | Requires: ghc-transformers-compat-prof >= 0.5 | |
c3f35d1a | 96 | Requires: ghc-unordered-containers-prof >= 0.2 |
c3f35d1a JB |
97 | |
98 | %description prof | |
99 | Profiling %{pkgname} library for GHC. Should be installed when | |
100 | GHC's profiling subsystem is needed. | |
101 | ||
102 | %description prof -l pl.UTF-8 | |
103 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
104 | kiedy potrzebujemy systemu profilującego z GHC. | |
105 | ||
106 | %package doc | |
107 | Summary: HTML documentation for ghc %{pkgname} package | |
108 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
109 | Group: Documentation | |
110 | ||
111 | %description doc | |
112 | HTML documentation for ghc %{pkgname} package. | |
113 | ||
114 | %description doc -l pl.UTF-8 | |
115 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
116 | ||
117 | %prep | |
118 | %setup -q -n %{pkgname}-%{version} | |
119 | ||
120 | %build | |
121 | runhaskell Setup.lhs configure -v2 \ | |
122 | %{?with_prof:--enable-library-profiling} \ | |
123 | --prefix=%{_prefix} \ | |
124 | --libdir=%{_libdir} \ | |
125 | --libexecdir=%{_libexecdir} \ | |
126 | --docdir=%{_docdir}/%{name}-%{version} | |
127 | ||
128 | runhaskell Setup.lhs build | |
129 | runhaskell Setup.lhs haddock --executables | |
130 | ||
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
134 | ||
135 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT | |
136 | ||
137 | # work around automatic haddock docs installation | |
138 | %{__rm} -rf %{name}-%{version}-doc | |
139 | cp -a $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} %{name}-%{version}-doc | |
140 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} | |
141 | ||
142 | runhaskell Setup.lhs register \ | |
143 | --gen-pkg-config=$RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
144 | ||
145 | %clean | |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
148 | %post | |
149 | %ghc_pkg_recache | |
150 | ||
151 | %postun | |
152 | %ghc_pkg_recache | |
153 | ||
154 | %files | |
155 | %defattr(644,root,root,755) | |
156 | %doc LICENSE README.markdown | |
157 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
158 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
6ef1a3be JR |
159 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsemigroups-%{version}-*.so |
160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsemigroups-%{version}-*.a | |
161 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsemigroups-%{version}-*_p.a | |
c3f35d1a | 162 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data |
6ef1a3be JR |
163 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Semigroup |
164 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Semigroup/*.hi | |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Semigroup/*.dyn_hi | |
c3f35d1a JB |
166 | |
167 | %if %{with prof} | |
168 | %files prof | |
169 | %defattr(644,root,root,755) | |
6ef1a3be JR |
170 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHSsemigroups-%{version}-*_p.a |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Data/Semigroup/*.p_hi | |
c3f35d1a JB |
172 | %endif |
173 | ||
174 | %files doc | |
175 | %defattr(644,root,root,755) | |
176 | %doc %{name}-%{version}-doc/* |