[Pkg-ocaml-maint-commits] [SCM] nurpawiki packaging branch, master, updated. debian/1.2.2-3-2-g5b0572c

Stephane Glondu steph at glondu.net
Sun Jun 21 00:00:52 UTC 2009


The following commit has been merged in the master branch:
commit 54745b0c583c59dd9a0fe371bc4b619505d4ad1d
Author: Stephane Glondu <steph at glondu.net>
Date:   Sun Jun 21 01:54:14 2009 +0200

    Build native plugin and simplify debian/rules
    
     * patch upstream to build native plugin and mention it in META
     * add dependency to quilt
     * add README.source
     * use debhelper overrides

diff --git a/debian/README.source b/debian/README.source
new file mode 100644
index 0000000..47f9924
--- /dev/null
+++ b/debian/README.source
@@ -0,0 +1,16 @@
+Nurpawiki Debian source package
+===============================
+
+Patching upstream sources
+-------------------------
+
+This source package uses quilt to apply and remove its patches. Please
+refer to `/usr/share/doc/quilt/README.source' for information about
+how to use quilt for source packages.
+
+The quilt series is generated from the Git repository, using
+dom-{apply,save}-patches, from the dh-ocaml (>= 0.4.2) package. Please
+refer to the appendix about Git in the Debian OCaml Packaging Policy
+(from the same package).
+
+ -- Stephane Glondu <steph at glondu.net>, Sun, 21 Jun 2009 01:50:10 +0200
diff --git a/debian/changelog b/debian/changelog
index 5f10da8..afd1172 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+nurpawiki (1.2.2-4) UNRELEASED; urgency=low
+
+  * Patch upstream to build and install native plugin
+  * Add dependency to quilt and README.source
+
+ -- Stephane Glondu <steph at glondu.net>  Sun, 21 Jun 2009 01:55:18 +0200
+
 nurpawiki (1.2.2-3) unstable; urgency=low
 
   * Add debian/gbp.conf to force use of pristine-tar
diff --git a/debian/control b/debian/control
index 1071ad3..4a3c10a 100644
--- a/debian/control
+++ b/debian/control
@@ -4,12 +4,14 @@ Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Stephane Glondu <steph at glondu.net>
 DM-Upload-Allowed: yes
 Build-Depends:
- debhelper (>= 7),
+ debhelper (>= 7.0.52),
+ quilt (>= 0.46-7),
+ dh-ocaml,
  ocsigen-dev (>= 1.1.0),
  libcalendar-ocaml-dev,
  libextlib-ocaml-dev,
  libpostgresql-ocaml-dev,
- ocaml-nox
+ ocaml-nox (>= 3.11)
 Standards-Version: 3.8.1
 Section: web
 Homepage: http://code.google.com/p/nurpawiki/
diff --git a/debian/nurpawiki.install b/debian/nurpawiki.install
deleted file mode 100644
index b41a16e..0000000
--- a/debian/nurpawiki.install
+++ /dev/null
@@ -1 +0,0 @@
-files/* usr/share/ocsigen/nurpawiki/
diff --git a/debian/nurpawiki.install.in b/debian/nurpawiki.install.in
new file mode 100644
index 0000000..565ef66
--- /dev/null
+++ b/debian/nurpawiki.install.in
@@ -0,0 +1,2 @@
+files/* usr/share/ocsigen/nurpawiki/
+OPT: nurpawiki.cmxs usr/lib/ocsigen/nurpawiki
diff --git a/debian/patches/0001-Build-native-plugin.patch b/debian/patches/0001-Build-native-plugin.patch
new file mode 100644
index 0000000..2c5f253
--- /dev/null
+++ b/debian/patches/0001-Build-native-plugin.patch
@@ -0,0 +1,58 @@
+From: Stephane Glondu <steph at glondu.net>
+Date: Sun, 21 Jun 2009 01:44:42 +0200
+Subject: [PATCH] Build native plugin
+
+---
+ META.in  |    3 ++-
+ Makefile |    9 +++++++--
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/META.in b/META.in
+index b66410c..7fcc3c7 100644
+--- a/META.in
++++ b/META.in
+@@ -1,3 +1,4 @@
+ requires = "unix,extlib,postgresql,calendar,pcre,str"
+ version = "%_NURPAWIKI_VERSION_%"
+-archive(byte) = "nurpawiki.cma"
++archive(plugin,byte) = "nurpawiki.cma"
++archive(plugin,native) = "nurpawiki.cmxs"
+diff --git a/Makefile b/Makefile
+index 03383c2..3f3ec6b 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,14 +8,20 @@ CAMLDEP = ocamlfind ocamldep
+ LIB = -package threads,netstring,calendar,extlib,postgresql,ocsigen
+ 
+ OBJS = $(FILES:.ml=.cmo)
++OBJX = $(FILES:.ml=.cmx)
+ 
+ CMA = nurpawiki.cma
++CMX = nurpawiki.cmx
+ 
+ all: $(CMA) META
+ 
+ $(CMA): $(OBJS)
+ 	$(CAMLC) -a -o $(CMA) $(OBJS)
+ 
++$(CMX)s $(CMX)a: $(OBJX)
++	$(CAMLOPT) -a -o $(CMX)a $(OBJX)
++	$(CAMLOPT) -shared -linkall -o $(CMX)s $(CMX)a
++
+ .SUFFIXES:
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
+ 
+@@ -43,11 +49,10 @@ doc:
+ #	$(CAMLDOC) -d doc -html db.mli
+ 
+ clean:
+-	-rm -f *.cm[ioxa] *~ $(NAME)
++	-rm -f *.cm[ioxa] *~ *.[oa] *.cmx[as] $(NAME)
+ 
+ install:
+ 	ocamlfind install nurpawiki META $(CMA)
+ 
+ depend:
+ 	$(CAMLDEP) $(PP) $(LIB) $(FILES:.ml=.mli) $(FILES) > .depend
+-
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..5b802e3
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Build-native-plugin.patch
diff --git a/debian/rules b/debian/rules
index 2d6a840..42d9a65 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,38 +1,38 @@
 #!/usr/bin/make -f
-# debian/rules for nurpawiki
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+# -*- makefile -*-
+include /usr/share/ocaml/ocamlinit.mk
 
 # For ocamlfind
-export OCAMLFIND_DESTDIR = debian/nurpawiki/usr/lib/ocsigen
+export OCAMLFIND_DESTDIR := debian/nurpawiki/usr/lib/ocsigen
+
+%:
+	dh --with quilt $@
 
-build: build-stamp
-build-stamp:
-	dh build
-	touch $@
+.PHONY: override_dh_auto_build
+override_dh_auto_build: ocamlinit
+	make
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+	make nurpawiki.cmxs
+endif
 
-install: install-stamp
-install-stamp: build-stamp
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
 	install -d $(OCAMLFIND_DESTDIR)
-	dh install
+	make install
+
+.PHONY: override_dh_install
+override_dh_install:
+	dh_install
 # Fix ugly permissions
 	chmod 644 debian/nurpawiki/usr/share/ocsigen/nurpawiki/*.png
 # Small hack to prevent a runtime dependency on libpcre-ocaml which is
 # statically linked in ocsigen
 	sed -i 's/,pcre//' $(OCAMLFIND_DESTDIR)/nurpawiki/META
-	touch $@
-
-clean:
-	dh $@
-
-binary-indep: install-stamp
-	@echo No binary-indep packages
-
-binary-arch: install-stamp
-	echo 'F:OCamlABI=$(shell ocamlc -version)' >> debian/nurpawiki.substvars
-	dh $@
 
-binary: binary-indep binary-arch
+.PHONY: override_dh_gencontrol
+override_dh_gencontrol:
+	dh_gencontrol -- -VF:OCamlABI="$(OCAML_ABI)"
 
-.PHONY: build clean binary-indep binary-arch binary install tg-export
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean: ocamlinit-clean
+	make clean

-- 
nurpawiki packaging



More information about the Pkg-ocaml-maint-commits mailing list