[Pkg-ocaml-maint-commits] r3139 - in
/trunk/packages/ocsigen/trunk/debian: control dirs.in ocsigen.1
ocsigen.manpages ocsigen.postinst rules
smimram at users.alioth.debian.org
smimram at users.alioth.debian.org
Thu Sep 14 22:03:21 UTC 2006
Author: smimram
Date: Thu Sep 14 22:03:21 2006
New Revision: 3139
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=3139
Log:
Improved package.
Added:
trunk/packages/ocsigen/trunk/debian/ocsigen.1
trunk/packages/ocsigen/trunk/debian/ocsigen.manpages
trunk/packages/ocsigen/trunk/debian/ocsigen.postinst
Modified:
trunk/packages/ocsigen/trunk/debian/control
trunk/packages/ocsigen/trunk/debian/dirs.in
trunk/packages/ocsigen/trunk/debian/rules
Modified: trunk/packages/ocsigen/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/control?rev=3139&op=diff
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/control (original)
+++ trunk/packages/ocsigen/trunk/debian/control Thu Sep 14 22:03:21 2006
@@ -8,7 +8,7 @@
Package: ocsigen
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}
+Depends: adduser, ${shlibs:Depends}, ocaml-nox
Description: web programming framework in OCaml
Ocsigen is a programming framework providing a new way to create
dynamic web sites. With Ocsigen, you program in a concise and modular
Modified: trunk/packages/ocsigen/trunk/debian/dirs.in
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/dirs.in?rev=3139&op=diff
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/dirs.in (original)
+++ trunk/packages/ocsigen/trunk/debian/dirs.in Thu Sep 14 22:03:21 2006
@@ -1,1 +1,6 @@
+etc/ocsigen
usr/lib/ocaml/@OCamlABI@/ocsigen
+usr/share/doc/ocsigen
+usr/share/ocsigen
+var/log/ocsigen
+var/www/ocsigen
Added: trunk/packages/ocsigen/trunk/debian/ocsigen.1
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/ocsigen.1?rev=3139&op=file
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/ocsigen.1 (added)
+++ trunk/packages/ocsigen/trunk/debian/ocsigen.1 Thu Sep 14 22:03:21 2006
@@ -1,0 +1,57 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH OCSIGEN 1 2006-09-14
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+OCSIGEN \- program to do something
+.SH SYNOPSIS
+.B xmoto
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B xmoto
+and
+.B bar
+commands.
+.PP
+.B xmoto
+is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+xmoto was written by Vincent Balat <vincent.balat at pps.jussieu.fr>.
+.PP
+This manual page was written by Samuel Mimram <smimram at debian.org>,
+for the Debian project (but may be used by others).
Added: trunk/packages/ocsigen/trunk/debian/ocsigen.manpages
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/ocsigen.manpages?rev=3139&op=file
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/ocsigen.manpages (added)
+++ trunk/packages/ocsigen/trunk/debian/ocsigen.manpages Thu Sep 14 22:03:21 2006
@@ -1,0 +1,1 @@
+debian/ocsigen.1
Added: trunk/packages/ocsigen/trunk/debian/ocsigen.postinst
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/ocsigen.postinst?rev=3139&op=file
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/ocsigen.postinst (added)
+++ trunk/packages/ocsigen/trunk/debian/ocsigen.postinst Thu Sep 14 22:03:21 2006
@@ -1,0 +1,65 @@
+#!/bin/sh -e
+
+if ! ([ "$1" = "configure" ] || [ "$1" = "reconfigure" ]); then
+ exit 0
+fi
+
+# Some useful variables
+OCSIGEN="ocsigen"
+CHOWN="/bin/chown"
+CHMOD="/bin/chmod"
+ADDUSER="/usr/sbin/adduser"
+USERDEL="/usr/sbin/userdel"
+USERADD="/usr/sbin/useradd"
+GROUPDEL="/usr/sbin/groupdel"
+GROUPMOD="/usr/sbin/groupmod"
+ID="/usr/bin/id"
+
+###
+# 1. Get current uid and gid if user exists.
+set -e
+if $ID $OCSIGEN > /dev/null 2>&1; then
+ IUID=`$ID --user $OCSIGEN`
+ IGID=`$ID --group $OCSIGEN`
+else
+ IUID="NONE"
+ IGID="NONE"
+fi
+
+###
+# 2. Ensure that no standard account or group will remain before adding the
+# new user.
+if [ "$IUID" = "NONE" ] || [ $IUID -ge 1000 ]; then # we must do sth :)
+ if ! [ "$IUID" = "NONE" ] && [ $IUID -ge 1000 ]; then
+ # user exists but isn't a system user... delete it.
+ $USERDEL $OCSIGEN
+ $GROUPDEL $OCSIGEN
+ fi
+
+###
+# 3. Add the system account.
+# Issue a warning if it fails.
+ if $GROUPMOD $OCSIGEN > /dev/null 2>&1; then
+ # group already exists, use --ingroup
+ if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/ocsigen --no-create-home --ingroup $OCSIGEN $OCSIGEN; then
+ echo "The adduser command failed."
+ fi
+ else
+ if ! $ADDUSER --system --disabled-password --disabled-login --home /usr/share/ocsigen --no-create-home --group $OCSIGEN; then
+ echo "The adduser command failed."
+ fi
+ fi
+fi
+set +e
+
+###
+# 4. Change ownership of directory.
+$CHOWN -R $OCSIGEN:$OCSIGEN /usr/share/ocsigen/
+$CHOWN -R $OCSIGEN:$OCSIGEN /var/log/ocsigen/
+#$CHOWN -R $OCSIGEN:$OCSIGEN /var/run/ocsigen/
+$CHOWN -R $OCSIGEN:$OCSIGEN /var/www/ocsigen/
+
+###
+# 5. Call default debhelper scripts.
+
+#DEBHELPER#
Modified: trunk/packages/ocsigen/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/ocsigen/trunk/debian/rules?rev=3139&op=diff
==============================================================================
--- trunk/packages/ocsigen/trunk/debian/rules (original)
+++ trunk/packages/ocsigen/trunk/debian/rules Thu Sep 14 22:03:21 2006
@@ -24,6 +24,7 @@
-$(MAKE) depend all OCSIMORE=YES BINDIR=/usr/bin
$(MAKE) all OCSIMORE=YES BINDIR=/usr/bin
+ $(MAKE) doc OCSIMORE=YES
touch $@
@@ -43,6 +44,14 @@
dh_installdirs
$(MAKE) install BINDIR=$(DESTDIR)/usr/bin MODULEINSTALLDIR=$(DESTDIR)/$(shell ocamlc -where)
+ cp -r doc $(DESTDIR)/usr/share/doc/ocsigen/html
+ cat files/ocsigen.conf \
+ | sed s%_LOGDIR_%/var/log/ocsigen%g \
+ | sed s%_STATICPAGESDIR_%/var/www/ocsigen%g \
+ | sed s%_OCSIGENUSER_%ocsigen%g \
+ | sed s%_OCSIGENGROUP_%ocsigen%g \
+ | sed s%_MODULEINSTALLDIR_%$(shell ocamlc -where)/ocsigen%g \
+ > $(DESTDIR)/etc/ocsigen/ocsigen.conf
binary-indep: build install
@@ -57,7 +66,7 @@
# dh_installinit
dh_installman
dh_link
- dh_strip
+ dh_strip -Xocsigen
dh_compress
dh_fixperms
dh_installdeb
More information about the Pkg-ocaml-maint-commits
mailing list