[Pkg-ocaml-maint-commits] [SCM] ledit packaging branch, master, updated. debian/2.01-6-7-gf5aaab3

Stephane Glondu steph at glondu.net
Fri Nov 19 08:49:08 UTC 2010


The following commit has been merged in the master branch:
commit f5aaab3e4d0fb5d98fba752b56f24fa433ff59cd
Author: Stephane Glondu <steph at glondu.net>
Date:   Fri Nov 19 09:26:01 2010 +0100

    Rework the patches so that they are more generic
    
    The last two patches are merged because they are mutually dependent...

diff --git a/debian/patches/0001-Add-possibility-to-remove-custom.patch b/debian/patches/0001-Add-possibility-to-remove-custom.patch
new file mode 100644
index 0000000..fae0c94
--- /dev/null
+++ b/debian/patches/0001-Add-possibility-to-remove-custom.patch
@@ -0,0 +1,31 @@
+From: Stephane Glondu <steph at glondu.net>
+Date: Fri, 19 Nov 2010 08:56:40 +0100
+Subject: [PATCH] Add possibility to remove -custom
+
+...and to build in -custom mode (by overriding), in order to be
+arch-independent.
+
+Signed-off-by: Stephane Glondu <steph at glondu.net>
+---
+ Makefile |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index b305414..bf1be14 100644
+--- a/Makefile
++++ b/Makefile
+@@ -12,11 +12,12 @@ OTHER_XOBJS=unix.cmxa -I `camlp5 -where` gramlib.cmxa
+ TARGET=ledit.out
+ MKDIR=mkdir -p
+ EXT=ext/pa_def.cmo ext/pa_local.cmo
++CUSTOM=-custom
+ 
+ all: $(EXT) $(TARGET) ledit.1
+ 
+ $(TARGET): $(OBJS)
+-	$(OCAMLC) -custom $(OTHER_OBJS) $(OBJS) -o $(TARGET)
++	$(OCAMLC) $(CUSTOM) $(OTHER_OBJS) $(OBJS) -o $(TARGET)
+ 
+ $(TARGET:.out=.opt): $(OBJS:.cmo=.cmx)
+ 	$(OCAMLOPT) $(OTHER_XOBJS) $(OBJS:.cmo=.cmx) -o $(TARGET:.out=.opt)
+-- 
diff --git a/debian/patches/0001-Don-t-build-in-custom-mode.patch b/debian/patches/0001-Don-t-build-in-custom-mode.patch
deleted file mode 100644
index 25cd15e..0000000
--- a/debian/patches/0001-Don-t-build-in-custom-mode.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Samuel Mimram <smimram at debian.org>
-Date: Fri, 19 Nov 2010 08:56:40 +0100
-Subject: [PATCH] Don't build in -custom mode
-
-...in order to be arch-independant
-
-Signed-off-by: Samuel Mimram <smimram at debian.org>
-Signed-off-by: Stephane Glondu <steph at glondu.net>
----
- Makefile |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index b305414..5ae2dd1 100644
---- a/Makefile
-+++ b/Makefile
-@@ -16,7 +16,7 @@ EXT=ext/pa_def.cmo ext/pa_local.cmo
- all: $(EXT) $(TARGET) ledit.1
- 
- $(TARGET): $(OBJS)
--	$(OCAMLC) -custom $(OTHER_OBJS) $(OBJS) -o $(TARGET)
-+	$(OCAMLC) $(OTHER_OBJS) $(OBJS) -o $(TARGET)
- 
- $(TARGET:.out=.opt): $(OBJS:.cmo=.cmx)
- 	$(OCAMLOPT) $(OTHER_XOBJS) $(OBJS:.cmo=.cmx) -o $(TARGET:.out=.opt)
--- 
diff --git a/debian/patches/0002-Build-a-ledit.cma.patch b/debian/patches/0002-Build-a-ledit.cma.patch
index 02387ce..1c4da49 100644
--- a/debian/patches/0002-Build-a-ledit.cma.patch
+++ b/debian/patches/0002-Build-a-ledit.cma.patch
@@ -1,40 +1,57 @@
-From: Stefano Zacchiroli <zack at debian.org>
+From: Stephane Glondu <steph at glondu.net>
 Date: Fri, 19 Nov 2010 08:57:54 +0100
 Subject: [PATCH] Build a ledit.cma
 
-...so that Ledit can be used as a library
+...so that Ledit can be used as a library. Ship also a META file.
 
-Signed-off-by: Stefano Zacchiroli <zack at debian.org>
 Signed-off-by: Stephane Glondu <steph at glondu.net>
 ---
- Makefile |   14 ++++++++++++++
- 1 files changed, 14 insertions(+), 0 deletions(-)
+ META.tpl |    6 ++++++
+ Makefile |   20 ++++++++++++++++++++
+ 2 files changed, 26 insertions(+), 0 deletions(-)
+ create mode 100755 META.tpl
 
+diff --git a/META.tpl b/META.tpl
+new file mode 100755
+index 0000000..750dad1
+--- /dev/null
++++ b/META.tpl
+@@ -0,0 +1,6 @@
++name="ledit"
++version="LEDIT_VERSION"
++description="Line editing for interactive commands"
++requires="unix,camlp5.gramlib"
++archive(byte)="ledit.cma"
++archive(native)="ledit.cmxa"
 diff --git a/Makefile b/Makefile
-index 5ae2dd1..2edc0b4 100644
+index bf1be14..60bfad5 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -14,6 +14,8 @@ MKDIR=mkdir -p
+@@ -13,8 +13,11 @@ TARGET=ledit.out
+ MKDIR=mkdir -p
  EXT=ext/pa_def.cmo ext/pa_local.cmo
+ CUSTOM=-custom
++LEDIT_LIBDIR=$(shell $(OCAMLC) -where)/ledit
  
  all: $(EXT) $(TARGET) ledit.1
 +all: ledit.cma
 +opt: ledit.cmxa
  
  $(TARGET): $(OBJS)
- 	$(OCAMLC) $(OTHER_OBJS) $(OBJS) -o $(TARGET)
-@@ -25,14 +27,26 @@ ledit.1: ledit.1.tpl go.ml
+ 	$(OCAMLC) $(CUSTOM) $(OTHER_OBJS) $(OBJS) -o $(TARGET)
+@@ -26,14 +29,31 @@ ledit.1: ledit.1.tpl go.ml
  	VERSION=`sed -n -e 's/^.* version = "\(.*\)".*$$/\1/p' go.ml`; \
  	sed s/LEDIT_VERSION/$$VERSION/ ledit.1.tpl > ledit.1
  
 +ledit.cma: cursor.cmo ledit.cmo
-+	ocamlc -a -o $@ $^
++	$(OCAMLC) -a -o $@ $^
 +ledit.cmxa: cursor.cmx ledit.cmx
-+	ocamlopt -a -o $@ $^
++	$(OCAMLOPT) -a -o $@ $^
 +
  clean:
  	/bin/rm -f *.cm[iox] *.pp[oi] *.o ext/*.cm[io] *.bak $(TARGET) ledit.1
 +	rm -f ledit.cma ledit.cmxa *.a
++	rm -f META
  
  install:
  	-$(MKDIR) $(BINDIR) $(MANDIR)
@@ -42,10 +59,14 @@ index 5ae2dd1..2edc0b4 100644
  	-cp ledit.1 $(MANDIR)/ledit.1
  
 +install-lib: META
-+	-$(MKDIR) $(LIBDIR)
-+	cp META $(LIBDIR)/
-+	cp ledit.cma ledit.cmi cursor.cmi $(LIBDIR)/
-+	if [ -f ledit.cmxa ] ; then cp ledit.cmxa ledit.a $(LIBDIR)/ ; fi
++	-$(MKDIR) $(LEDIT_LIBDIR)
++	cp META $(LEDIT_LIBDIR)/
++	cp ledit.cma ledit.cmi cursor.cmi $(LEDIT_LIBDIR)/
++	if [ -f ledit.cmxa ] ; then cp ledit.cmxa ledit.a $(LEDIT_LIBDIR)/ ; fi
++
++META: META.tpl
++	VERSION=`sed -n -e 's/^.* version = "\(.*\)".*$$/\1/p' go.ml`; \
++	sed s/LEDIT_VERSION/$$VERSION/ META.tpl > META
 +
  depend:
  	> .depend.new
diff --git a/debian/patches/0003-Ship-a-META-file-for-the-ledit-library.patch b/debian/patches/0003-Ship-a-META-file-for-the-ledit-library.patch
deleted file mode 100644
index 60146be..0000000
--- a/debian/patches/0003-Ship-a-META-file-for-the-ledit-library.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Stefano Zacchiroli <zack at debian.org>
-Date: Fri, 19 Nov 2010 09:02:16 +0100
-Subject: [PATCH] Ship a META file for the ledit library
-
-Signed-off-by: Stefano Zacchiroli <zack at debian.org>
-Signed-off-by: Stephane Glondu <steph at glondu.net>
----
- Makefile |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index 2edc0b4..760d7ab 100644
---- a/Makefile
-+++ b/Makefile
-@@ -35,6 +35,7 @@ ledit.cmxa: cursor.cmx ledit.cmx
- clean:
- 	/bin/rm -f *.cm[iox] *.pp[oi] *.o ext/*.cm[io] *.bak $(TARGET) ledit.1
- 	rm -f ledit.cma ledit.cmxa *.a
-+	rm -f META
- 
- install:
- 	-$(MKDIR) $(BINDIR) $(MANDIR)
-@@ -47,6 +48,10 @@ install-lib: META
- 	cp ledit.cma ledit.cmi cursor.cmi $(LIBDIR)/
- 	if [ -f ledit.cmxa ] ; then cp ledit.cmxa ledit.a $(LIBDIR)/ ; fi
- 
-+META: META.tpl
-+	VERSION=`sed -n -e 's/^.* version = "\(.*\)".*$$/\1/p' go.ml`; \
-+	sed s/LEDIT_VERSION/$$VERSION/ META.tpl > META
-+
- depend:
- 	> .depend.new
- 	for i in $(OBJS:.cmo=.ml); do \
--- 
diff --git a/debian/patches/series b/debian/patches/series
index 35354a9..f007aef 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,2 @@
-0001-Don-t-build-in-custom-mode.patch
+0001-Add-possibility-to-remove-custom.patch
 0002-Build-a-ledit.cma.patch
-0003-Ship-a-META-file-for-the-ledit-library.patch
diff --git a/debian/rules b/debian/rules
index 2523972..ebbf029 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ configure-stamp:
 build: configure-stamp build-stamp ocamlinit-stamp
 build-stamp:
 	dh_testdir
-	$(MAKE)
+	$(MAKE) CUSTOM=
 	if [ $(OCAML_OPT_ARCH) ]; then $(MAKE) opt; fi
 	touch build-stamp
 
@@ -38,7 +38,7 @@ install-arch: build
 	dh_prep -s
 	dh_installdirs -s
 	mkdir -p $(LEDIT_LIBDIR)
-	$(MAKE) install-lib LIBDIR=$(LEDIT_LIBDIR)
+	$(MAKE) install-lib LEDIT_LIBDIR=$(LEDIT_LIBDIR)
 	dh_install -s
 	dh_ocamldoc
 

-- 
ledit packaging



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