38fe5753c4
Ocsigen is a web programming framework for OCaml. It can be used as a web server, serving static pages, but it is also possible to implement entire web sites as OCaml modules. WWW: http://www.ocsigen.org/
111 lines
2.5 KiB
Text
111 lines
2.5 KiB
Text
$NetBSD: patch-aa,v 1.1.1.1 2007/04/10 20:24:43 tonio Exp $
|
|
|
|
--- configure.orig 2007-03-15 12:27:54.000000000 +0100
|
|
+++ configure
|
|
@@ -51,10 +51,14 @@ set_defaults () {
|
|
libdir="/usr/local/lib"
|
|
mandir="/usr/local/share/man/man1/"
|
|
docdir="/usr/share/doc"
|
|
+ sysconfdir="/etc"
|
|
+ logdir=/var/log/ocsigen
|
|
name="ocsigen"
|
|
prefix="/"
|
|
ocsigen_user="www-data"
|
|
ocsigen_group="www-data"
|
|
+ staticpagesdir="/var/www/$name"
|
|
+ uploaddir="/tmp"
|
|
}
|
|
|
|
set_defaults
|
|
@@ -132,6 +136,10 @@ print_options () {
|
|
echo " --libdir $libdir"
|
|
echo " --mandir $mandir"
|
|
echo " --docdir $docdir"
|
|
+ echo " --sysconfdir $sysconfdir"
|
|
+ echo " --logdir $logdir"
|
|
+ echo " --staticpagesdir $staticpagesdir"
|
|
+ echo " --uploaddir $uploaddir"
|
|
echo " --name $name"
|
|
}
|
|
|
|
@@ -174,6 +182,18 @@ _EOF_
|
|
--docdir dir
|
|
Install documentation in this directory
|
|
|
|
+--sysconfdir dir
|
|
+ Install system configuration files in this directory
|
|
+
|
|
+--logdir dir
|
|
+ Install log files in this directory
|
|
+
|
|
+--staticpagesdir dir
|
|
+ Serve static pages from this directory
|
|
+
|
|
+--uploaddir dir
|
|
+ Put uploaded files in this directory
|
|
+
|
|
--name name
|
|
The name of the server (and directory for the modules)
|
|
|
|
@@ -266,6 +286,26 @@ while [ "$#" -gt 0 ]; do
|
|
shift
|
|
shift
|
|
;;
|
|
+ --sysconfdir)
|
|
+ sysconfdir="$2"
|
|
+ shift
|
|
+ shift
|
|
+ ;;
|
|
+ --logdir)
|
|
+ logdir="$2"
|
|
+ shift
|
|
+ shift
|
|
+ ;;
|
|
+ --staticpagesdir)
|
|
+ staticpagesdir="$2"
|
|
+ shift
|
|
+ shift
|
|
+ ;;
|
|
+ --uploaddir)
|
|
+ uploaddir="$2"
|
|
+ shift
|
|
+ shift
|
|
+ ;;
|
|
--name)
|
|
name="$2"
|
|
shift
|
|
@@ -322,9 +362,10 @@ fi
|
|
######################################################################
|
|
# Check whether OCaml version is > 3.9
|
|
version=`ocamlc -version`
|
|
-ocamlversion=`n1=${version:0:1}; \
|
|
- n2=${version:2:2}; \
|
|
- n3=${version:5}; \
|
|
+ocamlversion=`n1=${version%%.[0-9][0-9].[0-9]}; \
|
|
+ tail=${version##[0-9].}; \
|
|
+ n2=${tail%%.[0-9]}; \
|
|
+ n3=${tail##[0-9][0-9].}; \
|
|
if [ $n1 = "3" ] && [ $n2 -le 9 ]; then \
|
|
echo "OLD"; \
|
|
else \
|
|
@@ -426,16 +467,16 @@ OCSIGENGROUP=$ocsigen_user
|
|
OCSIGENNAME=$name
|
|
|
|
# ocsigen's logs:
|
|
-LOGDIR = /var/log/\$(OCSIGENNAME)
|
|
+LOGDIR = $logdir
|
|
|
|
# Config files:
|
|
-CONFIGDIR = /etc/\$(OCSIGENNAME)
|
|
+CONFIGDIR = $sysconfdir
|
|
|
|
# Where to put static pages:
|
|
-STATICPAGESDIR = /var/www/\$(OCSIGENNAME)
|
|
+STATICPAGESDIR = $staticpagesdir
|
|
|
|
# Default directory for file upload:
|
|
-UPLOADDIR = /tmp
|
|
+UPLOADDIR = $uploaddir
|
|
|
|
# Where to put Ocsigen documentation:
|
|
DOCDIR = $docdir/\$(OCSIGENNAME)
|