]> git.pld-linux.org Git - packages/ocaml-hex.git/blob - ocaml-hex.spec
- new
[packages/ocaml-hex.git] / ocaml-hex.spec
1 #
2 # Conditional build:
3 %bcond_without  ocaml_opt       # native optimized binaries (bytecode is always built)
4
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
8 %endif
9
10 %define         _enable_debug_packages  0
11
12 Summary:        Minimal library providing hexadecimal converters
13 Summary(pl.UTF-8):      Minimalna biblioteka zapewniająca konwertery szesnastkowe
14 Name:           ocaml-hex
15 Version:        1.4.0
16 Release:        1
17 License:        ISC
18 Group:          Libraries
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)
29
30 %description
31 Minimal library providing hexadecimal converters.
32
33 %description -l pl.UTF-8
34 Minimalna biblioteka zapewniająca konwertery szesnastkowe.
35
36 %package devel
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}
41 %requires_eq    ocaml
42 Requires:       ocaml-bigarray-compat-devel >= 1.0.0
43 Requires:       ocaml-cstruct-devel >= 1.7.0
44
45 %description devel
46 This package contains libraries and signature files for developing
47 applications that use OCaml hex library.
48
49 %description devel -l pl.UTF-8
50 Ten pakiet zawiera biblioteki i pliki sygnatur do tworzenia aplikacji
51 wykorzystujących bibliotekę OCamla hex.
52
53 %prep
54 %setup -q -n hex-v%{version}
55
56 %build
57 dune build %{?_smp_mflags} --display=verbose
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61
62 dune install --destdir=$RPM_BUILD_ROOT
63
64 # sources
65 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/hex/*.ml
66 # packaged as %doc
67 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/hex
68
69 %clean
70 rm -rf $RPM_BUILD_ROOT
71
72 %files
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
78 %if %{with ocaml_opt}
79 %attr(755,root,root) %{_libdir}/ocaml/hex/*.cmxs
80 %endif
81
82 %files devel
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
90 %if %{with ocaml_opt}
91 %{_libdir}/ocaml/hex/hex.a
92 %{_libdir}/ocaml/hex/*.cmx
93 %{_libdir}/ocaml/hex/*.cmxa
94 %endif
This page took 0.155385 seconds and 3 git commands to generate.