--- /dev/null
+targets = $(filter-out debian/configure,$(patsubst %.in,%,$(wildcard debian/*.in)))
+
+debian/configure:
+ echo 'AC_INIT(control)' > debian/configure.in
+ echo 'OCAML_STDLIB_DIR=`ocamlc -where | sed "s|^/||"`' >> debian/configure.in
+ echo 'OCAML_STUBLIBS_DIR=$$OCAML_STDLIB_DIR/stublibs' >> debian/configure.in
+ echo 'AC_SUBST(OCAML_STDLIB_DIR)' >> debian/configure.in
+ echo "AC_SUBST(OCAML_STUBLIBS_DIR)" >> debian/configure.in
+ echo 'AC_OUTPUT([' >> debian/configure.in
+ for f in $(targets); do echo $$f | sed 's|^debian/||'; done >> debian/configure.in
+ echo '])' >> debian/configure.in
+ cd debian && autoconf
+
+$(targets): debian/configure
+ cd debian && ./configure
+
+autodebian-stamp: $(targets)
+ touch autodebian-stamp
+
+autodebian-clean:
+ rm -f autodebian-stamp
+ rm -f debian/{configure.in,config.status,config.cache,config.log}
+ rm -f $(targets)
+
+autodebian-distclean: autodebian-clean
+ rm -f debian/configure
+
+# vim: set ft=make:
+lablgtkmathview (0.4.3-4) unstable; urgency=low
+
+ * Rebuild with ocaml 3.07
+ * debian/autodebian.make and debian/*.in
+ An experiment!
+ Mainly I've added an indirection which permits to fill some autoconf
+ variable in debian/* files. In this way the ocaml version is
+ discovered automagically and doesn't need to be manually changed
+ each time a new ocaml version is released. Actually the only two
+ supported variables are @OCAML_STDLIB_DIR@ (actually expands to
+ "usr/lib/ocaml/3.07" via ocamlc -where) and @OCAML_STUBLIBS_DIR@
+ (actually expands to "usr/lib/ocaml/3.07/stublibs")
+
+ -- Stefano Zacchiroli <zack@debian.org> Wed, 1 Oct 2003 22:48:51 +0200
+
lablgtkmathview (0.4.3-3) unstable; urgency=low
* rebuilt against gmetadom 0.1.10-3
Section: devel
Priority: optional
Maintainer: Stefano Zacchiroli <zack@debian.org>
-Build-Depends: debhelper (>> 4.0.0), ocaml-3.06-1, ocaml-findlib, liblablgtk-ocaml-dev (>= 1.2.5), libgdome2-ocaml-dev (>= 0.1.10-3), libgtkmathview-dev (>= 0.4.3), libxml2-dev, libgdome2-dev (>= 0.7.4), libgdome2-cpp-smart-dev (>= 0.1.10-3), t1lib-dev (>= 1.3), pkg-config
+Build-Depends: debhelper (>> 4.0.0), ocaml-3.07, ocaml-findlib, liblablgtk-ocaml-dev (>= 1.2.5), libgdome2-ocaml-dev (>= 0.1.10-3), libgtkmathview-dev (>= 0.4.3), libxml2-dev, libgdome2-dev (>= 0.7.4), libgdome2-cpp-smart-dev (>= 0.1.10-3), t1lib-dev (>= 1.3), pkg-config, autoconf
Standards-Version: 3.5.10
Package: liblablgtkmathview-ocaml
Architecture: any
Section: libs
-Depends: ocaml-base-3.06-1, liblablgtk-ocaml (>= 1.2.5), libgdome2-ocaml (>= 0.1.10-3), ${shlibs:Depends}, ${misc:Depends}
+Depends: ocaml-base-3.07, liblablgtk-ocaml (>= 1.2.5), libgdome2-ocaml (>= 0.1.10-3), ${shlibs:Depends}, ${misc:Depends}
Description: OCaml bindings for libgtkmathview, a GTK widget to render MathML
This is the Ocaml binding for the GtkMathView widget, that is
currently available in the libgtkmathview0 package.
Package: liblablgtkmathview-ocaml-dev
Architecture: any
Section: libdevel
-Depends: ocaml-3.06-1, liblablgtk-ocaml-dev (>= 1.2.5), libgtkmathview0 (>= 0.4.3), liblablgtkmathview-ocaml (= ${Source-Version}), ocaml-findlib, libgdome2-ocaml-dev (>= 0.1.10-3), t1lib-dev, libgtkmathview-dev (>= 0.4.3), ${misc:Depends}
+Depends: ocaml-3.07, liblablgtk-ocaml-dev (>= 1.2.5), libgtkmathview0 (>= 0.4.3), liblablgtkmathview-ocaml (= ${Source-Version}), ocaml-findlib, libgdome2-ocaml-dev (>= 0.1.10-3), t1lib-dev, libgtkmathview-dev (>= 0.4.3), ${misc:Depends}
Description: OCaml bindings for libgtkmathview, a GTK widget to render MathML
These are the Ocaml bindings for the GtkMathView widget, that is
currently available in the libgtkmathview0 package.
#export DH_VERBOSE=1
TARGETDIR = debian/liblablgtkmathview-ocaml-dev
+OCAML_STDLIB_DIR = $(shell ocamlc -where)
+
+include debian/autodebian.make
configure: configure-stamp
-configure-stamp:
+configure-stamp: autodebian-stamp
dh_testdir
./configure
touch build-stamp
-clean:
+clean: autodebian-clean
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
-$(MAKE) distclean
dh_clean
+distclean: clean autodebian-distclean
install: build
dh_testdir
dh_clean -k
dh_installdirs -s
- $(MAKE) install PREFIX=$(TARGETDIR)/usr/lib/ocaml/3.06
+ $(MAKE) install PREFIX=$(TARGETDIR)$(OCAML_STDLIB_DIR)
movefiles: install
dh_install -p liblablgtkmathview-ocaml --sourcedir=$(TARGETDIR)