]> matita.cs.unibo.it Git - helm.git/blobdiff - DEVEL/lablgtkmathview/debian/rules
snapshot: first draft of binNMU safe cdbs packaging
[helm.git] / DEVEL / lablgtkmathview / debian / rules
index 5e0bab2fd6314008305fdd9e5b440cac8210efb5..9fca716f6ade59eeb4d3ceeddf5b8315ab58fd8e 100755 (executable)
@@ -1,69 +1,17 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/makefile.mk
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+PKGNAME = liblablgtkmathview-ocaml-dev
 
 OCAMLABI := $(shell ocamlc -version)
 OCAMLLIBDIR := $(shell ocamlc -where)
-OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
+OFILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
+HAVE_OCAMLOPT := $(shell test -x /usr/bin/ocamlopt && echo "yes")
+DEB_DH_GENCONTROL_ARGS = -- -VF:OCamlABI="$(OCAMLABI)"
 
 ocamlinit:
        for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
-configure: configure-stamp
-configure-stamp:
-       dh_testdir
-       ./configure
+makebuilddir/$(PKGNAME):: ocamlinit
 
-       touch configure-stamp
-
-build: configure-stamp build-stamp
-build-stamp:
-       dh_testdir
-
-       $(MAKE)
-       if [ -x /usr/bin/ocamlopt ]; then $(MAKE) opt; else true; fi
-
-       touch build-stamp
-
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp configure-stamp
-
-       -$(MAKE) distclean
-
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs
-
-       mkdir -p debian/tmp$(OCAMLLIBDIR)
-       $(MAKE) install PREFIX=debian/tmp$(OCAMLLIBDIR)
-
-binary-arch: build install
-       dh_install
-       dh_testdir
-       dh_testroot
-       dh_installdocs
-       dh_installexamples
-       dh_installman
-       dh_installinfo
-       dh_installchangelogs ChangeLog
-       dh_link
-       dh_strip
-       dh_compress
-       dh_fixperms
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
-       dh_md5sums
-       dh_builddeb
-
-binary-indep: build install
-binary: binary-indep binary-arch
-.PHONY: build clean binary-arch binary install configure
+DEB_MAKE_INSTALL_TARGET = install PREFIX=$(CURDIR)/debian/tmp$(OCAMLLIBDIR)