File: rules

package info (click to toggle)
galax 1.1-15
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 13,548 kB
  • ctags: 22,220
  • sloc: ml: 96,599; xml: 26,602; ansic: 4,875; sh: 3,998; makefile: 1,671; java: 1,146
file content (64 lines) | stat: -rwxr-xr-x 2,121 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
include /usr/share/ocaml/ocamlvars.mk

%:
	dh $@ --with ocaml

override_dh_auto_configure:
	if [ ! -d doc.backup ]; then cp -a doc doc.backup; fi
	touch config/Makefile.conf
	$(MAKE) clean
	rm config/Makefile.conf
	for ext in sub guess; do \
	  if [ -f /usr/share/misc/config.$$ext ] && \
	    ! [ -f debian/config.orig.$$ext ]; then \
	    mv config/config.$$ext debian/config.orig.$$ext; \
	    cp -f /usr/share/misc/config.$$ext config/config.$$ext; \
	  fi; \
	done
	./configure -galax-camllib $(OCAML_STDLIB_DIR)/galax			\
		-galax-camllib $(OCAML_STDLIB_DIR)/galax -galax-home /usr	\
		-galax-lib /usr/lib/galax -galax-man /usr/share/man		\
		-galax-usecases /usr/share/doc/galax/usecases			\
		-galax-regress /usr/share/doc/galax/regress			\
		-galax-examples /usr/share/doc/galax/examples			\
		-galax-config /usr/share/doc/galax/config -with-galaxd
	sed -i 's:^\(CONF_GALAX_\w\+\)=/:\1=$$(DESTDIR)/:' config/Makefile.conf

override_dh_auto_build:
	$(MAKE) world
	$(MAKE) -C doc/ manual.pdf manual.html

# remove .depend created during clean as they cause FTBFSs with -rsudo
override_dh_auto_clean:
	if [ -d doc -a ! -d doc.backup ]; then mv doc doc.backup; fi
	rm -Rf doc
	touch config/Makefile.conf
	$(MAKE) clean
	rm config/Makefile.conf
	if [ -d doc.backup ]; then mv doc.backup doc; fi
	for ext in sub guess; do \
	  if [ -f debian/config.orig.$$ext ] ; then \
	    mv -f debian/config.orig.$$ext config/config.$$ext; \
	  fi; \
	done

override_dh_auto_install:
	# $(LN) override so that we only install the best binary, instead of
	# both .opt and .byte together with the best symlink
	$(MAKE) install LN=cp DESTDIR=$(CURDIR)/debian/tmp
	# fix wrong permissions (+x) on some .mli files
	chmod 644 debian/tmp$(OCAML_STDLIB_DIR)/galax/*.mli
	# avoid cluttering usr/bin with too generic names
	cp debian/tmp/usr/bin/zerod  debian/tmp/usr/bin/galax-zerod
	cp debian/tmp/usr/bin/webgui debian/tmp/usr/bin/galax-webgui

ifeq ($(OCAML_HAVE_OCAMLOPT),no)
override_dh_strip:
	dh_strip -Xusr/bin
endif

override_dh_install:
	dh_install -XCVS -Xlicense.tex
override_dh_compress:
	dh_compress -X.pdf