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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/python/python.mk
AUTOGENERATED = libgvc6.postrm
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
PYTHON_VERSIONS = $(shell pyversions -r)
PYTHON3_VERSIONS = $(shell py3versions -r)
# sonames for various libraries
SO_CGRAPH = 6
SO_CDT = 5
SO_GVC = 6
SO_PATHPLAN = 4
SO_XDOT = 4
SO_GVPR = 2
SO_LAB-GAMUT = 1
PHP_EXTENSION_DIR = $(shell php-config --extension-dir)
PHP_PACKAGE = $(CURDIR)/debian/libgv-php7
override_dh_clean:
dh_clean
rm -f $(patsubst %, debian/%, ${AUTOGENERATED})
rm -f $(CURDIR)/tclpkg/gv/*.pdf
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 \
--disable-static \
--without-included-ltdl \
--with-pangocairo \
--with-x \
--with-gdk-pixbuf \
--with-gnomeui \
--with-gtk \
--with-gts \
--without-ipsepcola \
--with-rsvg \
--enable-guile \
--enable-lua \
--enable-php \
--enable-ruby \
--enable-tcl \
--disable-java \
--disable-r \
--disable-sharp \
--enable-python2 \
--enable-python3 \
$(CONFIGURE_LIBS) \
$(shell $(dpkg_buildflags) --export=configure)
override_dh_auto_test:
echo Self tests are buggy
override_dh_auto_install:
dh_auto_install
find $(CURDIR)/debian/tmp/ -name \*.la -delete
# Duplicate library
rm $(CURDIR)/debian/tmp/usr/lib/lua/gv.so
rm $(CURDIR)/debian/tmp/usr/lib/tcl*/graphviz/libgv_tcl.so
override_dh_install-arch:
dh_install --arch
mv $(CURDIR)/debian/libgvc$(SO_GVC)/usr/sbin/dot \
$(CURDIR)/debian/libgvc$(SO_GVC)/usr/sbin/libgvc$(SO_GVC)-config-update
# Symlink dot due to #868546 (debug packages conflict)
rm $(CURDIR)/debian/graphviz/usr/bin/dot
ln -s /usr/sbin/libgvc$(SO_GVC)-config-update \
$(CURDIR)/debian/graphviz/usr/bin/dot
override_dh_install-indep:
dh_install --indep
# Remove duplicate changelog
rm -f $(CURDIR)/debian/graphviz-doc/usr/share/doc/graphviz/ChangeLog
%:
dh $@ --with python2,python3
.PHONY: override_dh_clean override_dh_auto_configure override_dh_auto_test \
override_dh_auto_install override_dh_install-arch \
override_dh_install-indep
|