]> git.pld-linux.org Git - packages/ocaml-fuse.git/blob - ocaml-fuse.spec
c3337de08d1c39d4d5171f055a04bfd6f27c651e
[packages/ocaml-fuse.git] / ocaml-fuse.spec
1 #
2 # Conditional build:
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
9
10 %define         modname Fuse
11 Summary:        %{modname} binding for OCaml
12 Summary(pl.UTF-8):      Wiązania %{modname} dla OCamla
13 Name:           ocaml-fuse
14 Version:        2.7
15 Release:        4
16 License:        GPL v2
17 Group:          Libraries
18 Source0:        http://downloads.sourceforge.net/ocamlfuse/ocamlfuse-%{version}-1.tar.gz
19 # Source0-md5:  cb9cbe4fafb36ead1b78faaacc26f3e3
20 URL:            http://sourceforge.net/apps/mediawiki/ocamlfuse/
21 BuildRequires:  libfuse-devel
22 BuildRequires:  ocaml >= 3.08
23 BuildRequires:  ocaml-findlib >= 1.4
24 BuildRequires:  ocaml-idl-devel >= 1.0.5
25 %requires_eq    ocaml-runtime
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         debug_package   %{nil}
29
30 %description
31 OcamlFuse is a binding to the high-level part of the fuse library,
32 allowing you to implement linux filesystems in OCaml. Other operating
33 systems are not supported, if you think you can help we will be glad
34 to hear.
35
36 The 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
45 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
46 używających tej biblioteki.
47
48 %package devel
49 Summary:        ocamlfuse binding for OCaml - development part
50 Summary(pl.UTF-8):      Wiązania ocamlfuse dla OCamla - cześć programistyczna
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 %requires_eq    ocaml
54 Requires:       libfuse-devel
55 Requires:       ocaml-idl-devel >= 1.0.5
56
57 %description devel
58 This package contains files needed to develop OCaml programs using
59 this library.
60
61 %description devel -l pl.UTF-8
62 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
63 tej biblioteki.
64
65 %prep
66 %setup -qc
67 mv ocamlfuse/* .
68
69 %build
70 %{__make} -j1 -C lib \
71         byte-code-library \
72         %{?with_ocaml_opt:native-code-library} \
73         PACKS=camlidl \
74         CC="%{__cc} %{rpmcflags} -fPIC"
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 cd lib
79
80 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{%{modname},stublibs}
81 install -p *.cm[ixa]* *.a $RPM_BUILD_ROOT%{_libdir}/ocaml/%{modname}
82 install -p dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
83
84 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{modname}
85 cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{modname}/META <<EOF
86 requires = ""
87 version = "%{version}"
88 directory = "+%{modname}"
89 archive(byte) = "%{modname}.cma"
90 archive(native) = "%{modname}.cmxa"
91 linkopts = ""
92 EOF
93
94 %clean
95 rm -rf $RPM_BUILD_ROOT
96
97 %files
98 %defattr(644,root,root,755)
99 %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
100
101 %files devel
102 %defattr(644,root,root,755)
103 %doc LICENSE lib/*.mli
104 %dir %{_libdir}/ocaml/%{modname}
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
112 %{_libdir}/ocaml/site-lib/%{modname}
This page took 0.040695 seconds and 2 git commands to generate.