File: rules

package info (click to toggle)
asymptote 3.01%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 33,376 kB
  • sloc: cpp: 172,565; ansic: 69,735; python: 14,860; sh: 5,599; javascript: 4,866; lisp: 1,507; perl: 1,417; makefile: 1,025; yacc: 610; lex: 449; xml: 182; asm: 8
file content (52 lines) | stat: -rwxr-xr-x 1,542 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
#!/usr/bin/make -f

# Avoid unneeded library dependencies reported by dpkg-shlibdeps.
DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed
DEB_BUILD_MAINT_OPTIONS := hardening=+all
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/pkg-info.mk

#ifeq ($(DEB_HOST_ARCH), hurd-i386)
#  LSPSERVER=--disable-lsp
#endif

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- --enable-gc=system	\
		--with-latex=/usr/share/texmf/tex/latex	\
		--with-context=/usr/share/texmf/tex/context/third $(LSPSERVER)\
		$(foreach v,CFLAGS CPPFLAGS CXXFLAGS LDFLAGS,'$(v)=$($(v))')

# Avoid a warning every time asy is run if HOME is unset.
export ASYMPTOTE_HOME := $(CURDIR)/debian/tmp_asymptote_home
override_dh_auto_configure: | $(ASYMPTOTE_HOME)
$(ASYMPTOTE_HOME):
	mkdir $(ASYMPTOTE_HOME)

override_dh_auto_build:
	make -j4 asy
	make man
	make all html
	# fix location of images in info document
	sed -e 's!image src="\([^"]*\)"!image src="/usr/share/doc/asymptote/html/\1"!g' < doc/png/asymptote.info > doc/png/asymptote.info.fixed
	mv doc/png/asymptote.info.fixed doc/png/asymptote.info

override_dh_auto_install:
	make install-asy DESTDIR=$(CURDIR)/debian/tmp
	dh_installtex -pasymptote

#override_dh_auto_test:
#	: do nothing here, otherwise make tries to compile prc/test.cc

override_dh_compress:
	dh_compress -X.pdf

override_dh_fixperms:
	dh_fixperms -X usr/share/asymptote/GUI/xasy.py

override_dh_clean:
	dh_clean
	rm --force doc/*.aux doc/*.cp doc/*.cps doc/*.idx doc/*.ins doc/*.log doc/*.toc
	rm -fr $(ASYMPTOTE_HOME)