File: rules

package info (click to toggle)
giac 1.6.0.41%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 64,540 kB
  • sloc: cpp: 351,842; ansic: 105,138; python: 30,545; javascript: 8,675; yacc: 2,690; lex: 2,449; makefile: 1,243; sh: 579; perl: 314; lisp: 216; asm: 62; java: 41; sed: 16; csh: 7; pascal: 6
file content (87 lines) | stat: -rwxr-xr-x 2,702 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
79
80
81
82
83
84
85
86
87
#!/usr/bin/make -f

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

%:
	dh "$@" --with autoreconf

# Use ccache if pkg.giac.ccache build-profile is active.
# Your rebuilds will be *much quicker*.
ifneq (,$(filter pkg.giac.ccache,$(DEB_BUILD_PROFILES)))
export PATH := /usr/lib/ccache:$(PATH)
export CCACHE_DIR := $(CURDIR)/debian/ccache
#export CCACHE_BASEDIR := $(CURDIR)/debian/build
$(shell mkdir -p "$(CCACHE_DIR)")
endif

# ~/.xcasrc sometimes interferes with doc/test targets, causing failures
export HOME=/nonexistent

override_dh_autoreconf:
# Deal with embedded stuff
	find doc/ -maxdepth 1 -type d -exec ln -sf /usr/share/texmf/tex/texinfo/texinfo.tex '{}/' \;
# Deal with emscripten placeholder
	cp debian/giac.js doc/giac.js
# Deal with french documentation
	cp -a debian/upstream-doc-fr doc/fr
	cp doc/fr/Makefile.am.Debian doc/fr/Makefile.am
# Actually configure
	dh_autoreconf

override_dh_auto_build-arch:
# Should be the same order as SUBDIRS in Makefile.am
	dh_auto_build -a -D micropython-1.12
	dh_auto_build -a -D src
	dh_auto_build -a -D intl
	dh_auto_build -a -D po
	dh_auto_build -a -D doc -- info

override_dh_auto_test-arch:
	dh_auto_test -a -D check -- VERBOSE=1

override_dh_auto_test-indep:
	true

override_dh_auto_install-arch:
# Should be the same order as SUBDIRS in Makefile.am
	dh_auto_install -a -D src
	dh_auto_install -a -D intl
	dh_auto_install -a -D po
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp AM_UPDATE_INFO_DIR=no -C doc \
	  install-info install-dist_pkgdataDATA
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install-exec-hook

override_dh_install: fix_encoding
	rm -f debian/tmp/usr/lib/*/libgiac.la
	rm -f debian/tmp/usr/include/giac/config.h
	dh_install

override_dh_missing:
	dh_missing --fail-missing

override_dh_fixperms-indep:
	dh_fixperms
	find debian/giac-doc/usr/share/giac/examples/ \
	  \( -name '*.cas' -o -name '*.xws' -o -name '*.cxx' \) -exec chmod -x '{}' \;
	chmod -x debian/giac-doc/usr/share/giac/examples/lewisw/*_?var

ENCODING_FILES = \
	/usr/share/giac/doc/en/casinter/casinter001.html \
	/usr/share/giac/doc/en/casinter/casinter002.html \
	/usr/share/giac/doc/en/casinter/casinter004.html \
	/usr/share/giac/doc/en/casinter/casinter005.html \
	/usr/share/giac/doc/en/casinter/casinter006.html \
	/usr/share/giac/doc/en/casinter/index.html \
	/usr/share/giac/examples/arit/codage.cas \
	/usr/share/giac/examples/demo/e05.tex \
	/usr/share/giac/examples/geo/geo2 \
	/usr/include/giac/monomial.h \
	/usr/include/giac/poly.h \
	/usr/include/giac/prog.h

fix_encoding:
	for toto in $(ENCODING_FILES); do \
		iconv -f iso-8859-15 -t utf-8 debian/tmp$$toto > debian/tmp$$toto.fix ; \
		mv debian/tmp$$toto.fix debian/tmp$$toto ; \
	done