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