]>
Commit | Line | Data |
---|---|---|
7ebc219f ER |
1 | # TODO |
2 | ||
3 | #%define _use_internal_dependency_generator 0 | |
4 | #%define __find_requires /usr/lib/rpm/ocaml-find-requires.sh | |
5 | #%define __find_provides /usr/lib/rpm/ocaml-find-provides.sh | |
6 | # disable debug - not useful? | |
7 | %define debug_package %{nil} | |
8 | ||
9 | # | |
10 | # Conditional build: | |
11 | %bcond_without opt # build opt | |
12 | ||
9e120d3c | 13 | Summary: TEMPLATE binding for OCaml |
ce39d734 | 14 | Summary(pl.UTF-8): Wiązania TEMPLATE dla OCamla |
9e120d3c | 15 | Name: ocaml-template |
7dfc48d9 | 16 | Version: - |
9e120d3c | 17 | Release: 1 |
7dfc48d9 | 18 | License: - (enter GPL/LGPL/BSD/BSD-like/other license name here) |
9e120d3c | 19 | Group: Libraries |
9e120d3c | 20 | Source0: template-%{version}.tar.gz |
7dfc48d9 | 21 | # Source0-md5: - |
9e120d3c MM |
22 | BuildRequires: -devel |
23 | BuildRequires: ocaml >= 3.04-7 | |
24 | %requires_eq ocaml-runtime | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
d954f2a4 | 28 | This package contains files needed to run bytecode executables using |
9e120d3c MM |
29 | this library. |
30 | ||
9be49f18 JR |
31 | %description -l pl.UTF-8 |
32 | Pakiet ten zawiera binaria potrzebne do uruchamiania programów | |
33 | używających tej biblioteki. | |
9e120d3c MM |
34 | |
35 | %package devel | |
36 | Summary: TEMPLATE binding for OCaml - development part | |
ce39d734 | 37 | Summary(pl.UTF-8): Wiązania TEMPLATE dla OCamla - cześć programistyczna |
9e120d3c MM |
38 | Group: Development/Libraries |
39 | Requires: %{name} = %{version}-%{release} | |
40 | %requires_eq ocaml | |
41 | ||
42 | %description devel | |
d954f2a4 | 43 | This package contains files needed to develop OCaml programs using |
9e120d3c MM |
44 | this library. |
45 | ||
9be49f18 JR |
46 | %description devel -l pl.UTF-8 |
47 | Pakiet ten zawiera pliki niezbędne do tworzenia programów używających | |
9e120d3c MM |
48 | tej biblioteki. |
49 | ||
50 | %prep | |
51 | %setup -q -n template-%{version} | |
52 | ||
53 | %build | |
54 | %{__make} CC="%{__cc} %{rpmcflags} -fPIC" all opt | |
55 | ||
56 | %install | |
57 | rm -rf $RPM_BUILD_ROOT | |
58 | ||
59 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/{template,stublibs} | |
60 | install *.cm[ixa]* *.a dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/template | |
61 | install dll*.so $RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs | |
62 | ||
63 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
64 | cp -r foo bar $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
65 | ||
66 | install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/template | |
67 | cat > $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/template/META <<EOF | |
68 | requires = "" | |
69 | version = "%{version}" | |
70 | directory = "+template" | |
71 | archive(byte) = "template.cma" | |
72 | archive(native) = "template.cmxa" | |
73 | linkopts = "" | |
74 | EOF | |
75 | ||
76 | %clean | |
77 | rm -rf $RPM_BUILD_ROOT | |
78 | ||
79 | %files | |
80 | %defattr(644,root,root,755) | |
81 | %attr(755,root,root) %{_libdir}/ocaml/stublibs/*.so | |
82 | ||
83 | %files devel | |
84 | %defattr(644,root,root,755) | |
d954f2a4 | 85 | %doc LICENSE *.mli |
9e120d3c MM |
86 | %dir %{_libdir}/ocaml/template |
87 | %{_libdir}/ocaml/template/*.cm[ixa]* | |
88 | %{_libdir}/ocaml/template/*.a | |
89 | %{_examplesdir}/%{name}-%{version} | |
90 | %{_libdir}/ocaml/site-lib/template |