]>
Commit | Line | Data |
---|---|---|
344107f5 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
61475ba8 | 5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
efeeaf0e | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
344107f5 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
5142b5dc JB |
10 | Summary: Camomile - comprehensive Unicode library for OCaml |
11 | Summary(pl.UTF-8): Camomile - obszerna biblioteka unikodowa dla OCamla | |
12 | Name: ocaml-camomile | |
4df8a93b JR |
13 | Version: 1.0.2 |
14 | Release: 0.1 | |
5142b5dc JB |
15 | License: LGPL v2+ with linking exception |
16 | Group: Libraries | |
4df8a93b JR |
17 | Source0: https://github.com/yoriyuki/Camomile/releases/download/%{version}/camomile-%{version}.tbz |
18 | # Source0-md5: 1a193d43a112bf69eba1bc581d7f4a77 | |
efeeaf0e | 19 | URL: https://github.com/yoriyuki/Camomile |
4df8a93b | 20 | BuildRequires: ocaml >= 1:4.02.3 |
5142b5dc | 21 | BuildRequires: ocaml-camlp4 |
4df8a93b | 22 | BuildRequires: ocaml-dune |
5142b5dc JB |
23 | %requires_eq ocaml-runtime |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
61475ba8 JB |
26 | %if %{without ocaml_opt} |
27 | %define no_install_post_strip 1 | |
28 | # no opt means no native binary, stripping bytecode breaks such programs | |
29 | %define _enable_debug_packages 0 | |
30 | %endif | |
31 | ||
5142b5dc JB |
32 | %description |
33 | Camomile is a comprehensive Unicode library for OCaml. Camomile | |
34 | provides Unicode character type, UTF-8, UTF-16, UTF-32 strings, | |
35 | conversion to/from about 200 encodings, collation and locale-sensitive | |
36 | case mappings, and more. | |
37 | ||
38 | This package contains database files needed to run executables using | |
39 | Camomile library. | |
40 | ||
41 | %description -l pl.UTF-8 | |
42 | Camomilw to obszerna biblioteka unikodowa dla OCamla. Camomile | |
43 | udostępnia typ znaku unikodowego, łańcuchy UTF-8, UTF-16, UTF-32, | |
44 | konwersję z/do około 200 kodowań, tablice sortowania oraz wielkości | |
45 | liter zależne od lokalizacji itd. | |
46 | ||
47 | Ten pakiet zawiera pliki baz danych potrzebne do uruchamiania | |
48 | programów wykorzystujących bibliotekę Camomile. | |
49 | ||
50 | %package devel | |
51 | Summary: Camomile Unicode library for OCaml - development part | |
52 | Summary(pl.UTF-8): Biblioteka unikodowa Camomile dla OCamla - cześć programistyczna | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | %requires_eq ocaml | |
56 | ||
57 | %description devel | |
58 | This package contains files needed to develop OCaml programs using | |
59 | Camomile library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
63 | biblioteki Camomile. | |
64 | ||
65 | %prep | |
66 | %setup -q -n camomile-%{version} | |
67 | ||
68 | %build | |
4df8a93b | 69 | dune build --verbose --profile release |
5142b5dc JB |
70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
5142b5dc | 73 | |
4df8a93b JR |
74 | dune install \ |
75 | --verbose \ | |
76 | --destdir $RPM_BUILD_ROOT | |
5142b5dc JB |
77 | |
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %files | |
82 | %defattr(644,root,root,755) | |
4df8a93b | 83 | %doc CHANGES.md README.md |
5142b5dc JB |
84 | %{_datadir}/camomile |
85 | ||
86 | %files devel | |
87 | %defattr(644,root,root,755) | |
5142b5dc | 88 | %dir %{_libdir}/ocaml/camomile |
4df8a93b | 89 | %{_libdir}/ocaml/camomile/META |
344107f5 | 90 | %if %{with ocaml_opt} |
4df8a93b JR |
91 | %{_libdir}/ocaml/camomile/*.a |
92 | %{_libdir}/ocaml/camomile/*.cmx | |
93 | %{_libdir}/ocaml/camomile/*.cmxa | |
701c278d | 94 | %endif |
4df8a93b JR |
95 | %{_libdir}/ocaml/camomile/*.cma |
96 | %{_libdir}/ocaml/camomile/*.cmi |