~ubuntu-branches/ubuntu/lucid/ocaml-ladspa/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis
  • Date: 2007-11-14 16:54:21 UTC
  • Revision ID: james.westby@ubuntu.com-20071114165421-5tqbjmgwbcjxr6ht
Tags: 0.1.0-2
Added ocaml-findlib to build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Sample debian/rules that uses debhelper.
 
3
# GNU copyright 1997 to 1999 by Joey Hess.
 
4
 
 
5
# Uncomment this to turn on verbose mode.
 
6
#export DH_VERBOSE=1
 
7
 
 
8
OCAMLABI := $(shell ocamlc -version)
 
9
OFILES := $(patsubst %.in,%,$(wildcard debian/*.in))
 
10
 
 
11
DESTDIR = $(CURDIR)/debian/tmp$(shell ocamlc -where)
 
12
 
 
13
CFLAGS = "-O2 -g -fPIC"
 
14
 
 
15
ocamlinit:
 
16
        for f in $(OFILES); do sed -e 's/@OCamlABI@/$(OCAMLABI)/g' $$f.in > $$f; done
 
17
 
 
18
config.status: configure
 
19
        dh_testdir
 
20
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
 
21
 
 
22
build: ocamlinit build-stamp
 
23
build-stamp: config.status
 
24
        dh_testdir
 
25
 
 
26
        $(MAKE) CFLAGS=$(CFLAGS)
 
27
 
 
28
        touch build-stamp
 
29
 
 
30
clean:
 
31
        dh_testdir
 
32
        dh_testroot
 
33
        rm -f build-stamp
 
34
 
 
35
        [ ! -f Makefile ] || $(MAKE) distclean
 
36
        rm -f config.log config.status
 
37
 
 
38
        dh_clean
 
39
 
 
40
install: build
 
41
        dh_testdir
 
42
        dh_testroot
 
43
        dh_clean -k
 
44
        dh_installdirs
 
45
 
 
46
        mkdir -p $(DESTDIR)
 
47
        $(MAKE) install OCAMLFIND_DESTDIR=$(DESTDIR) OCAMLFIND_LDCONF=ignore
 
48
        $(MAKE) doc
 
49
 
 
50
binary-arch: build install
 
51
        dh_testdir
 
52
        dh_testroot
 
53
        dh_installchangelogs CHANGES
 
54
        dh_installdocs
 
55
        dh_installexamples
 
56
        dh_install --sourcedir=debian/tmp --list-missing
 
57
        dh_link
 
58
        dh_strip
 
59
        dh_compress
 
60
        dh_fixperms
 
61
        dh_makeshlibs
 
62
        dh_installdeb
 
63
        dh_shlibdeps
 
64
        dh_gencontrol -- -VF:OCamlABI="$(OCAMLABI)"
 
65
        dh_md5sums
 
66
        dh_builddeb
 
67
 
 
68
binary-indep:
 
69
 
 
70
binary: binary-arch
 
71
.PHONY: build clean binary-indep binary-arch binary install ocamlinit