]> git.pld-linux.org Git - packages/ocaml-dune.git/blob - ocaml-dune.spec
d42684a25ecd14bcc397f77c5e204c4f7bf773da
[packages/ocaml-dune.git] / ocaml-dune.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), 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         module  dune
11 Summary:        A composable build system for OCaml
12 Name:           ocaml-%{module}
13 Version:        1.5.1
14 Release:        1
15 License:        MIT
16 Group:          Libraries
17 Source0:        https://github.com/ocaml/dune/archive/%{version}/%{module}-%{version}.tar.gz
18 # Source0-md5:  3f14fccc36dd6b852390831a3f2b4137
19 Patch0:         mandir.patch
20 URL:            https://github.com/ocaml/dune
21 BuildRequires:  ocaml >= 3.04-7
22 %requires_eq    ocaml-runtime
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %define         debug_package   %{nil}
26 %if %{without ocaml_opt}
27 %define         no_install_post_strip   1
28 # no opt means no native binary, stripping bytecode breaks such programs
29 %define         _enable_debug_packages  0
30 %endif
31
32 %description
33 A composable build system for OCaml.
34
35 %prep
36 %setup -q -n %{module}-%{version}
37 %patch0 -p1
38
39 %build
40 ocaml configure.ml
41
42 %{__make} -j1 release \
43         CC="%{__cc} %{rpmcflags} -fPIC"
44
45 %install
46 rm -rf $RPM_BUILD_ROOT
47
48 %{__make} install \
49         DESTDIR=$RPM_BUILD_ROOT
50
51 %clean
52 rm -rf $RPM_BUILD_ROOT
53
54 %files
55 %defattr(644,root,root,755)
56 %doc LICENSE.md CHANGES.md README.md
57 %attr(755,root,root) %{_bindir}/dune
58 %attr(755,root,root) %{_bindir}/jbuilder
59 %{_libdir}/ocaml/site-lib/%{module}
60 %{_mandir}/man1/dune*.1*
61 %{_mandir}/man5/dune*.5*
This page took 0.065663 seconds and 2 git commands to generate.