summaryrefslogtreecommitdiffstats
path: root/funpl/jocaml.spec
blob: b30c0aa8e4c3055140b2d7009cad23cbc7c6df60 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
%define debug_package %{nil}
#define _use_internal_dependency_generator 0

# Using these extracts internal modules even after
# %{_libdir}/jocaml has been cleaned up
#define __find_requires /usr/lib/rpm/ocaml-find-requires.sh
#define __find_provides /usr/lib/rpm/ocaml-find-provides.sh

Name:           jocaml
Version:        3.11.0
Release:        2%{?dist}
Summary:        Join-calculus extension of Objective Caml

Group:          Development/Libraries
License:        QPL and LGPLv2+ (with exceptions)
URL:            http://jocaml.inria.fr
Source0:        http://jocaml.inria.fr/pub/distri/jocaml-3.11/jocaml-%{version}.tar.gz
Source1:        http://jocaml.inria.fr/pub/distri/jocaml-3.11/jocaml-3.11-refman.html.tar.gz
Source2:        http://jocaml.inria.fr/pub/distri/jocaml-3.11/jocaml-3.11-refman.pdf

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  ocaml = %{version}
Requires:       ocaml = %{version}

%description
JoCaml is a extension of Objective Caml for concurrent and
distributed programming, based upon the join-calculus.

This package comprises two batch compilers (a fast bytecode compiler
and an optimizing native-code compiler), an interactive toplevel system,
parsing tools (Lex,Yacc,Camlp4), a replay debugger, a documentation generator,
and a comprehensive library.


%package runtime
Group:          System Environment/Libraries
Summary:        JoCaml runtime environment
Requires:       util-linux-ng ocaml(runtime) = %{version}
Provides:       jocaml(runtime) = %{version}

%description runtime
JoCaml is a extension of Objective Caml for concurrent and
distributed programming, based upon the join-calculus.

This package contains the runtime environment needed to run JoCaml bytecode.


%package docs
Group:          Development/Languages
Summary:        Documentation for JoCaml
Requires:       jocaml = %{version}-%{release}


%description docs
JoCaml is a extension of Objective Caml for concurrent and
distributed programming, based upon the join-calculus.

This package contains documentation in PDF and HTML format.


%prep
%setup -q
%setup -q -T -D -a 1 -n %{name}-%{version}
cp -p %{SOURCE2} refman.pdf


%build
CFLAGS="$RPM_OPT_FLAGS" ./configure \
    -prefix %{_prefix} \
    -libdir %{_libdir}/jocaml \
    -mandir %{_mandir}

make world opt opt.opt


%install
rm -rf $RPM_BUILD_ROOT
make install \
     BINDIR=$RPM_BUILD_ROOT%{_bindir} \
     LIBDIR=$RPM_BUILD_ROOT%{_libdir}/jocaml
# fixes
pushd $RPM_BUILD_ROOT%{_bindir}
for i in ocaml*; do
  mv $i j$i
done
popd
# avoid duplicating Ocaml's libraries
pushd $RPM_BUILD_ROOT%{_libdir}/jocaml
mkdir safe
mv caml* *labels ex* *.conf* lib*run* libthreads* safe/
rm *.*
rm -rf caml*
mv safe/* .
rmdir safe
# rm stublibs/dllgraphics.so
rm stublibs/dllunix.so
popd


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%{_bindir}/jocaml
%{_bindir}/jocamlc
%{_bindir}/jocamlc.opt
%{_bindir}/jocamlcp
%{_bindir}/jocamldep
%{_bindir}/jocamldep.opt
%{_bindir}/jocamllex
%{_bindir}/jocamllex.opt
%{_bindir}/jocamlmklib
%{_bindir}/jocamlmktop
%{_bindir}/jocamlopt
%{_bindir}/jocamlopt.opt
%{_bindir}/jocamlprof
%{_bindir}/jocamlyacc
%{_libdir}/jocaml/addlabels
%{_libdir}/jocaml/scrapelabels
%{_libdir}/jocaml/camlheader*
%{_libdir}/jocaml/expunge
%{_libdir}/jocaml/extract_crc
%{_libdir}/jocaml/ld.conf
%{_libdir}/jocaml/Makefile.config
%{_libdir}/jocaml/*.a
%{_libdir}/jocaml/vmthreads/*.mli
%{_libdir}/jocaml/vmthreads/*.a
%{_libdir}/jocaml/threads/*.mli
%{_libdir}/jocaml/threads/*.a
%{_libdir}/jocaml/threads/*.cmxa
%{_libdir}/jocaml/threads/*.cmx
%{_libdir}/ocaml/caml


%files runtime
%defattr(-,root,root,-)
%doc LICENSE README Changes_JoCaml
%{_bindir}/jocamlrun
%dir %{_libdir}/jocaml
%{_libdir}/jocaml/*.so
%{_libdir}/jocaml/stublibs
%dir %{_libdir}/jocaml/vmthreads
%{_libdir}/jocaml/vmthreads/*.cmi
%{_libdir}/jocaml/vmthreads/*.cma
%dir %{_libdir}/jocaml/threads
%{_libdir}/jocaml/threads/*.cmi
%{_libdir}/jocaml/threads/*.cma


%files docs
%defattr(-,root,root,-)
%doc refman.pdf htmlman


%changelog
* Tue Feb 24 2009 Michel Salim <salimma@fedoraproject.org> - 3.11.0-2
- Re-add caml* files, needed to pass test suite

* Mon Feb 23 2009 Michel Salim <salimma@fedoraproject.org> - 3.11.0-1
- Initial pacakge