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