File: rules

package info (click to toggle)
calendar 2.04-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,564 kB
  • sloc: ml: 2,643; makefile: 200
file content (29 lines) | stat: -rwxr-xr-x 613 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
#!/usr/bin/make -f
include /usr/share/ocaml/ocamlvars.mk

DESTDIR = $(CURDIR)/debian/tmp
export OCAMLFIND_DESTDIR = $(DESTDIR)/$(OCAML_STDLIB_DIR)

FILES_TO_BACKUP = .depend config.status

%:
	dh $@ --with ocaml

override_dh_auto_configure:
	for i in $(FILES_TO_BACKUP); do \
		cp -xa $$i $$i.debian; \
	done
	./configure

override_dh_auto_build:
	make BUILD_DATE="$(shell dpkg-parsechangelog --show-field Date)"

override_dh_auto_install:
	mkdir -p $(OCAMLFIND_DESTDIR)
	make install

override_dh_auto_clean:
	rm -rf target/
	for i in $(FILES_TO_BACKUP); do \
		[ ! -f $$i.debian ] || mv $$i.debian $$i; \
	done