]> git.pld-linux.org Git - projects/template-specs.git/blame_incremental - ocaml.spec
- drop alt_kernel<>build_kernels conflict error, build_kernels will always take prece...
[projects/template-specs.git] / ocaml.spec
... / ...
CommitLineData
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 %{module}
11Summary: %{module} binding for OCaml
12Summary(pl.UTF-8): Wiązania %{module} dla OCamla
13Name: ocaml-%{module}
14Version: -
15Release: 1
16License: - (enter GPL/LGPL/BSD/BSD-like/other license name here)
17Group: Libraries
18Source0: %{module}-%{version}.tar.gz
19URL: -
20# Source0-md5: -
21#BuildRequires: -devel
22BuildRequires: ocaml >= 3.04-7
23%requires_eq ocaml-runtime
24BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25
26%define debug_package %{nil}
27%if %{without ocaml_opt}
28%define no_install_post_strip 1
29# no opt means no native binary, stripping bytecode breaks such programs
30%define _enable_debug_packages 0
31%endif
32
33%description
34This package contains files needed to run bytecode executables using
35TEMPLATE library.
36
37%description -l pl.UTF-8
38Pakiet ten zawiera binaria potrzebne do uruchamiania programów
39używających biblioteki TEMPLATE.
40
41%package devel
42Summary: TEMPLATE binding for OCaml - development part
43Summary(pl.UTF-8): Wiązania TEMPLATE dla OCamla - cześć programistyczna
44Group: Development/Libraries
45Requires: %{name} = %{version}-%{release}
46%requires_eq ocaml
47
48%description devel
49This package contains files needed to develop OCaml programs using
50TEMPLATE library.
51
52%description devel -l pl.UTF-8
53Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
54biblioteki TEMPLATE.
55
56%prep
57%setup -q -n %{module}-%{version}
58
59%build
60%{__make} -j1 all %{?with_ocaml_opt:opt} \
61 CC="%{__cc} %{rpmcflags} -fPIC"
62
63%install
64rm -rf $RPM_BUILD_ROOT
65export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
66install -d $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
67%{__make} install \
68 DESTDIR=$RPM_BUILD_ROOT
69
70#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71#cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72
73# move to dir pld ocamlfind looks
74install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
75mv $OCAMLFIND_DESTDIR/%{module}/META \
76 $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
77cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
78directory="+%{module}"
79EOF
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%files
85%defattr(644,root,root,755)
86%attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so
87%dir %{_libdir}/ocaml/%{module}
88%{_libdir}/ocaml/%{module}/*.cma
89%if %{with ocaml_opt}
90%attr(755,root,root) %{_libdir}/ocaml/%{module}/*.cmxs
91%endif
92
93%files devel
94%defattr(644,root,root,755)
95%doc LICENSE
96%{_libdir}/ocaml/%{module}/*.cmi
97%{_libdir}/ocaml/%{module}/*.cmo
98%{_libdir}/ocaml/%{module}/*.mli
99%if %{with ocaml_opt}
100%{_libdir}/ocaml/%{module}/*.[ao]
101%{_libdir}/ocaml/%{module}/*.cmx
102%{_libdir}/ocaml/%{module}/*.cmxa
103%endif
104%{_libdir}/ocaml/site-lib/%{module}
105%{_examplesdir}/%{name}-%{version}
This page took 0.041804 seconds and 4 git commands to generate.