/[packages]/cauldron/ocaml-ocamlbuild/current/SPECS/ocaml-ocamlbuild.spec
ViewVC logotype

Contents of /cauldron/ocaml-ocamlbuild/current/SPECS/ocaml-ocamlbuild.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1192950 - (show annotations) (download)
Sat Jan 13 21:29:14 2018 UTC (6 years, 3 months ago) by tv
File size: 2640 byte(s)
fix having cmxa in non devel, thus fixing ton of 'Failure: Cannot find "ocamlbuild.cmx"'
1 # temp fix while waiting for ocaml-srpm-macros to be imported
2 %define ocaml_native_compiler aarch64 %{arm} %{ix86} ppc ppc64 ppc64le riscv64 s390x sparc sparcv9 x86_64
3
4 %ifnarch %{ocaml_native_compiler}
5 %global debug_package %{nil}
6 %endif
7
8 Name: ocaml-ocamlbuild
9 Version: 0.12.0
10 Release: %mkrel 2
11 Group: Development/OCaml
12 Summary: Build tool for OCaml libraries and programs
13
14 License: LGPLv2+ with exceptions
15
16 URL: https://github.com/ocaml/ocamlbuild
17 Source0: https://github.com/ocaml/ocamlbuild/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
18
19 BuildRequires: ocaml >= 4.04.0
20
21
22 %description
23 OCamlbuild is a build tool for building OCaml libraries and programs.
24
25
26 %package devel
27 Summary: Development files for %{name}
28 Requires: %{name}%{?_isa} = %{version}-%{release}
29
30
31 %description devel
32 This package contains development files for %{name}.
33
34
35 %package doc
36 Summary: Documentation for %{name}
37 Requires: %{name}%{?_isa} = %{version}-%{release}
38
39
40 %description doc
41 This package contains the manual for %{name}.
42
43
44 %prep
45 %setup -q -n ocamlbuild-%{version}
46
47
48 %build
49 make configure \
50 OCAMLBUILD_PREFIX=%{_prefix} \
51 OCAMLBUILD_BINDIR=%{_bindir} \
52 OCAMLBUILD_LIBDIR=%{_libdir}/ocaml \
53 %ifarch %{ocaml_native_compiler}
54 OCAML_NATIVE=true
55 %else
56 OCAML_NATIVE=false
57 %endif
58
59 # Parallel builds fail.
60 make \
61 OCAMLC="ocamlc.opt -g" \
62 OCAMLOPT="ocamlopt.opt -g"
63
64
65 %install
66 make install \
67 DESTDIR=$RPM_BUILD_ROOT \
68 CHECK_IF_PREINSTALLED=false
69
70 # Install the man page, which for some reason is not copied
71 # in by the make install rule above.
72 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1/
73 install -p -m 0644 man/ocamlbuild.1 $RPM_BUILD_ROOT%{_mandir}/man1/
74
75 # Remove the META file. It will be replaced by ocaml-ocamlfind (findlib).
76 rm $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild/META
77
78
79 %files
80 %doc Changes Readme.md VERSION
81 %license LICENSE
82 %{_bindir}/ocamlbuild
83 %{_bindir}/ocamlbuild.byte
84 %ifarch %{ocaml_native_compiler}
85 %{_bindir}/ocamlbuild.native
86 %endif
87 %{_mandir}/man1/ocamlbuild.1*
88 %{_libdir}/ocaml/ocamlbuild
89 %ifarch %{ocaml_native_compiler}
90 %exclude %{_libdir}/ocaml/ocamlbuild/*.a
91 %exclude %{_libdir}/ocaml/ocamlbuild/*.o
92 %exclude %{_libdir}/ocaml/ocamlbuild/*.cmx
93 %exclude %{_libdir}/ocaml/ocamlbuild/*.cmxa
94 %endif
95 %exclude %{_libdir}/ocaml/ocamlbuild/*.mli
96
97
98 %files devel
99 %license LICENSE
100 %ifarch %{ocaml_native_compiler}
101 %{_libdir}/ocaml/ocamlbuild/*.a
102 %{_libdir}/ocaml/ocamlbuild/*.o
103 %{_libdir}/ocaml/ocamlbuild/*.cmx
104 %{_libdir}/ocaml/ocamlbuild/*.cmxa
105 %endif
106 %{_libdir}/ocaml/ocamlbuild/*.mli
107
108
109 %files doc
110 %license LICENSE
111 %doc manual/*
112
113

  ViewVC Help
Powered by ViewVC 1.1.30