File: rules

package info (click to toggle)
graphviz 14.1.1-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 139,440 kB
  • sloc: ansic: 142,129; cpp: 11,960; python: 7,770; makefile: 4,043; yacc: 3,030; xml: 2,972; tcl: 2,495; sh: 1,388; objc: 1,159; java: 560; lex: 423; perl: 243; awk: 156; pascal: 139; php: 58; ruby: 49; cs: 31; sed: 1
file content (138 lines) | stat: -rwxr-xr-x 3,477 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
#!/usr/bin/make -f
# -*- makefile -*-

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

include /usr/share/dpkg/architecture.mk
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

AUTOGENERATED = graphviz.postinst graphviz.postrm graphviz.triggers libgvc7.postinst

ifeq ($(DEB_HOST_ARCH_OS),hurd)
CONFIGURE_LIBS    = LIBS="-Wl,--no-as-needed -Wl,-lpthread -Wl,--as-needed"
endif

ifneq (,$(filter $(DEB_HOST_ARCH), mipsel mips))
DEB_CFLAGS_MAINT_APPEND += "-fno-ipa-sra"
endif

N =

ifeq ($(DEB_HOST_ARCH),ia64)
RUBY = --disable-ruby
N += -Nlibgv-ruby
else
RUBY = --enable-ruby
endif

ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
export PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER)
endif

PYTHON3_VERSIONS = $(shell py3versions -r)

override_dh_clean:
	dh_clean
	$(RM) $(patsubst %, debian/%, ${AUTOGENERATED})
	$(RM) $(CURDIR)/tclpkg/gv/*.pdf $(CURDIR)/cmd/dot/*.pdf
	$(RM) $(CURDIR)/tclpkg/gv/gv.3*
	$(RM) $(CURDIR)/configure $(CURDIR)/version.m4
	$(RM) -r $(CURDIR)/public/
	find $(CURDIR) -name Makefile.in -delete

override_dh_autoreconf:
	$(CURDIR)/autogen.sh NOCONFIG
	dh_autoreconf

override_dh_auto_configure:
	for f in ${AUTOGENERATED} ; do \
		sed -e 's%@TRIPLET@%${DEB_HOST_MULTIARCH}%g' \
			< debian/$$f.in \
			> debian/$$f ; \
	done
	dh_auto_configure -- \
	--disable-silent-rules \
	--prefix=/usr \
	--datadir=\$${prefix}/share \
	--infodir=\$${prefix}/share/info \
	--mandir=\$${prefix}/share/man \
	--enable-static \
	--without-included-ltdl \
	--with-pangocairo \
	--with-x \
	--with-gdk-pixbuf \
	--with-glut \
	--with-gnomeui \
	--without-gtk \
	--with-poppler \
	--with-gts \
	--with-ipsepcola \
	--with-libgd \
	--with-qt \
	--with-rsvg \
	--with-ann \
	--with-webp \
	--with-devil \
	--without-smyrna \
	--disable-go \
	--enable-guile \
	--enable-lua \
	--disable-php \
	$(RUBY) \
	--enable-tcl \
	--disable-java \
	--disable-ocaml \
	--disable-r \
	--disable-sharp \
	--disable-python \
	--enable-python3 \
	$(CONFIGURE_LIBS) \
	$(shell $(dpkg_buildflags) --export=configure)

override_dh_auto_build-indep:
	dh_auto_build --indep
	# still need registered layout module
	PATH=./cmd/dot/:$(PATH) $(MAKE) doxygen

override_dh_auto_install:
	dh_auto_install
	find $(CURDIR)/debian/tmp/ -name \*.la -delete
	# move Tcl files to correct path
	install -d $(CURDIR)/debian/tmp/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/
	mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/graphviz/tcl \
		$(CURDIR)/debian/tmp/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/gv
	# move PDF documentation to correct path
	install -d $(CURDIR)/debian/tmp/usr/share/doc/graphviz/pdf/
	mv $(CURDIR)/debian/tmp/usr/share/doc/graphviz/*.pdf \
		$(CURDIR)/debian/tmp/usr/share/doc/graphviz/pdf/
	# correct HTML path for PDF files
	sed -i 's/\.\.\///;s/doc\//pdf\//' \
		$(CURDIR)/debian/tmp/usr/share/doc/graphviz/index.html
	# Duplicate library
#	rm $(CURDIR)/debian/tmp/usr/lib/tcl*/graphviz/libgv_tcl.so

override_dh_install-arch:
	dh_install --arch
	# NFU
	rm -rf $(CURDIR)/debian/tmp/usr/lib64/

#override_dh_auto_test:
#	dh_auto_test
#	pytest-3

override_dh_compress:
	dh_compress -X.pdf

override_dh_missing:
	dh_missing --list-missing

%:
	dh $@ --with python3 $(N)

.PHONY: override_dh_clean override_dh_autoreconf override_dh_auto_configure \
	override_dh_auto_build-indep \
	override_dh_auto_install override_dh_install-arch \
	override_dh_compress override_dh_missing