1 %define mod_name mod_caml
2 %define apxs /usr/sbin/apxs
3 Summary: Apache mod_caml module - allows using bytecode compiled ocaml files with apache
4 Summary(pl): Modu³ Apache'a mod_caml - zapewniaj±cy obs³ugê skompilowanego do bajtkodu 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: http://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
34 mod_caml is a set of Objective CAML (OCaml) bindings for the Apache
35 API. It allows you to run CGI scripts written in OCaml directly inside
36 the Apache webserver. However, it is much much more than just that:
37 * Bind to any part of the Apache request cycle.
38 * Read and modify internal Apache structures.
39 * Share modules of code between handlers and scripts.
40 * CGI library and templating system (allows separation of code and
42 * Works with Apache 1.3 and Apache 2.0.
43 * DBI library for simple database access.
44 * DBI library can use Perl DBDs (database drivers)
45 [requires Perl4Caml >= 0.3.6].
48 mod_caml to zbiór dowi±zañ Objective CAML-a (OCamla) dla API Apache'a.
49 Umo¿liwia uruchamianie skryptów CGI napisanych w OCamlu bezpo¶rednio
50 wewn±trz serwera WWW Apache. Umo¿liwia jednak znacznie wiêcej:
51 - dowi±zanie do dowolnej czê¶ci cyklu przetwarzania ¿±dania,
52 - odczyt i modyfikowanie wewnêtrznych struktur Apache'a,
53 - wspó³dzielenie modu³ów kodu miêdzy procedurami obs³ugi a skryptami,
54 - udostêpnia bibliotekê CGI i system szablonów (umo¿lwiaj±cych
55 oddzielenie kodu i prezentacji),
56 - dzia³a z Apache 1.3 i Apache 2.0,
57 - udostêpnia bibliotekê DBI do prostego dostêpu do baz danych,
58 - udostêpnia bibliotekê DBI wykorzystuj±c± sterowniki DBD Perla
59 (wymaga pakietu Perl4Caml >= 0.3.6).
62 %setup -q -n %{mod_name}-%{version}
69 rm -rf $RPM_BUILD_ROOT
72 DESTDIR=$RPM_BUILD_ROOT
75 rm -rf $RPM_BUILD_ROOT
78 if [ -f /var/lock/subsys/httpd ]; then
79 /etc/rc.d/init.d/httpd restart 1>&2
83 if [ "$1" = "0" ]; then
84 if [ -f /var/lock/subsys/httpd ]; then
85 /etc/rc.d/init.d/httpd restart 1>&2
90 %defattr(644,root,root,755)
91 %doc COPYING.LIB CHANGES README examples html icons modcaml-example.conf
92 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*.conf
93 %attr(755,root,root) %{_pkglibdir}/*.so
95 %{_datadir}/%{mod_name}