]> git.pld-linux.org Git - packages/apache-mod_caml.git/blob - apache-mod_caml.spec
342f96e21d196216453640bde29f340d98441c7b
[packages/apache-mod_caml.git] / apache-mod_caml.spec
1 # TODO
2 # - fix build for apache 2.2
3 %define         mod_name        mod_caml
4 %define         apxs            /usr/sbin/apxs
5 Summary:        Apache mod_caml module - allows using bytecode compiled ocaml files with apache
6 Summary(pl.UTF-8):      Moduł Apache'a mod_caml - zapewniający obsługę skompilowanego do bajtkodu ocamla
7 Name:           apache-%{mod_name}
8 Version:        1.3.4
9 Release:        2
10 License:        BSD-like
11 Group:          Networking/Daemons
12 Source0:        http://savannah.nongnu.org/download/modcaml/%{mod_name}-%{version}.tar.gz
13 # Source0-md5:  b21b6a1fee031490a925895b88b3a92f
14 Patch0:         %{mod_name}-Makefile.diff
15 URL:            http://merjis.com/developers/mod_caml/
16 BuildRequires:  %{apxs}
17 BuildRequires:  apache-devel >= 2.0
18 BuildRequires:  apr-devel
19 BuildRequires:  ocaml
20 BuildRequires:  ocaml-findlib
21 BuildRequires:  ocaml-pcre-devel
22 BuildRequires:  ocaml-postgres
23 BuildRequires:  rpmbuild(macros) >= 1.268
24 Requires:       apache(modules-api) = %apache_modules_api
25 Requires:       ocaml >= 3.0.8
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %define         _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
29 %define         _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
30
31 # I don't understand it but it is neccessary if one strips
32 # it, it won't work. Help welcome.
33 %define         _noautostrip    .*\/mod_caml.so
34
35 %description
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:
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
43    presentation).
44  - Works with Apache 1.3 and Apache 2.0.
45  - DBI library for simple database access.
46  - DBI library can use Perl DBDs (database drivers) [requires Perl4Caml
47    >= 0.3.6].
48
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
57    oddzielenie kodu i prezentacji),
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
61    (wymaga pakietu Perl4Caml >= 0.3.6).
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
72
73 %{__make} install \
74         DESTDIR=$RPM_BUILD_ROOT
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %post
80 %service -q httpd restart
81
82 %postun
83 if [ "$1" = "0" ]; then
84         %service -q httpd restart
85 fi
86
87 %files
88 %defattr(644,root,root,755)
89 %doc COPYING.LIB CHANGES README examples html icons modcaml-example.conf
90 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
91 %attr(755,root,root) %{_pkglibdir}/*.so
92 %{_libdir}/ocaml
93 %{_datadir}/%{mod_name}
This page took 0.037336 seconds and 2 git commands to generate.