]>
Commit | Line | Data |
---|---|---|
79659f47 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without prof # profiling library | |
4 | # | |
5 | %define pkgname texmath | |
6 | Summary: Conversion of LaTeX math formulas to MathML or OMML | |
7 | Summary(pl.UTF-8): Przekształcanie LaTeXowych wzorów matematycznych do MathML-a lub OMML-a | |
8 | Name: ghc-%{pkgname} | |
5b24969f | 9 | Version: 0.12.0.2 |
a424317f | 10 | Release: 3 |
79659f47 JB |
11 | License: GPL v2+ |
12 | Group: Development/Languages | |
13 | #Source0Download: http://hackage.haskell.org/package/texmath | |
14 | Source0: http://hackage.haskell.org/package/%{pkgname}-%{version}/%{pkgname}-%{version}.tar.gz | |
5b24969f | 15 | # Source0-md5: 2dcb3994f890643d4bcecee90032e82f |
79659f47 JB |
16 | URL: http://hackage.haskell.org/package/texmath |
17 | BuildRequires: ghc >= 6.12.3 | |
5b24969f JR |
18 | BuildRequires: ghc-aeson |
19 | BuildRequires: ghc-base >= 4.8 | |
20 | BuildRequires: ghc-bytestring | |
79659f47 | 21 | BuildRequires: ghc-containers |
5b24969f JR |
22 | BuildRequires: ghc-mtl |
23 | BuildRequires: ghc-network-uri >= 2.6 | |
24 | BuildRequires: ghc-pandoc-types >= 1.20 | |
79659f47 | 25 | BuildRequires: ghc-parsec >= 3 |
5b24969f JR |
26 | BuildRequires: ghc-syb >= 0.4.2 |
27 | BuildRequires: ghc-text | |
79659f47 JB |
28 | BuildRequires: ghc-xml |
29 | %if %{with prof} | |
30 | BuildRequires: ghc-prof >= 6.12.3 | |
5b24969f JR |
31 | BuildRequires: ghc-aeson-prof |
32 | BuildRequires: ghc-base-prof >= 4.8 | |
33 | BuildRequires: ghc-bytestring-prof | |
79659f47 | 34 | BuildRequires: ghc-containers-prof |
5b24969f JR |
35 | BuildRequires: ghc-mtl-prof |
36 | BuildRequires: ghc-network-uri-prof >= 2.6 | |
37 | BuildRequires: ghc-pandoc-types-prof >= 1.20 | |
79659f47 | 38 | BuildRequires: ghc-parsec-prof >= 3 |
5b24969f JR |
39 | BuildRequires: ghc-syb-prof >= 0.4.2 |
40 | BuildRequires: ghc-text-prof | |
79659f47 JB |
41 | BuildRequires: ghc-xml-prof |
42 | %endif | |
43 | BuildRequires: rpmbuild(macros) >= 1.608 | |
44 | Requires(post,postun): /usr/bin/ghc-pkg | |
45 | %requires_eq ghc | |
5b24969f JR |
46 | Requires: ghc-aeson |
47 | Requires: ghc-base >= 4.8 | |
48 | Requires: ghc-bytestring | |
79659f47 | 49 | Requires: ghc-containers |
5b24969f JR |
50 | Requires: ghc-mtl |
51 | Requires: ghc-network-uri >= 2.6 | |
52 | Requires: ghc-pandoc-types >= 1.20 | |
79659f47 | 53 | Requires: ghc-parsec >= 3 |
5b24969f JR |
54 | Requires: ghc-syb >= 0.4.2 |
55 | Requires: ghc-text | |
79659f47 JB |
56 | Requires: ghc-xml |
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 | The texmathml library provides functions to convert LaTeX math | |
67 | formulas to presentation MathML (which can be used in HTML) or OMML | |
68 | (Office Math Markup Language, used in Microsoft Office). It supports | |
69 | basic LaTeX and AMS extensions, and it can parse and apply LaTeX | |
70 | macros. | |
71 | ||
72 | %description -l pl.UTF-8 | |
73 | Biblioteka texmathml dostarcza funkcje do przekształcania LaTeXowych | |
74 | wzorów matematycznych na prezentacyjne MathML (które można używać w | |
75 | HTML-u) albo OMML (Office Math Markup Language, używane w Microsoft | |
76 | Office). Obsługuje podstawowy LaTeX i rozszerzenia AMS, potrafi | |
77 | analizować i wykonywać makra LaTeXa. | |
78 | ||
79 | %package prof | |
80 | Summary: Profiling %{pkgname} library for GHC | |
81 | Summary(pl.UTF-8): Biblioteka profilująca %{pkgname} dla GHC | |
82 | Group: Development/Libraries | |
83 | Requires: %{name} = %{version}-%{release} | |
5b24969f JR |
84 | Requires: ghc-prof >= 6.12.3 |
85 | Requires: ghc-aeson-prof | |
86 | Requires: ghc-base-prof >= 4.8 | |
87 | Requires: ghc-bytestring-prof | |
79659f47 | 88 | Requires: ghc-containers-prof |
5b24969f JR |
89 | Requires: ghc-mtl-prof |
90 | Requires: ghc-network-uri-prof >= 2.6 | |
91 | Requires: ghc-pandoc-types-prof >= 1.20 | |
79659f47 | 92 | Requires: ghc-parsec-prof >= 3 |
5b24969f JR |
93 | Requires: ghc-syb-prof >= 0.4.2 |
94 | Requires: ghc-text-prof | |
79659f47 JB |
95 | Requires: ghc-xml-prof |
96 | ||
97 | %description prof | |
98 | Profiling %{pkgname} library for GHC. Should be installed when | |
99 | GHC's profiling subsystem is needed. | |
100 | ||
101 | %description prof -l pl.UTF-8 | |
102 | Biblioteka profilująca %{pkgname} dla GHC. Powinna być zainstalowana | |
103 | kiedy potrzebujemy systemu profilującego z GHC. | |
104 | ||
105 | %package doc | |
106 | Summary: HTML documentation for ghc %{pkgname} package | |
107 | Summary(pl.UTF-8): Dokumentacja w formacie HTML dla pakietu ghc %{pkgname} | |
108 | Group: Documentation | |
109 | ||
110 | %description doc | |
111 | HTML documentation for ghc %{pkgname} package. | |
112 | ||
113 | %description doc -l pl.UTF-8 | |
114 | Dokumentacja w formacie HTML dla pakietu ghc %{pkgname}. | |
115 | ||
116 | %prep | |
117 | %setup -q -n %{pkgname}-%{version} | |
118 | ||
119 | %build | |
5b24969f | 120 | runhaskell Setup.lhs configure -v2 \ |
79659f47 | 121 | %{?with_prof:--enable-library-profiling} \ |
5b24969f | 122 | --flags="test executable" \ |
79659f47 JB |
123 | --prefix=%{_prefix} \ |
124 | --libdir=%{_libdir} \ | |
125 | --libexecdir=%{_libexecdir} \ | |
126 | --docdir=%{_docdir}/%{name}-%{version} | |
127 | ||
5b24969f JR |
128 | runhaskell Setup.lhs build |
129 | runhaskell Setup.lhs haddock | |
79659f47 JB |
130 | |
131 | %install | |
132 | rm -rf $RPM_BUILD_ROOT | |
133 | install -d $RPM_BUILD_ROOT%{_libdir}/%{ghcdir}/package.conf.d | |
134 | ||
5b24969f | 135 | runhaskell Setup.lhs copy --destdir=$RPM_BUILD_ROOT |
79659f47 JB |
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 | ||
5b24969f | 142 | runhaskell Setup.lhs register \ |
79659f47 JB |
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 | %attr(755,root,root) %{_bindir}/texmath | |
157 | %{_libdir}/%{ghcdir}/package.conf.d/%{pkgname}.conf | |
158 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version} | |
5b24969f JR |
159 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStexmath-%{version}-*.so |
160 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStexmath-%{version}-*.a | |
161 | %exclude %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStexmath-%{version}-*_p.a | |
162 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.hi | |
163 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.dyn_hi | |
79659f47 | 164 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text |
5b24969f JR |
165 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.hi |
166 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.dyn_hi | |
79659f47 JB |
167 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath |
168 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/*.hi | |
5b24969f JR |
169 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/*.dyn_hi |
170 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers | |
171 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/*.hi | |
172 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/*.dyn_hi | |
173 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/MathML | |
174 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/MathML/*.hi | |
175 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/MathML/*.dyn_hi | |
176 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/TeX | |
177 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/TeX/*.hi | |
178 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/TeX/*.dyn_hi | |
179 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Unicode | |
180 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Unicode/*.hi | |
181 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Unicode/*.dyn_hi | |
182 | %dir %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Writers | |
183 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Writers/*.hi | |
184 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Writers/*.dyn_hi | |
79659f47 JB |
185 | |
186 | %if %{with prof} | |
187 | %files prof | |
188 | %defattr(644,root,root,755) | |
5b24969f JR |
189 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/libHStexmath-%{version}-*_p.a |
190 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/*.p_hi | |
191 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/*.p_hi | |
79659f47 | 192 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/*.p_hi |
5b24969f JR |
193 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/*.p_hi |
194 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/MathML/*.p_hi | |
195 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Readers/TeX/*.p_hi | |
196 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Unicode/*.p_hi | |
197 | %{_libdir}/%{ghcdir}/%{pkgname}-%{version}/Text/TeXMath/Writers/*.p_hi | |
79659f47 JB |
198 | %endif |
199 | ||
200 | %files doc | |
201 | %defattr(644,root,root,755) | |
202 | %doc %{name}-%{version}-doc/* |