The following commit has been merged in the master branch:
commit fcdd244eed47ceda66756906cd7519c111a5fbac
Author: Stephane Glondu <st...@glondu.net>
Date:   Sun Jan 15 16:57:32 2012 +0100

    Rewrite debian/rules

diff --git a/debian/rules b/debian/rules
index dbfed63..08e12ee 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,90 +7,48 @@
 include /usr/share/ocaml/ocamlvars.mk
 
 DESTDIR := $(CURDIR)/debian/tmp
-export OCAMLOBJINFO := ocamlduceobjinfo
 
 ifeq ($(OCAML_NATDYNLINK),yes)
-  OPT_CONFFLAGS := --enable-nativecode
+  OPT_CONFFLAGS := --enable-natdynlink
 else
-  OPT_CONFFLAGS := --disable-nativecode
+  OPT_CONFFLAGS := --disable-natdynlink
 endif
 
-INSTALL_TARGET := $(if $(findstring libocsigen-ocaml-doc,$(shell 
dh_listpackages)),install,installnodoc)
+BUILD_DOC := $(if $(findstring ocsigenserver-doc,$(shell 
dh_listpackages)),yes,no)
 
 %:
        dh $@ --with ocaml
 
-
 .PHONY: override_dh_auto_configure
 override_dh_auto_configure:
-       chmod +x configure
-       ./configure \
+       mkdir -p local/etc
+       sh configure \
            --temproot $(DESTDIR) \
            --prefix /usr \
            --bindir /usr/bin \
            --libdir $(OCAML_STDLIB_DIR) \
            --mandir /usr/share/man/man1 \
-           --docdir /usr/share/doc \
-           --staticpagesdir /usr/share \
+           --docdir /usr/share/doc/ocsigenserver/api-html \
+           --staticpagesdir /usr/share/ocsigenserver \
            --ocsigen-user ocsigen \
            --ocsigen-group ocsigen \
-           --stubdir $(OCAML_DLL_DIR) \
-           $(OPT_CONFFLAGS) \
-           --enable-ocamlduce
-       cp -a examples debian
-# Remove irrelevant files (incl. those installed in /usr/share or /var/lib)
-       mv debian/examples/miniwiki/files/miniwiki.conf debian/examples/miniwiki
-       rm -Rf \
-         debian/examples/miniwiki/wikidata \
-         debian/examples/miniwiki/files \
-         debian/examples/Makefile
+           $(OPT_CONFFLAGS)
 
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+       $(MAKE)
+ifeq ($(BUILD_DOC),yes)
+       $(MAKE) doc
+endif
 
 .PHONY: override_dh_auto_install
 override_dh_auto_install:
-       $(MAKE) $(INSTALL_TARGET) CHOWN=true 
STD_METAS_DIR=$(OCAML_STDLIB_DIR)/METAS
-
-# For each installed .cmi file, install the corresponding .mli file next to it
-       find $(DESTDIR) -name '*.cmi' -printf '%h %f\n' | \
-         while read d f; do \
-           find . -name $${f%.cmi}.mli -exec cp '{}' $$d ';' -quit; \
-         done
-
-       find $(DESTDIR) -name '*.cmi' -exec touch '{}' ';'
-
+       $(MAKE) install CHOWN=/bin/true OCSIGENUSER=root OCSIGENGROUP=root
        $(MAKE) logrotate
-       rm -f $(DESTDIR)/var/run/ocsigen_command
-       rm -f $(DESTDIR)/usr/share/ocsigen/ocsigenstuff/LICENSE
-
-
-.PHONY: override_dh_auto_build
-override_dh_auto_build:
-# This directory, present in .orig.tar.gz, is created here because
-# git doesn't handle empty directories
-       mkdir -p doc
-       $(MAKE) depend
-       $(MAKE) all
-
-
-.PHONY: override_dh_auto_clean
-override_dh_auto_clean:
-       [ ! -f Makefile.config ] || $(MAKE) distclean
-       rm -Rf debian/examples xmlp4/newocaml/pp
-       mkdir xmlp4/newocaml/pp
-
-
-.PHONY: override_dh_auto_clean
-override_dh_compress:
-       dh_compress -X.ml
-
+ifeq ($(BUILD_DOC),yes)
+       $(MAKE) install.doc
+endif
 
 .PHONY: override_dh_install
 override_dh_install:
-       dh_install --list-missing
-
-
-.PHONY: override_dh_ocaml
-override_dh_ocaml:
-       dh_ocaml \
-         --nodefined-map=libocsigen-ocaml-dev:Xmllexer \
-         --nodefined-map=libocsigen-xhtml-ocaml-dev:Xmllexer
+       dh_install --fail-missing -X.sample

-- 
ocsigenserver packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to