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