3 %bcond_without ocaml_opt # native optimized binaries (bytecode is always built)
5 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
6 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
7 %undefine with_ocaml_opt
10 %define _enable_debug_packages 0
12 Summary: Minimal library providing hexadecimal converters
13 Summary(pl.UTF-8): Minimalna biblioteka zapewniająca konwertery szesnastkowe
19 #Source0Download: https://github.com/mirage/ocaml-hex/releases
20 Source0: https://github.com/mirage/ocaml-hex/releases/download/v%{version}/hex-v%{version}.tbz
21 # Source0-md5: 57103ff33e70f14171c46d88f5452d11
22 URL: https://github.com/mirage/ocaml-hex
23 BuildRequires: ocaml >= 1:4.03.0
24 BuildRequires: ocaml-bigarray-compat-devel >= 1.0.0
25 BuildRequires: ocaml-cstruct-devel >= 1.7.0
26 BuildRequires: ocaml-dune >= 1.0
27 %requires_eq ocaml-runtime
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Minimal library providing hexadecimal converters.
33 %description -l pl.UTF-8
34 Minimalna biblioteka zapewniająca konwertery szesnastkowe.
37 Summary: Minimal library providing hexadecimal converters - development part
38 Summary(pl.UTF-8): Minimalna biblioteka zapewniająca konwertery szesnastkowe - część programistyczna
39 Group: Development/Libraries
40 Requires: %{name} = %{version}-%{release}
42 Requires: ocaml-bigarray-compat-devel >= 1.0.0
43 Requires: ocaml-cstruct-devel >= 1.7.0
46 This package contains libraries and signature files for developing
47 applications that use OCaml hex library.
49 %description devel -l pl.UTF-8
50 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
51 wykorzystujących bibliotekę OCamla hex.
54 %setup -q -n hex-v%{version}
57 dune build %{?_smp_mflags} --display=verbose
60 rm -rf $RPM_BUILD_ROOT
62 dune install --destdir=$RPM_BUILD_ROOT
65 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/hex/*.ml
67 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/hex
70 rm -rf $RPM_BUILD_ROOT
73 %defattr(644,root,root,755)
74 %doc CHANGES.md LICENSE.md README.md
75 %dir %{_libdir}/ocaml/hex
76 %{_libdir}/ocaml/hex/META
77 %{_libdir}/ocaml/hex/*.cma
79 %attr(755,root,root) %{_libdir}/ocaml/hex/*.cmxs
83 %defattr(644,root,root,755)
84 %{_libdir}/ocaml/hex/dune-package
85 %{_libdir}/ocaml/hex/opam
86 %{_libdir}/ocaml/hex/*.cmi
87 %{_libdir}/ocaml/hex/*.cmt
88 %{_libdir}/ocaml/hex/*.cmti
89 %{_libdir}/ocaml/hex/*.mli
91 %{_libdir}/ocaml/hex/hex.a
92 %{_libdir}/ocaml/hex/*.cmx
93 %{_libdir}/ocaml/hex/*.cmxa