1 %define mod_name mod_caml
2 %define apxs /usr/sbin/apxs
3 Summary: Apache mod_caml module - allows using bytcode compiled ocaml files with apache
4 Summary(pl): Modu³ Apache'a mod_caml - zapewniaj±cy obs³ugê skompilowanego do bytekodu ocamla
5 Name: apache-%{mod_name}
8 Group: Networking/Daemons
10 Source0: http://savannah.nongnu.org/download/modcaml/%{mod_name}-%{version}.tar.gz
11 #Source-md5: b21b6a1fee031490a925895b88b3a92f
12 Patch0: %{mod_name}-Makefile.diff
13 URL: ttp://merjis.com/developers/mod_caml/
14 BuildRequires: apache-devel >= 1.3.3
15 BuildRequires: %{apxs}
16 BuildRequires: apr-devel
18 BuildRequires: ocaml-findlib
19 BuildRequires: ocaml-pcre-devel
20 BuildRequires: ocaml-postgres
21 Requires(post,preun): %{apxs}
22 Requires: apache >= 1.3.3
23 Requires: ocaml >= 3.0.8
24 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 %define _sysconfdir %(%{apxs} -q SYSCONFDIR)
27 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
29 # I don't understand it but it is neccessary if one strips
30 # it, it won't work. Help welcome.
31 %define _noautostrip .*\/mod_caml.so
35 mod_caml is a set of Objective CAML (OCaml) bindings for the Apache API.
36 It allows you to run CGI scripts written in OCaml directly inside the Apache webserver.
37 However, it is much much more than just that:
38 * Bind to any part of the Apache request cycle.
39 * Read and modify internal Apache structures.
40 * Share modules of code between handlers and scripts.
41 * CGI library and templating system (allows separation of code and presentation).
42 * Works with Apache 1.3 and Apache 2.0 [see note below].
43 * DBI library for simple database access.
44 * DBI library can use Perl DBDs (database drivers) [requires Perl4Caml >= 0.3.6].
47 %setup -q -n %{mod_name}-%{version}
54 rm -rf $RPM_BUILD_ROOT
55 %{__make} DESTDIR=$RPM_BUILD_ROOT install
59 rm -rf $RPM_BUILD_ROOT
62 if [ -f /var/lock/subsys/httpd ]; then
63 /etc/rc.d/init.d/httpd restart 1>&2
67 if [ "$1" = "0" ]; then
68 if [ -f /var/lock/subsys/httpd ]; then
69 /etc/rc.d/init.d/httpd restart 1>&2
74 %defattr(644,root,root,755)
75 %doc COPYING.LIB CHANGES README examples html icons modcaml-example.conf
76 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*.conf
77 %attr(755,root,root) %{_pkglibdir}/*.so
79 %{_datadir}/%{mod_name}/