- add ocaml_opt bcond
[packages/ocaml-fuse.git] / ocaml-fuse.spec
CommitLineData
6d4859a1
ER
1#
2# Conditional build:
c5770cec
JR
3%bcond_without ocaml_opt # skip building 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
6d4859a1 9
f5d05c8c 10%define modname Fuse
ed1ca61e
ER
11Summary: %{modname} binding for OCaml
12Summary(pl.UTF-8): Wiązania %{modname} dla OCamla
b1b243d7 13Name: ocaml-fuse
6d4859a1 14Version: 2.7
c5770cec 15Release: 4
6d4859a1
ER
16License: GPL v2
17Group: Libraries
f5d05c8c 18Source0: http://downloads.sourceforge.net/ocamlfuse/ocamlfuse-%{version}-1.tar.gz
6d4859a1
ER
19# Source0-md5: cb9cbe4fafb36ead1b78faaacc26f3e3
20URL: http://sourceforge.net/apps/mediawiki/ocamlfuse/
21BuildRequires: libfuse-devel
22BuildRequires: ocaml >= 3.08
6d4859a1 23BuildRequires: ocaml-findlib >= 1.4
789d8507 24BuildRequires: ocaml-idl-devel >= 1.0.5
6d4859a1
ER
25%requires_eq ocaml-runtime
26BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
ed1ca61e
ER
28%define debug_package %{nil}
29
6d4859a1
ER
30%description
31OcamlFuse is a binding to the high-level part of the fuse library,
32allowing you to implement linux filesystems in OCaml. Other operating
33systems are not supported, if you think you can help we will be glad
34to hear.
35
36The main features of ocamlfuse are:
37- Multithreading: each callback runs in a separate ocaml thread, so
38 that a slow call can't block the filesystem
39- Efficiency: read and write operations use the bigarray library
40 achieving very high troughput _ Ease of use: the fusexmp filesystem
41 (mimicking bindfs) is 73 lines of code, including in-memory extended
42 attributes using a hash table. The hello example is 42 lines of code.
43
44%description -l pl.UTF-8
45Pakiet ten zawiera binaria potrzebne do uruchamiania programów
46używających tej biblioteki.
47
48%package devel
49Summary: ocamlfuse binding for OCaml - development part
50Summary(pl.UTF-8): Wiązania ocamlfuse dla OCamla - cześć programistyczna
51Group: Development/Libraries
52Requires: %{name} = %{version}-%{release}
53%requires_eq ocaml
b92f57da
JR
54Requires: libfuse-devel
55Requires: ocaml-idl-devel >= 1.0.5
6d4859a1
ER
56
57%description devel
58This package contains files needed to develop OCaml programs using
59this library.
60
61%description devel -l pl.UTF-8
62Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
63tej biblioteki.
64
65%prep
66%setup -qc
b1b243d7 67mv ocamlfuse/* .
6d4859a1
ER
68
69%build
c5770cec
JR
70%{__make} -j1 -C lib \
71 byte-code-library \
72 %{?with_ocaml_opt:native-code-library} \
486effbf 73 PACKS=camlidl \
6d4859a1
ER
74 CC="%{__cc} %{rpmcflags} -fPIC"
75
76%install
77rm -rf $RPM_BUILD_ROOT
78cd lib
79
ed1ca61e 80install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{%{modname},stublibs}
2cabacd6 81install -p *.cm[ixa]* *.a $RPM_BUILD_ROOT%{_libdir}/ocaml/%{modname}
f5d05c8c 82install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
6d4859a1 83
ed1ca61e
ER
84install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{modname}
85cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{modname}/META <<EOF
6d4859a1
ER
86requires = ""
87version = "%{version}"
ed1ca61e
ER
88directory = "+%{modname}"
89archive(byte) = "%{modname}.cma"
90archive(native) = "%{modname}.cmxa"
6d4859a1
ER
91linkopts = ""
92EOF
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%files
98%defattr(644,root,root,755)
99%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
6d4859a1
ER
100
101%files devel
102%defattr(644,root,root,755)
103%doc LICENSE lib/*.mli
ed1ca61e 104%dir %{_libdir}/ocaml/%{modname}
c5770cec
JR
105%{_libdir}/ocaml/%{modname}/*.cma
106%{_libdir}/ocaml/%{modname}/*.cm[ix]
107%{_libdir}/ocaml/%{modname}/libFuse_stubs.a
108%if %{with ocaml_opt}
109%{_libdir}/ocaml/%{modname}/Fuse.a
110%{_libdir}/ocaml/%{modname}/*.cmxa
111%endif
ed1ca61e 112%{_libdir}/ocaml/site-lib/%{modname}
This page took 0.112676 seconds and 4 git commands to generate.