]> git.pld-linux.org Git - packages/ocaml-luv.git/blob - ocaml-luv.spec
70d2f333fe2e74466b47347fc6c3bf7c36a14922
[packages/ocaml-luv.git] / ocaml-luv.spec
1 # TODO: docs (BR: [ocaml-]odoc)
2 #
3 # Conditional build:
4 %bcond_without  ocaml_opt       # native optimized binaries (bytecode is always built)
5
6 # not yet available on x32 (ocaml 4.02.1), update when upstream will support it
7 %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9
8 %undefine       with_ocaml_opt
9 %endif
10
11 Summary:        OCaml binding to libuv: cross-platform asynchronous I/O
12 Summary(pl.UTF-8):      Wiązania OCamla do libuv - wieloplatformowego asynchronicznego we/wy
13 Name:           ocaml-luv
14 Version:        0.5.10
15 Release:        1
16 License:        MIT
17 Group:          Libraries
18 #Source0Download: https://github.com/aantron/luv/releases
19 Source0:        https://github.com/aantron/luv/releases/download/%{version}/luv-%{version}.tar.gz
20 # Source0-md5:  583feee83bd0ff577ca8c59c3408b413
21 URL:            https://github.com/aantron/luv
22 BuildRequires:  libuv-devel
23 BuildRequires:  ocaml >= 1:4.02.0
24 BuildRequires:  ocaml-ctypes-devel >= 0.14.0
25 BuildRequires:  ocaml-dune >= 2.0.0
26 BuildRequires:  ocaml-result-devel
27 %requires_eq    ocaml-runtime
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %if %{without ocaml_opt}
31 %define         no_install_post_strip   1
32 # no opt means no native binary, stripping bytecode breaks such programs
33 %define         _enable_debug_packages  0
34 %endif
35
36 %description
37 Luv is a binding to libuv, the cross-platform C library that does
38 asynchronous I/O in Node.js and runs its main loop.
39
40 This package contains files needed to run bytecode executables using
41 luv library.
42
43 %description -l pl.UTF-8
44 Luv to wiązanie do libuv - wieloplatformowej biblioteki C,
45 odpowiadającej za asynchroniczne we/wy oraz głowną pętlę w Node.js.
46
47 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
48 używających biblioteki luv.
49
50 %package devel
51 Summary:        OCaml binding to libuv - development part
52 Summary(pl.UTF-8):      Wiązania OCamla do libuv - 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 luv
59 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 luv.
64
65 %prep
66 %setup -q -n luv-%{version}
67
68 %build
69 LUV_USE_SYSTEM_LIBUV=yes \
70 dune build --verbose
71
72 %install
73 rm -rf $RPM_BUILD_ROOT
74
75 dune install --destdir=$RPM_BUILD_ROOT
76
77 # sources
78 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/luv/{,*/}*.ml
79 %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/luv_unix/*.ml
80 # packaged as %doc
81 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/{luv,luv_unix}
82
83 %clean
84 rm -rf $RPM_BUILD_ROOT
85
86 %files
87 %defattr(644,root,root,755)
88 %doc LICENSE.md README.md
89 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllluv_c_stubs.so
90 %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllluv_unix_stubs.so
91 %dir %{_libdir}/ocaml/luv
92 %{_libdir}/ocaml/luv/META
93 %{_libdir}/ocaml/luv/*.cma
94 %dir %{_libdir}/ocaml/luv/c
95 %{_libdir}/ocaml/luv/c/*.cma
96 %dir %{_libdir}/ocaml/luv/c_function_descriptions
97 %{_libdir}/ocaml/luv/c_function_descriptions/*.cma
98 %dir %{_libdir}/ocaml/luv/c_type_descriptions
99 %{_libdir}/ocaml/luv/c_type_descriptions/*.cma
100 %if %{with ocaml_opt}
101 %attr(755,root,root) %{_libdir}/ocaml/luv/*.cmxs
102 %attr(755,root,root) %{_libdir}/ocaml/luv/c/*.cmxs
103 %attr(755,root,root) %{_libdir}/ocaml/luv/c_function_descriptions/*.cmxs
104 %attr(755,root,root) %{_libdir}/ocaml/luv/c_type_descriptions/*.cmxs
105 %endif
106 %dir %{_libdir}/ocaml/luv_unix
107 %{_libdir}/ocaml/luv_unix/META
108 %{_libdir}/ocaml/luv_unix/*.cma
109 %if %{with ocaml_opt}
110 %attr(755,root,root) %{_libdir}/ocaml/luv_unix/*.cmxs
111 %endif
112
113 %files devel
114 %defattr(644,root,root,755)
115 %{_libdir}/ocaml/luv/dune-package
116 %{_libdir}/ocaml/luv/opam
117 %{_libdir}/ocaml/luv/*.cmi
118 %{_libdir}/ocaml/luv/*.cmt
119 %{_libdir}/ocaml/luv/*.cmti
120 %{_libdir}/ocaml/luv/*.mli
121 %{_libdir}/ocaml/luv/c/*.cmi
122 %{_libdir}/ocaml/luv/c/*.cmt
123 %{_libdir}/ocaml/luv/c_function_descriptions/*.cmi
124 %{_libdir}/ocaml/luv/c_function_descriptions/*.cmt
125 %{_libdir}/ocaml/luv/c_type_descriptions/*.cmi
126 %{_libdir}/ocaml/luv/c_type_descriptions/*.cmt
127 %if %{with ocaml_opt}
128 %{_libdir}/ocaml/luv/*.a
129 %{_libdir}/ocaml/luv/*.cmx
130 %{_libdir}/ocaml/luv/*.cmxa
131 %{_libdir}/ocaml/luv/c/*.a
132 %{_libdir}/ocaml/luv/c/*.cmx
133 %{_libdir}/ocaml/luv/c/*.cmxa
134 %{_libdir}/ocaml/luv/c_function_descriptions/*.a
135 %{_libdir}/ocaml/luv/c_function_descriptions/*.cmx
136 %{_libdir}/ocaml/luv/c_function_descriptions/*.cmxa
137 %{_libdir}/ocaml/luv/c_type_descriptions/*.a
138 %{_libdir}/ocaml/luv/c_type_descriptions/*.cmx
139 %{_libdir}/ocaml/luv/c_type_descriptions/*.cmxa
140 %endif
141 %{_libdir}/ocaml/luv_unix/dune-package
142 %{_libdir}/ocaml/luv_unix/opam
143 %{_libdir}/ocaml/luv_unix/*.cmi
144 %{_libdir}/ocaml/luv_unix/*.cmt
145 %{_libdir}/ocaml/luv_unix/*.cmti
146 %{_libdir}/ocaml/luv_unix/*.mli
147 %if %{with ocaml_opt}
148 %{_libdir}/ocaml/luv_unix/*.a
149 %{_libdir}/ocaml/luv_unix/*.cmx
150 %{_libdir}/ocaml/luv_unix/*.cmxa
151 %endif
This page took 0.065644 seconds and 2 git commands to generate.