Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6
7 include /usr/share/dpkg/architecture.mk
8 DPKG_EXPORT_BUILDFLAGS = 1
9 include /usr/share/dpkg/buildflags.mk
10
11 AUTOGENERATED = graphviz.postinst graphviz.postrm graphviz.triggers libgvc7.postinst
12
13 ifeq ($(DEB_HOST_ARCH_OS),hurd)
14 CONFIGURE_LIBS = LIBS="-Wl,--no-as-needed -Wl,-lpthread -Wl,--as-needed"
15 endif
16
17 ifneq (,$(filter $(DEB_HOST_ARCH), mipsel mips))
18 DEB_CFLAGS_MAINT_APPEND += "-fno-ipa-sra"
19 endif
20
21 N =
22
23 ifeq ($(DEB_HOST_ARCH),ia64)
24 RUBY = --disable-ruby
25 N += -Nlibgv-ruby
26 else
27 RUBY = --enable-ruby
28 endif
29
30 ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
31 PERLVER := $(shell perl -MConfig -e 'print $$Config{version}')
32 export PERL5LIB := /usr/lib/$(DEB_HOST_MULTIARCH)/perl/cross-config-$(PERLVER)
33 endif
34
35 PYTHON3_VERSIONS = $(shell py3versions -r)
36
37 override_dh_clean:
38 dh_clean
39 $(RM) $(patsubst %, debian/%, ${AUTOGENERATED})
40 $(RM) $(CURDIR)/tclpkg/gv/*.pdf $(CURDIR)/cmd/dot/*.pdf
41 $(RM) $(CURDIR)/tclpkg/gv/gv.3*
42 $(RM) $(CURDIR)/configure $(CURDIR)/version.m4
43 $(RM) -r $(CURDIR)/public/
44 find $(CURDIR) -name Makefile.in -delete
45
46 override_dh_autoreconf:
47 $(CURDIR)/autogen.sh NOCONFIG
48 dh_autoreconf
49
50 override_dh_auto_configure:
51 for f in ${AUTOGENERATED} ; do \
52 sed -e 's%@TRIPLET@%${DEB_HOST_MULTIARCH}%g' \
53 < debian/$$f.in \
54 > debian/$$f ; \
55 done
56 dh_auto_configure -- \
57 --disable-silent-rules \
58 --prefix=/usr \
59 --datadir=\$${prefix}/share \
60 --infodir=\$${prefix}/share/info \
61 --mandir=\$${prefix}/share/man \
62 --enable-static \
63 --without-included-ltdl \
64 --with-pangocairo \
65 --with-x \
66 --with-gdk-pixbuf \
67 --with-glut \
68 --with-gnomeui \
69 --without-gtk \
70 --with-poppler \
71 --with-gts \
72 --with-ipsepcola \
73 --with-libgd \
74 --with-qt \
75 --with-rsvg \
76 --with-ann \
77 --with-webp \
78 --with-devil \
79 --without-smyrna \
80 --disable-go \
81 --enable-guile \
82 --enable-lua \
83 --disable-php \
84 $(RUBY) \
85 --enable-tcl \
86 --disable-java \
87 --disable-ocaml \
88 --disable-r \
89 --disable-sharp \
90 --disable-python \
91 --enable-python3 \
92 $(CONFIGURE_LIBS) \
93 $(shell $(dpkg_buildflags) --export=configure)
94
95 override_dh_auto_build-indep:
96 dh_auto_build --indep
97 # still need registered layout module
98 PATH=./cmd/dot/:$(PATH) $(MAKE) doxygen
99
100 override_dh_auto_install:
101 dh_auto_install
102 find $(CURDIR)/debian/tmp/ -name \*.la -delete
103 # move Tcl files to correct path
104 install -d $(CURDIR)/debian/tmp/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/
105 mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/graphviz/tcl \
106 $(CURDIR)/debian/tmp/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/gv
107 # move PDF documentation to correct path
108 install -d $(CURDIR)/debian/tmp/usr/share/doc/graphviz/pdf/
109 mv $(CURDIR)/debian/tmp/usr/share/doc/graphviz/*.pdf \
110 $(CURDIR)/debian/tmp/usr/share/doc/graphviz/pdf/
111 # correct HTML path for PDF files
112 sed -i 's/\.\.\///;s/doc\//pdf\//' \
113 $(CURDIR)/debian/tmp/usr/share/doc/graphviz/index.html
114 # Duplicate library
115 # rm $(CURDIR)/debian/tmp/usr/lib/tcl*/graphviz/libgv_tcl.so
116
117 override_dh_install-arch:
118 dh_install --arch
119 # NFU
120 rm -rf $(CURDIR)/debian/tmp/usr/lib64/
121
122 #override_dh_auto_test:
123 # dh_auto_test
124 # pytest-3
125
126 override_dh_compress:
127 dh_compress -X.pdf
128
129 override_dh_missing:
130 dh_missing --list-missing
131
132 %:
133 dh $@ --with python3 $(N)
134
135 .PHONY: override_dh_clean override_dh_autoreconf override_dh_auto_configure \
136 override_dh_auto_build-indep \
137 override_dh_auto_install override_dh_install-arch \
138 override_dh_compress override_dh_missing