%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0) %define debug_package %{nil} # Prevent RPM from stripping binaries. %define __strip /bin/true Name: ocsigen Version: 1.1.0 Release: 8%{?dist} Summary: Web programming framework Group: Development/Libraries License: LGPLv2+ with exceptions URL: http://ocsigen.org/ Source0: http://ocsigen.org/download/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) # No cduce on ppc64, so: ExcludeArch: ppc64 BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-findlib-devel BuildRequires: ocaml-ocamldoc BuildRequires: ocaml-lwt-devel >= 1.1.0 BuildRequires: ocaml-cryptokit-devel >= 1.3-5 BuildRequires: ocaml-sqlite-devel BuildRequires: ocaml-zip-devel BuildRequires: ocaml-ssl-devel BuildRequires: ocaml-camlp4-devel BuildRequires: ocaml-ocamlnet-devel BuildRequires: ocaml-pcre-devel BuildRequires: cduce-devel # For libcrypto: BuildRequires: openssl-devel %define _use_internal_dependency_generator 0 %define __find_requires /usr/lib/rpm/ocaml-find-requires.sh -i Ocsidbmtypes %define __find_provides /usr/lib/rpm/ocaml-find-provides.sh -i Cryptokit %description Ocsigen is a research project aimed at developing new programming techniques for the Web. Its goal is to offer an alternative to Apache/PHP, based on cutting-edge technologies from research in programming languages. It contains a full featured Web server and a programming framework, called Eliom, that provides a new way to create dynamic Web sites. With Eliom, you program in a concise and modular way, with a strong type system which helps you to produce valid XHTML. Eliom handles sessions, URLs, and page parameters automatically. The main features are: - Extensible Web server, implemented with cooperative threads - Extensions for serving static pages, CGI pages, for HTTP redirections, data compression, reverse proxy, access control, etc. - Eliom Web programming framework: - Continuation-based Web programming - Static checking of XHTML (using OCaml or OCamlDuce) - Automatic management of sessions - Concise and modular programming %package devel Summary: Development files for %{name} Group: Development/Libraries Requires: %{name} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and signature files for developing applications that use %{name}. %prep %setup -q mv README README.old iconv -f iso-8859-1 -t utf-8 < README.old > README %build # --enable-nativecode requires OCaml 3.11. ./configure --prefix %{_prefix} \ --disable-nativecode \ --ocsigen-user apache --ocsigen-group apache \ --examplesdir %{_libdir}/ocsigen/examples \ --extralibdir %{_libdir} make depend make # 'make install' rebuilds the documentation. If you do it # here then it gets rebuilt twice for some reason. #make doc %install rm -rf $RPM_BUILD_ROOT make install CHOWN=/bin/true TEMPROOT=$RPM_BUILD_ROOT make logrotate CHOWN=/bin/true TEMPROOT=$RPM_BUILD_ROOT # Install this using %doc instead. rm -rf $RPM_BUILD_ROOT/usr/share/doc/ocsigen chmod 0755 $RPM_BUILD_ROOT%{_localstatedir}/lib/ocsigen mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/ocsigen # Prevent prelink from stripping binaries. # http://fedoraproject.org/wiki/Packaging/OCaml#Stripping_binaries mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d echo -e '-b %{_bindir}/ocsigen\n-b %{_libdir}/ocsigen' \ > $RPM_BUILD_ROOT/etc/prelink.conf.d/ocsigen.conf %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %doc COPYING LICENSE %config(noreplace) /etc/logrotate.d/ocsigen %config %dir /etc/ocsigen/ %config(noreplace) /etc/ocsigen/ocsigen.conf %config(noreplace) /etc/ocsigen/mime.types %config(noreplace) /etc/ocsigen/ocsigen.conf.opt.sample %config(noreplace) /etc/ocsigen/ocsigen.conf.sample %{_bindir}/ocsigen %{_mandir}/man1/* %{_libdir}/ocsigen %{_localstatedir}/lib/ocsigen/ %{_localstatedir}/www/ocsigen/ %attr(0755,apache,apache) %{_localstatedir}/log/ocsigen/ %{_libdir}/ocaml/ocsigen %config(noreplace) /etc/prelink.conf.d/ocsigen.conf %files devel %defattr(-,root,root,-) %doc CHANGES CHANGES.darcs COPYING LICENSE README VERSION doc # Because there's no nativecode version yet, the -devel package # is essentially empty (except for some docs). %pre # Add the "apache" user /usr/sbin/useradd -c "Apache" -u 48 \ -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || : %changelog * Tue Jan 13 2009 Richard W.M. Jones - 1.1.0-8 - Add some missing BRs (thanks Wes Shull). - Make sure examples, extensions get installed in _libdir. - ExcludeArch ppc64. * Tue Sep 2 2008 Richard W.M. Jones - 1.1.0-5 - Prevent prelink from stripping binaries. - Cryptokit packaging bug is fixed, so we don't need the workaround patch for it any longer. - Better way to stop it calling chown during install. * Mon Sep 1 2008 Richard W.M. Jones - 1.1.0-3 - Initial RPM release.