]> git.pld-linux.org Git - packages/apache-mod_caml.git/blobdiff - apache-mod_caml.spec
- use %service
[packages/apache-mod_caml.git] / apache-mod_caml.spec
index a4bbf62ddec5c9fa13cc6a6c793ca459012dcd7f..d12c348cf94c5ab2c70e6c1a2ca4cd3a09c147e5 100644 (file)
@@ -1,48 +1,50 @@
+# TODO
+# - fix build for apache 2.2
 %define                mod_name        mod_caml
 %define        apxs            /usr/sbin/apxs
 Summary:       Apache mod_caml module - allows using bytecode compiled ocaml files with apache
 Summary(pl):   Modu³ Apache'a mod_caml - zapewniaj±cy obs³ugê skompilowanego do bajtkodu ocamla
 Name:          apache-%{mod_name}
 Version:       1.3.4
-Release:       1
-Group:         Networking/Daemons
+Release:       2
 License:       BSD-like
+Group:         Networking/Daemons
 Source0:       http://savannah.nongnu.org/download/modcaml/%{mod_name}-%{version}.tar.gz
 # Source-md5:  b21b6a1fee031490a925895b88b3a92f
 Patch0:                %{mod_name}-Makefile.diff
 URL:           http://merjis.com/developers/mod_caml/
-BuildRequires: apache-devel >= 1.3.3
 BuildRequires: %{apxs}
+BuildRequires: apache-devel >= 2.0
 BuildRequires: apr-devel
 BuildRequires: ocaml
 BuildRequires: ocaml-findlib
 BuildRequires: ocaml-pcre-devel
 BuildRequires: ocaml-postgres
-Requires(post,preun):  %{apxs}
-Requires:      apache >= 1.3.3
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires:      apache(modules-api) = %apache_modules_api
 Requires:      ocaml >= 3.0.8
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR)
-%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR)
+%define                _pkglibdir      %(%{apxs} -q LIBEXECDIR 2>/dev/null)
+%define                _sysconfdir     %(%{apxs} -q SYSCONFDIR 2>/dev/null)
 
-# I don't understand it but it is neccessary if one strips 
-# it, it won't work. Help welcome. 
+# I don't understand it but it is neccessary if one strips
+# it, it won't work. Help welcome.
 %define                _noautostrip    .*\/mod_caml.so
 
 %description
 mod_caml is a set of Objective CAML (OCaml) bindings for the Apache
 API. It allows you to run CGI scripts written in OCaml directly inside
 the Apache webserver. However, it is much much more than just that:
* Bind to any part of the Apache request cycle.
* Read and modify internal Apache structures.
* Share modules of code between handlers and scripts.
* CGI library and templating system (allows separation of code and
- Bind to any part of the Apache request cycle.
- Read and modify internal Apache structures.
- Share modules of code between handlers and scripts.
- CGI library and templating system (allows separation of code and
    presentation).
* Works with Apache 1.3 and Apache 2.0.
* DBI library for simple database access.
- * DBI library can use Perl DBDs (database drivers)
-   [requires Perl4Caml >= 0.3.6].
- Works with Apache 1.3 and Apache 2.0.
- DBI library for simple database access.
+ - DBI library can use Perl DBDs (database drivers) [requires Perl4Caml
+   >= 0.3.6].
 
 %description -l pl
 mod_caml to zbiór dowi±zañ Objective CAML-a (OCamla) dla API Apache'a.
@@ -75,21 +77,17 @@ rm -rf $RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT
 
 %post
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
-fi
+%service -q httpd restart
 
 %preun
 if [ "$1" = "0" ]; then
-       if [ -f /var/lock/subsys/httpd ]; then
-               /etc/rc.d/init.d/httpd restart 1>&2
-       fi
+       %service -q httpd restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc COPYING.LIB CHANGES README examples html icons modcaml-example.conf
-%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/httpd.conf/*.conf
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/*_mod_%{mod_name}.conf
 %attr(755,root,root) %{_pkglibdir}/*.so
 %{_libdir}/ocaml
 %{_datadir}/%{mod_name}
This page took 0.102863 seconds and 4 git commands to generate.