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