]>
Commit | Line | Data |
---|---|---|
19e7f5b6 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without ocaml_opt # skip building native optimized binaries (bytecode is always built) | |
4 | ||
085bcd66 | 5 | # not yet available on x32 (ocaml 4.02.1), update when upstream will support it |
a8b1b73e | 6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 |
19e7f5b6 JR |
7 | %undefine with_ocaml_opt |
8 | %endif | |
9 | ||
e465ee34 JB |
10 | Summary: OCaml gettext library |
11 | Summary(pl.UTF-8): Biblioteka gettext dla OCamla | |
12 | Name: ocaml-gettext | |
cc17f6ec | 13 | Version: 0.4.2 |
cba1f138 | 14 | Release: 2 |
e465ee34 JB |
15 | License: LGPL v2 with linking exception |
16 | Group: Libraries | |
cc17f6ec JR |
17 | Source0: https://github.com/gildor478/ocaml-gettext/archive/v%{version}/%{name}-%{version}.tar.gz |
18 | # Source0-md5: d277c08ceab22404f01fbdbc74d5c747 | |
e465ee34 | 19 | URL: http://forge.ocamlcore.org/projects/ocaml-gettext |
03af6252 | 20 | BuildRequires: cppo |
e465ee34 JB |
21 | BuildRequires: docbook-dtd43-xml |
22 | BuildRequires: docbook-style-xsl | |
23 | BuildRequires: libxml2-progs | |
24 | BuildRequires: libxslt-progs | |
25 | BuildRequires: ocaml >= 3.04-7 | |
26 | BuildRequires: ocaml-camlp4 | |
27 | BuildRequires: ocaml-camomile-devel | |
05dc1eb0 | 28 | BuildRequires: ocaml-fileutils-devel |
a8b1b73e | 29 | BuildRequires: ocaml-findlib |
e465ee34 JB |
30 | %requires_eq ocaml-runtime |
31 | Requires: ocaml-camomile | |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
33 | ||
085bcd66 JB |
34 | %if %{without ocaml_opt} |
35 | %define no_install_post_strip 1 | |
36 | # no opt means no native binary, stripping bytecode breaks such programs | |
37 | %define _enable_debug_packages 0 | |
38 | %endif | |
39 | ||
e465ee34 JB |
40 | %description |
41 | This library is a wrapper around gettext, it also provides a pure | |
42 | OCaml implementation based on camomile. | |
43 | ||
44 | This package contains files needed to run bytecode executables using | |
45 | gettext library. | |
46 | ||
47 | %description -l pl.UTF-8 | |
48 | Ta biblioteka jest obudowaniem gettexta; zawiera także czysto ocamlową | |
49 | implementację opartą na camomile. | |
50 | ||
51 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
52 | używających biblioteki gettext. | |
53 | ||
54 | %package devel | |
55 | Summary: OCaml gettext library - development part | |
56 | Summary(pl.UTF-8): Biblioteka gettext dla OCamla - cześć programistyczna | |
57 | Group: Development/Libraries | |
58 | Requires: %{name} = %{version}-%{release} | |
cc17f6ec | 59 | %requires_eq ocaml |
e465ee34 JB |
60 | |
61 | %description devel | |
62 | This package contains files needed to develop OCaml programs using | |
63 | gettext library. | |
64 | ||
65 | %description devel -l pl.UTF-8 | |
66 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu | |
67 | używających biblioteki gettext. | |
68 | ||
69 | %prep | |
70 | %setup -q | |
71 | ||
72 | %build | |
cc17f6ec | 73 | dune build --verbose |
e465ee34 JB |
74 | |
75 | %install | |
76 | rm -rf $RPM_BUILD_ROOT | |
cc17f6ec JR |
77 | |
78 | dune install --destdir=$RPM_BUILD_ROOT | |
e465ee34 JB |
79 | |
80 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
81 | cp -r examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
82 | ||
e465ee34 JB |
83 | %clean |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | ||
cc17f6ec | 86 | %files |
e465ee34 | 87 | %defattr(644,root,root,755) |
cc17f6ec JR |
88 | %doc CHANGES.md README.md TODO.md |
89 | %dir %{_libdir}/ocaml/gettext | |
90 | %{_libdir}/ocaml/gettext/META | |
91 | %{_libdir}/ocaml/gettext/*.cma | |
92 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllgettextStub_stubs.so | |
93 | %dir %{_libdir}/ocaml/gettext-camomile | |
94 | %{_libdir}/ocaml/gettext-camomile/META | |
95 | %{_libdir}/ocaml/gettext-camomile/*.cma | |
96 | %dir %{_libdir}/ocaml/gettext-stub | |
97 | %{_libdir}/ocaml/gettext-stub/META | |
98 | %{_libdir}/ocaml/gettext-stub/*.cma | |
99 | %dir %{_libdir}/ocaml/gettext/base | |
100 | %{_libdir}/ocaml/gettext/base/*.cma | |
101 | %dir %{_libdir}/ocaml/gettext/extension | |
102 | %{_libdir}/ocaml/gettext/extension/*.cma | |
103 | %if %{with ocaml_opt} | |
104 | %attr(755,root,root) %{_libdir}/ocaml/gettext/*.cmxs | |
105 | %attr(755,root,root) %{_libdir}/ocaml/gettext/base/*.cmxs | |
106 | %attr(755,root,root) %{_libdir}/ocaml/gettext/extension/*.cmxs | |
107 | %attr(755,root,root) %{_libdir}/ocaml/gettext-camomile/*.cmxs | |
108 | %attr(755,root,root) %{_libdir}/ocaml/gettext-stub/*.cmxs | |
109 | %endif | |
e465ee34 JB |
110 | |
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
e465ee34 JB |
113 | %attr(755,root,root) %{_bindir}/ocaml-gettext |
114 | %attr(755,root,root) %{_bindir}/ocaml-xgettext | |
cc17f6ec JR |
115 | %{_libdir}/ocaml/gettext/base/*.cmi |
116 | %{_libdir}/ocaml/gettext/base/*.cmt | |
117 | %{_libdir}/ocaml/gettext/base/*.cmti | |
cc17f6ec JR |
118 | %{_libdir}/ocaml/gettext/base/*.mli |
119 | %{_libdir}/ocaml/gettext/base/.private | |
120 | %{_libdir}/ocaml/gettext/extension/*.cmi | |
121 | %{_libdir}/ocaml/gettext/extension/*.cmt | |
cc17f6ec | 122 | %{_libdir}/ocaml/gettext/extension/*.mli |
cba1f138 | 123 | %{_libdir}/ocaml/gettext/extension/.private |
cc17f6ec | 124 | %{_libdir}/ocaml/gettext-camomile/*.cmi |
cc17f6ec JR |
125 | %{_libdir}/ocaml/gettext-camomile/*.cmt |
126 | %{_libdir}/ocaml/gettext-camomile/*.cmti | |
127 | %{_libdir}/ocaml/gettext-camomile/*.mli | |
128 | %{_libdir}/ocaml/gettext-camomile/dune-package | |
129 | %{_libdir}/ocaml/gettext-camomile/opam | |
130 | %{_libdir}/ocaml/gettext-stub/*.cmt | |
cc17f6ec JR |
131 | %{_libdir}/ocaml/gettext-stub/dune-package |
132 | %{_libdir}/ocaml/gettext-stub/opam | |
e465ee34 | 133 | %dir %{_libdir}/ocaml/gettext-stub |
cc17f6ec | 134 | %{_libdir}/ocaml/gettext-stub/*.cmi |
03af6252 | 135 | %{_libdir}/ocaml/gettext-stub/libgettextStub_stubs.a |
19e7f5b6 | 136 | %if %{with ocaml_opt} |
cc17f6ec JR |
137 | %{_libdir}/ocaml/gettext/base/*.a |
138 | %{_libdir}/ocaml/gettext/base/*.cmx | |
03af6252 JR |
139 | %{_libdir}/ocaml/gettext/base/*.cmxa |
140 | %{_libdir}/ocaml/gettext-camomile/*.a | |
141 | %{_libdir}/ocaml/gettext-camomile/*.cmx | |
142 | %{_libdir}/ocaml/gettext-camomile/*.cmxa | |
143 | %{_libdir}/ocaml/gettext/*.cmxa | |
cc17f6ec JR |
144 | %{_libdir}/ocaml/gettext/extension/*.a |
145 | %{_libdir}/ocaml/gettext/extension/*.cmx | |
03af6252 JR |
146 | %{_libdir}/ocaml/gettext/extension/*.cmxa |
147 | %{_libdir}/ocaml/gettext-stub/gettextStub.a | |
cc17f6ec | 148 | %{_libdir}/ocaml/gettext-stub/*.cmx |
03af6252 | 149 | %{_libdir}/ocaml/gettext-stub/*.cmxa |
19e7f5b6 | 150 | %endif |
cc17f6ec JR |
151 | %{_libdir}/ocaml/gettext/dune-package |
152 | %{_libdir}/ocaml/gettext/opam | |
e465ee34 JB |
153 | %{_examplesdir}/%{name}-%{version} |
154 | %{_mandir}/man1/ocaml-gettext.1* | |
155 | %{_mandir}/man1/ocaml-xgettext.1* | |
156 | %{_mandir}/man5/ocaml-gettext.5* |