]>
Commit | Line | Data |
---|---|---|
733d7bd9 ER |
1 | # TODO |
2 | # - fix build for apache 2.2 | |
2d95601a | 3 | %define mod_name mod_caml |
4 | %define apxs /usr/sbin/apxs | |
955c4a42 | 5 | Summary: Apache mod_caml module - allows using bytecode compiled ocaml files with apache |
3cf6b38c | 6 | Summary(pl.UTF-8): Moduł Apache'a mod_caml - zapewniający obsługę skompilowanego do bajtkodu ocamla |
2d95601a | 7 | Name: apache-%{mod_name} |
8 | Version: 1.3.4 | |
2700ea95 | 9 | Release: 2 |
2d95601a | 10 | License: BSD-like |
dde9a87f | 11 | Group: Networking/Daemons/HTTP |
2d95601a | 12 | Source0: http://savannah.nongnu.org/download/modcaml/%{mod_name}-%{version}.tar.gz |
3856d08a | 13 | # Source0-md5: b21b6a1fee031490a925895b88b3a92f |
b07a3b2d | 14 | Patch0: %{mod_name}-Makefile.diff |
955c4a42 | 15 | URL: http://merjis.com/developers/mod_caml/ |
8ec8dc8e | 16 | BuildRequires: %{apxs} |
733d7bd9 | 17 | BuildRequires: apache-devel >= 2.0 |
2d95601a | 18 | BuildRequires: apr-devel |
19 | BuildRequires: ocaml | |
20 | BuildRequires: ocaml-findlib | |
21 | BuildRequires: ocaml-pcre-devel | |
22 | BuildRequires: ocaml-postgres | |
7a75e80d | 23 | BuildRequires: rpmbuild(macros) >= 1.268 |
733d7bd9 | 24 | Requires: apache(modules-api) = %apache_modules_api |
2d95601a | 25 | Requires: ocaml >= 3.0.8 |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
733d7bd9 | 28 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
58cd90b9 | 29 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
2d95601a | 30 | |
cd43b543 ER |
31 | # I don't understand it but it is neccessary if one strips |
32 | # it, it won't work. Help welcome. | |
b07a3b2d | 33 | %define _noautostrip .*\/mod_caml.so |
2d95601a | 34 | |
35 | %description | |
955c4a42 JB |
36 | mod_caml is a set of Objective CAML (OCaml) bindings for the Apache |
37 | API. It allows you to run CGI scripts written in OCaml directly inside | |
38 | the Apache webserver. However, it is much much more than just that: | |
2700ea95 | 39 | - Bind to any part of the Apache request cycle. |
40 | - Read and modify internal Apache structures. | |
41 | - Share modules of code between handlers and scripts. | |
42 | - CGI library and templating system (allows separation of code and | |
955c4a42 | 43 | presentation). |
2700ea95 | 44 | - Works with Apache 1.3 and Apache 2.0. |
45 | - DBI library for simple database access. | |
733d7bd9 ER |
46 | - DBI library can use Perl DBDs (database drivers) [requires Perl4Caml |
47 | >= 0.3.6]. | |
955c4a42 | 48 | |
b39db0c0 JR |
49 | %description -l pl.UTF-8 |
50 | mod_caml to zbiór dowiązań Objective CAML-a (OCamla) dla API Apache'a. | |
51 | Umożliwia uruchamianie skryptów CGI napisanych w OCamlu bezpośrednio | |
52 | wewnątrz serwera WWW Apache. Umożliwia jednak znacznie więcej: | |
53 | - dowiązanie do dowolnej części cyklu przetwarzania żądania, | |
54 | - odczyt i modyfikowanie wewnętrznych struktur Apache'a, | |
55 | - współdzielenie modułów kodu między procedurami obsługi a skryptami, | |
56 | - udostępnia bibliotekę CGI i system szablonów (umożlwiających | |
955c4a42 | 57 | oddzielenie kodu i prezentacji), |
b39db0c0 JR |
58 | - działa z Apache 1.3 i Apache 2.0, |
59 | - udostępnia bibliotekę DBI do prostego dostępu do baz danych, | |
60 | - udostępnia bibliotekę DBI wykorzystującą sterowniki DBD Perla | |
955c4a42 | 61 | (wymaga pakietu Perl4Caml >= 0.3.6). |
2d95601a | 62 | |
63 | %prep | |
64 | %setup -q -n %{mod_name}-%{version} | |
65 | %patch0 -p1 | |
66 | ||
67 | %build | |
68 | %{__make} | |
69 | ||
70 | %install | |
71 | rm -rf $RPM_BUILD_ROOT | |
955c4a42 JB |
72 | %{__make} install \ |
73 | DESTDIR=$RPM_BUILD_ROOT | |
2d95601a | 74 | |
75 | %clean | |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | ||
78 | %post | |
7a75e80d | 79 | %service -q httpd restart |
2d95601a | 80 | |
6d3afe50 | 81 | %postun |
2d95601a | 82 | if [ "$1" = "0" ]; then |
7a75e80d | 83 | %service -q httpd restart |
2d95601a | 84 | fi |
85 | ||
86 | %files | |
87 | %defattr(644,root,root,755) | |
88 | %doc COPYING.LIB CHANGES README examples html icons modcaml-example.conf | |
58cd90b9 | 89 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
2d95601a | 90 | %attr(755,root,root) %{_pkglibdir}/*.so |
91 | %{_libdir}/ocaml | |
955c4a42 | 92 | %{_datadir}/%{mod_name} |