[vlfeat] 03/07: debianized GNU octave bindings

Dima Kogan dkogan-guest at alioth.debian.org
Fri Nov 8 02:51:47 UTC 2013


This is an automated email from the git hooks/post-receive script.

dkogan-guest pushed a commit to branch master
in repository vlfeat.

commit f91251d0236535a7fa42aa0ed79be2bc02631e12
Author: Dima Kogan <dima at secretsauce.net>
Date:   Thu Nov 7 03:55:04 2013 -0800

    debianized GNU octave bindings
---
 debian/control                |   16 ++++++++++-
 debian/octave-vlfeat.examples |    1 +
 debian/rules                  |   60 +++++++++++++++++++++++++++++++++++++++--
 3 files changed, 74 insertions(+), 3 deletions(-)

diff --git a/debian/control b/debian/control
index 4ae7e38..7f97c65 100644
--- a/debian/control
+++ b/debian/control
@@ -1,7 +1,7 @@
 Source: vlfeat
 Section: science
 Priority: optional
-Build-Depends: debhelper (>= 9), dh-exec
+Build-Depends: debhelper (>= 9), dh-exec, liboctave-dev, octave-pkg-dev (>= 1.0.0)
 Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
 Uploaders: Dima Kogan <dima at secretsauce.net>
 Standards-Version: 3.9.4
@@ -44,3 +44,17 @@ Description: Computer vision library focussing on visual features and clustering
  GNU octave for ease of use, and detailed documentation throughout
  .
  Debug symbols
+
+Package: octave-vlfeat
+Section: libs
+Priority: extra
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libvlfeat0 (>= ${binary:Version}),
+         ${octave:Depends}
+Description: Computer vision library focussing on visual features and clustering
+ VLFeat implements popular computer vision algorithms including SIFT, MSER,
+ k-means, hierarchical k-means, agglomerative information bottleneck, and quick
+ shift. It is written in C for efficiency and compatibility, with interfaces in
+ GNU octave for ease of use, and detailed documentation throughout
+ .
+ GNU Octave interface
diff --git a/debian/octave-vlfeat.examples b/debian/octave-vlfeat.examples
new file mode 100644
index 0000000..ea5a616
--- /dev/null
+++ b/debian/octave-vlfeat.examples
@@ -0,0 +1 @@
+apps
diff --git a/debian/rules b/debian/rules
index 86593c7..d437f78 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,14 +13,70 @@ API_VERSION = $(shell objdump -p bin/*/libvl.so | perl -ne 'if(/^\s+SONAME\s+lib
 override_dh_auto_build:
 	make MKOCTFILE=`which mkoctfile` VERB=1 CFLAGS+=-g
 
-override_dh_auto_install:
+
+override_dh_auto_install: $(addprefix install/,data $(wildcard toolbox/*))
 	cp bin/*/libvl.so libvl.so.$(VERSION)
 	ln -fs libvl.so.$(VERSION) libvl.so
 	ln -fs libvl.so.$(VERSION) libvl.so.$(API_VERSION)
 
-override_dh_strip:
+override_dh_gencontrol:
+	dh_gencontrol -- -V"octave:Depends=octave(>=`octave-config --print VERSION`)"
+
+override_dh_strip: strip_mex
 	dh_strip --dbg-package=libvlfeat0-dbg
 
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -f libvl.so*
+
+
+
+
+# The rest is all for octave. There's some CDBS infrastructure to automate this,
+# but it's designed for octave-only source packages. I have both in one source,
+# so I can't use it
+
+include /usr/share/octave/debian/defs.make
+
+
+# I want to take all the *.m in toolbox/xxx/ for all xxx except mex and
+# noprefix. I want to take only some particular toolbox/*.m. There are many
+# other files strewn around that I want to ignore. This is somewhat
+# convoluted...
+
+OCTAVE_MPATH   := debian/octave-vlfeat$(MDIR)/vlfeat/toolbox
+OCTAVE_BINPATH := debian/octave-vlfeat$(OCTDIR)/vlfeat/toolbox
+OCTAVE_PHONY_TARGETS := $(addprefix install/,data $(wildcard toolbox/*) toolbox/mex toolbox/noprefix)
+.PHONY: $(OCTAVE_PHONY_TARGETS)
+
+OCT_TARGET=$(@:install/%=%)
+
+$(addprefix install/toolbox/, vl_harris.m vl_help.m vl_root.m):
+	install -d $(OCTAVE_MPATH)
+	install -m 0644 $(OCT_TARGET) $(OCTAVE_MPATH)
+
+# installing the .mex files with executable bits set to let dh_shlibdeps index
+# them. I remove these bits as soon as dh_shlibdeps does its thing
+install/toolbox/mex:
+	install -d $(OCTAVE_BINPATH)
+	install -m 0755 $(OCT_TARGET)/*/*/*.mex $(OCTAVE_BINPATH)
+
+override_dh_shlibdeps:
+	dh_shlibdeps
+	chmod 0644 $(OCTAVE_BINPATH)/*.mex
+
+$(filter-out %.m install/data install/toolbox/mex install/toolbox/noprefix,$(OCTAVE_PHONY_TARGETS)):
+	if [ -d $(OCT_TARGET) ]; then							\
+		install -d $(OCTAVE_MPATH);						\
+		install -d $(OCTAVE_MPATH)/$(notdir $(OCT_TARGET));			\
+		install -m 0644 $(OCT_TARGET)/*.m $(OCTAVE_MPATH)/$(notdir $(OCT_TARGET));	\
+	fi
+
+install/data:
+	install -d $(OCTAVE_MPATH)/../data
+	install -m 0644 data/* $(OCTAVE_MPATH)/../data
+
+# dh_strip doesn't see the .mex files as needing stripping, so I do it myself
+.PHONY: strip_mex
+strip_mex:
+	strip --remove-section=.comment --remove-section=.note --strip-unneeded $(OCTAVE_BINPATH)/*.mex

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/vlfeat.git



More information about the debian-science-commits mailing list