[go: up one dir, main page]

File: rules

package info (click to toggle)
cduce 0.5.3-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,180 kB
  • ctags: 3,176
  • sloc: ml: 20,028; xml: 5,546; makefile: 427; sh: 133
file content (78 lines) | stat: -rwxr-xr-x 1,931 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/usr/bin/make -f
PACKAGE = cduce

include /usr/share/ocaml/ocamlinit.mk
include /usr/share/quilt/quilt.make
MAKE_OPTS := "NATIVE=$(if $(OCAML_OPT_ARCH),true,false)"

LIBDIR=$(CURDIR)/debian/cduce/$(OCAML_STDLIB_DIR)
DOCDIR=$(CURDIR)/debian/cduce/usr/share/doc/cduce/html
BINDIR=$(CURDIR)/debian/cduce/usr/bin
MANDIR=$(CURDIR)/debian/cduce/usr/share/doc/man

CONFIGURE_OPTS := --prefix=/usr \
  --mliface=debian/ocaml-$(OCAML_ABI) \
  --with-curl \
  --without-netclient \
  --with-expat \
  --without-pxp

configure: configure-stamp
configure-stamp: ocamlinit-stamp patch
	dh_testdir
	tar -C debian -xjf /usr/src/ocaml-source-$(OCAML_ABI).tar.bz2
	./configure  $(CONFIGURE_OPTS)
	touch configure-stamp

build: build-stamp
build-stamp: configure-stamp
	$(MAKE) $(MAKE_OPTS) all doc
	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot

	touch Makefile.conf
	[ ! -f Makefile ] || $(MAKE) $(MAKE_OPTS) clean
	-$(RM) Makefile.conf
	-$(RM) -rf debian/ocaml-$(OCAML_ABI)/
	dh_clean

install:
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	# Add here commands to install the indep part of the package into
	# debian/<package>-doc.
	$(MAKE) $(MAKE_OPTS) DOCDIR=$(DOCDIR) BINDIR=$(BINDIR) MANDIR=$(MANDIR) OCAMLFIND_DESTDIR=$(LIBDIR) OCAMLFIND_LDCONF=ignore install

	# Remove the wrong RPATH
	chrpath -d $(BINDIR)/cduce

	# CDuce Makefile installs all the documentation in DOCDIR, including 
	# README, LICENSE, and so on. We don't want these. Let's hack.
	find $(DOCDIR) -maxdepth 1 -not -name "*.html" -not -name "img" -exec rm {} \;

binary: binary-arch
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress 
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol -s -- -VF:OCamlABI="$(OCAML_ABI)"
	dh_md5sums
	dh_builddeb

.PHONY: configure build clean binary-indep binary-arch binary install