[Pkg-ocaml-maint-commits] [SCM] Debian packaging for coccinelle branch, master, updated. debian/0.1.6.deb+a-1-2-g532c30e

Eugeniy Meshcheryakov eugen at debian.org
Mon Apr 6 13:50:11 UTC 2009


The following commit has been merged in the master branch:
commit 532c30e6c6d1d871b572dafdc14f4e45b21462d2
Author: Eugeniy Meshcheryakov <eugen at debian.org>
Date:   Mon Apr 6 14:41:38 2009 +0200

    Compile to native code if possible

diff --git a/debian/changelog b/debian/changelog
index 242318c..0532666 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,9 @@
 coccinelle (0.1.6.deb+a-2) unstable; urgency=low
 
   * Fix Vcs-Browser URL
+  * Compile to native code if possible
 
- -- Євгеній Мещеряков <eugen at debian.org>  Wed, 01 Apr 2009 13:57:28 +0200
+ -- Євгеній Мещеряков <eugen at debian.org>  Mon, 06 Apr 2009 14:40:55 +0200
 
 coccinelle (0.1.6.deb+a-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 3612ca2..ce21f80 100644
--- a/debian/control
+++ b/debian/control
@@ -4,15 +4,16 @@ Priority: optional
 Maintainer: Євгеній Мещеряков <eugen at debian.org>
 Build-Depends: debhelper (>= 7), quilt, ocaml-nox (>= 3.11.0), pycaml (>= 0.82-9), texlive-latex-base,
  texlive-latex-recommended, texlive-latex-extra, texlive-fonts-extra, hevea, python,
- menhir (>= 20090204.dfsg), libmenhir-ocaml-dev (>= 20090204.dfsg), ocaml-findlib, dh-ocaml
+ menhir (>= 20090204.dfsg), libmenhir-ocaml-dev (>= 20090204.dfsg), ocaml-findlib, dh-ocaml,
+ ocaml-best-compilers
 Standards-Version: 3.8.1
 Homepage: http://www.emn.fr/x-info/coccinelle/
 Vcs-Git: git://git.debian.org/git/collab-maint/coccinelle.git
 Vcs-Browser: http://git.debian.org/?p=collab-maint/coccinelle.git
 
 Package: coccinelle
-Architecture: all
-Depends: ${misc:Depends}, ${F:OCamlRun}, ${python:Depends}, pycaml (>= 0.82-9), python-gobject,
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}, ${F:OCamlRun}, ${python:Depends}, python-gobject,
  python-gtk2, python-glade2
 Suggests: doc-base, vim-addon-manager
 Description: semantic patching tool for C
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..4464fb1
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+usr/lib/coccinelle
diff --git a/debian/rules b/debian/rules
index db0d5aa..157a600 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,17 +12,26 @@ COCCI_FLAGS = BYTECODE_STATIC="" MANDIR=/usr/share/man
 VIM_ADIR = $(CURDIR)/debian/coccinelle/usr/share/vim/addons
 VIM_RDIR = $(CURDIR)/debian/coccinelle/usr/share/vim/registry
 
-# do not use native code for now
-# BYTECODE = $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
-BYTECODE = yes
-OCAMLRUN = $(if $(BYTECODE),ocaml-base-nox-$(OCAML_ABI))
+COMMON_CONFIG = --prefix=/usr --with-python --without-trac
+
+ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
+OCAMLRUN =
+CONFIG_FLAGS = $(COMMON_CONFIG) --opt
+MAKE_TGT = all.opt
+INST_TGT = install
+else
+OCAMLRUN = ocaml-base-nox-$(OCAML_ABI), pycaml (>= 0.82-9)
+CONFIG_FLAGS = $(COMMON_CONFIG) --no-opt
+MAKE_TGT = all
+INST_TGT = install-byte
+endif
 
 build: build-stamp
 
 build-stamp: patch
 	dh build --before dh_auto_configure
-	./configure --prefix=/usr --no-opt --with-python --without-trac
-	$(MAKE) $(COCCI_FLAGS) depend all
+	./configure $(CONFIG_FLAGS)
+	$(MAKE) $(COCCI_FLAGS) depend $(MAKE_TGT)
 	cd docs/grammar && $(MAKE)
 	cd docs && pdflatex options.tex
 	cd docs && pdflatex options.tex
@@ -44,9 +53,12 @@ clean: unpatch
 install: build install-stamp
 install-stamp:
 	dh install --before dh_auto_install
-	$(MAKE) DESTDIR=$(CURDIR)/debian/coccinelle $(COCCI_FLAGS) install-byte
+	$(MAKE) DESTDIR=$(CURDIR)/debian/coccinelle $(COCCI_FLAGS) $(INST_TGT)
 	# install the wrapper script, i dont like upstreams one
 	install $(CURDIR)/debian/spatch $(CURDIR)/debian/coccinelle/usr/bin/
+	# move binary into /usr/lib/coccinelle
+	mv $(CURDIR)/debian/coccinelle/usr/share/coccinelle/spatch* \
+		$(CURDIR)/debian/coccinelle/usr/lib/coccinelle/spatch
 
 	# Vim files
 	install -d $(VIM_ADIR)/ftdetect $(VIM_ADIR)/syntax
@@ -61,12 +73,12 @@ install-stamp:
 	touch install-stamp
 
 
-binary-indep: install
-	dh binary-indep --before dh_gencontrol
-	dh_gencontrol -i -- -VF:OCamlRun="$(OCAMLRUN)"
-	dh binary-indep --after dh_gencontrol
-
 binary-arch: install
+	dh binary-arch --before dh_gencontrol
+	dh_gencontrol -a -- -VF:OCamlRun="$(OCAMLRUN)"
+	dh binary-arch --after dh_gencontrol
+
+binary-indep: install
 
 binary: binary-indep binary-arch
 
diff --git a/debian/spatch b/debian/spatch
index fe0cc2d..d7c56e3 100644
--- a/debian/spatch
+++ b/debian/spatch
@@ -1,3 +1,3 @@
 #! /bin/sh -e
 
-PYTHONPATH=${PYTHONPATH:+PYTHONPATH:}/usr/share/coccinelle/python exec /usr/share/coccinelle/spatch "$@"
+PYTHONPATH=${PYTHONPATH:+PYTHONPATH:}/usr/share/coccinelle/python exec /usr/lib/coccinelle/spatch "$@"

-- 
Debian packaging for coccinelle



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