]>
Commit | Line | Data |
---|---|---|
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), remove when upstream will support it | |
6 | %ifnarch %{ix86} %{x8664} %{arm} aarch64 ppc sparc sparcv9 | |
7 | %undefine with_ocaml_opt | |
8 | %endif | |
9 | ||
10 | %define module ocamlfuse | |
11 | Summary: Fuse binding for OCaml | |
12 | Summary(pl.UTF-8): Wiązania Fuse dla OCamla | |
13 | Name: ocaml-fuse | |
14 | Version: 2.7.1 | |
15 | Release: 5 | |
16 | License: GPL v2 | |
17 | Group: Libraries | |
18 | #Source0Download: https://github.com/astrada/ocamlfuse/releases | |
19 | Source0: https://github.com/astrada/ocamlfuse/archive/v%{version}_cvs7/ocamlfuse-%{version}-7.tar.gz | |
20 | # Source0-md5: a5da871a0983b6723c6b9b735898fe34 | |
21 | Patch0: no-wrapped.patch | |
22 | URL: https://github.com/astrada/ocamlfuse | |
23 | BuildRequires: libfuse-devel >= 2.7 | |
24 | BuildRequires: ocaml >= 1:4.02.3 | |
25 | BuildRequires: ocaml-dune >= 1.6 | |
26 | BuildRequires: ocaml-findlib >= 1.4 | |
27 | BuildRequires: ocaml-idl-devel >= 1.0.5 | |
28 | BuildRequires: pkgconfig | |
29 | %requires_eq ocaml-runtime | |
30 | Requires: libfuse >= 2.7 | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %define debug_package %{nil} | |
34 | ||
35 | %description | |
36 | OcamlFuse is a binding to the high-level part of the fuse library, | |
37 | allowing you to implement Linux filesystems in OCaml. | |
38 | ||
39 | The main features of ocamlfuse are: | |
40 | - Multithreading: each callback runs in a separate ocaml thread, so | |
41 | that a slow call can't block the filesystem | |
42 | - Efficiency: read and write operations use the bigarray library | |
43 | achieving very high troughput | |
44 | - Ease of use: the fusexmp filesystem (mimicking bindfs) is 73 lines | |
45 | of code, including in-memory extended attributes using a hash table. | |
46 | The hello example is 42 lines of code. | |
47 | ||
48 | %description -l pl.UTF-8 | |
49 | OcamlFuse to wiązania do wysokopoziomowej części biblioteki fuse, | |
50 | pozwalające implementować linuksowe systemy plików w OCamlu. | |
51 | ||
52 | Główne cechy ocamlfuse to: | |
53 | - wielowątkowość: każde wywołanie zwrotne działa w osobnym wątku | |
54 | OCamla, więc powolne wywołanie nie zablokuje systemu plików | |
55 | - wydajność: operacje odczytu i zapisu wykorzystują bibliotekę | |
56 | bigarray, osiągając dużą przepustowość | |
57 | - łatwość użycia: system plików fusexmp (naśladujący bindfs) ma | |
58 | jedynie 73 linie kodu, włącznie z rozszerzonymi atrybutami w | |
59 | pamięci, wykorzystującymi tablicę haszującą; przykład "hello | |
60 | world" ma 42 linie kodu. | |
61 | ||
62 | %package devel | |
63 | Summary: ocamlfuse binding for OCaml - development part | |
64 | Summary(pl.UTF-8): Wiązania ocamlfuse dla OCamla - część programistyczna | |
65 | Group: Development/Libraries | |
66 | Requires: %{name} = %{version}-%{release} | |
67 | %requires_eq ocaml | |
68 | Requires: libfuse-devel >= 2.7 | |
69 | Requires: ocaml-idl-devel >= 1.0.5 | |
70 | ||
71 | %description devel | |
72 | This package contains files needed to develop OCaml programs using | |
73 | Fuse library. | |
74 | ||
75 | %description devel -l pl.UTF-8 | |
76 | Pakiet ten zawiera pliki niezbędne do tworzenia programów w OCamlu, | |
77 | używających biblioteki Fuse. | |
78 | ||
79 | %prep | |
80 | %setup -q -n ocamlfuse-2.7.1_cvs7 | |
81 | %patch0 -p1 | |
82 | ||
83 | %build | |
84 | %{__make} | |
85 | ||
86 | %install | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %{__make} install \ | |
90 | DESTDIR=$RPM_BUILD_ROOT | |
91 | ||
92 | # sources | |
93 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/ocaml/%{module}/*.ml | |
94 | # LICENSE is generic GPLv2 text, README.md packaged as %doc | |
95 | %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc/%{module} | |
96 | ||
97 | %clean | |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
100 | %files | |
101 | %defattr(644,root,root,755) | |
102 | %doc README.md | |
103 | %dir %{_libdir}/ocaml/%{module} | |
104 | %{_libdir}/ocaml/%{module}/META | |
105 | %{_libdir}/ocaml/%{module}/*.cma | |
106 | %if %{with ocaml_opt} | |
107 | %attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs | |
108 | %endif | |
109 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/dllfuse_stubs.so | |
110 | ||
111 | %files devel | |
112 | %defattr(644,root,root,755) | |
113 | %{_libdir}/ocaml/%{module}/dune-package | |
114 | %{_libdir}/ocaml/%{module}/opam | |
115 | %{_libdir}/ocaml/%{module}/*.cmi | |
116 | %{_libdir}/ocaml/%{module}/*.cmt | |
117 | %{_libdir}/ocaml/%{module}/*.cmti | |
118 | %{_libdir}/ocaml/%{module}/*.a | |
119 | %{_libdir}/ocaml/%{module}/*.mli | |
120 | %if %{with ocaml_opt} | |
121 | %{_libdir}/ocaml/%{module}/*.cmx | |
122 | %{_libdir}/ocaml/%{module}/*.cmxa | |
123 | %endif |