]> git.pld-linux.org Git - projects/template-specs.git/blob - ocaml.spec
jquery: add min copy sample
[projects/template-specs.git] / ocaml.spec
1 #
2 # Conditional build:
3 %bcond_without  opt             # build opt
4
5 %define         module  %{module}
6 Summary:        %{module} binding for OCaml
7 Summary(pl.UTF-8):      Wiązania %{module} dla OCamla
8 Name:           ocaml-%{module}
9 Version:        -
10 Release:        1
11 License:        - (enter GPL/LGPL/BSD/BSD-like/other license name here)
12 Group:          Libraries
13 Source0:        %{module}-%{version}.tar.gz
14 URL:            -
15 # Source0-md5:  -
16 #BuildRequires: -devel
17 BuildRequires:  ocaml >= 3.04-7
18 %requires_eq    ocaml-runtime
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         debug_package   %{nil}
22
23 %description
24 This package contains files needed to run bytecode executables using
25 this library.
26
27 %description -l pl.UTF-8
28 Pakiet ten zawiera binaria potrzebne do uruchamiania programów
29 używających tej biblioteki.
30
31 %package devel
32 Summary:        TEMPLATE binding for OCaml - development part
33 Summary(pl.UTF-8):      Wiązania TEMPLATE dla OCamla - cześć programistyczna
34 Group:          Development/Libraries
35 Requires:       %{name} = %{version}-%{release}
36 %requires_eq    ocaml
37
38 %description devel
39 This package contains files needed to develop OCaml programs using
40 TEMPLATE library.
41
42 %description devel -l pl.UTF-8
43 Pakiet ten zawiera pliki niezbędne do tworzenia programów używających
44 TEMPLATE 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
54 rm -rf $RPM_BUILD_ROOT
55 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
56 install -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
64 install -d $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
65 mv $OCAMLFIND_DESTDIR/%{module}/META \
66         $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}
67 cat <<EOF >> $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/%{module}/META
68 directory="+%{module}"
69 EOF
70
71 %clean
72 rm -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.041875 seconds and 3 git commands to generate.