File: rules

package info (click to toggle)
lablgl 1%3A1.05-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 1,444 kB
  • sloc: ansic: 8,270; ml: 6,118; tcl: 342; makefile: 294; xml: 84; perl: 12
file content (44 lines) | stat: -rwxr-xr-x 1,450 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/ocaml/ocamlvars.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

VERSION:=$(shell sed -n "s/^LablGL \(.*\):/\1/p" CHANGES | head -n 1)
export OCAMLINIT_SED=-e 's%@LABLGL_VERSION@%$(VERSION)%g'

%:
	dh $@ --with ocaml

.PHONY: override_dh_auto_configure
override_dh_auto_configure:
	cp debian/Makefile.config .

.PHONY: override_dh_auto_build
override_dh_auto_build:
	$(MAKE)
ifneq ($(OCAML_OPT_ARCH),)
	$(MAKE) opt
endif

	# Quick replacement for docbook/po4a CDBS class
	# TODO: use cdbs + po4a
	xmllint --nonet --noout --postvalid --xinclude $(CURDIR)/debian/xml-man/en/lablgl.xml
	xsltproc --nonet --xinclude --param man.charmap.use.subset 0 \
	  -o $(CURDIR)/  /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
	  $(CURDIR)/debian/xml-man/en/lablgl.xml

.PHONY: override_dh_auto_clean
override_dh_auto_clean:
	[ ! -f "$(CURDIR)/Makefile" ] || [ ! -f "$(CURDIR)/Makefile.config" ] || $(MAKE) clean

.PHONY: override_dh_auto_install
override_dh_auto_install:
	$(MAKE) install									\
		LIBDIR=$(CURDIR)/debian/liblablgl-ocaml-dev$(OCAML_STDLIB_DIR)		\
		DLLDIR=$(CURDIR)/debian/liblablgl-ocaml$(OCAML_STDLIB_DIR)/stublibs	\
		BINDIR=$(CURDIR)/debian/liblablgl-ocaml-dev/usr/bin
	cp debian/META $(CURDIR)/debian/liblablgl-ocaml-dev$(OCAML_STDLIB_DIR)/lablgl
	ln -sf $(OCAML_STDLIB_DIR)/lablgl $(CURDIR)/debian/liblablgl-ocaml-dev$(OCAML_STDLIB_DIR)/lablGL