]> git.pld-linux.org Git - projects/template-specs.git/blame_incremental - ocaml.spec
modernize template
[projects/template-specs.git] / ocaml.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without opt # build opt
4
5%define module %{module}
6Summary: %{module} binding for OCaml
7Summary(pl.UTF-8): Wiązania %{module} dla OCamla
8Name: ocaml-%{module}
9Version: -
10Release: 1
11License: - (enter GPL/LGPL/BSD/BSD-like/other license name here)
12Group: Libraries
13Source0: %{module}-%{version}.tar.gz
14URL: -
15# Source0-md5: -
16#BuildRequires: -devel
17BuildRequires: ocaml >= 3.04-7
18%requires_eq ocaml-runtime
19BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21%define debug_package %{nil}
22
23%description
24This package contains files needed to run bytecode executables using
25this library.
26
27%description -l pl.UTF-8
28Pakiet ten zawiera binaria potrzebne do uruchamiania programów
29używających tej biblioteki.
30
31%package devel
32Summary: %{module} binding for OCaml - development part
33Summary(pl.UTF-8): Wiązania %{module} dla OCamla - cześć programistyczna
34Group: Development/Libraries
35Requires: %{name} = %{version}-%{release}
36%requires_eq ocaml
37
38%description devel
39This package contains files needed to develop OCaml programs using
40this library.
41
42%description devel -l pl.UTF-8
43Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
44tej biblioteki.
45
46%prep
47%setup -q -n %{module}-%{version}
48
49%build
50%{__make} -j1 all %{?with_opt:opt} \
51 CC="%{__cc} %{rpmcflags} -fPIC"
52
53%install
54rm -rf $RPM_BUILD_ROOT
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}"
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)
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}
89%{_examplesdir}/%{name}-%{version}
This page took 0.032917 seconds and 4 git commands to generate.