#!/usr/bin/make -f # Copyright © 2019 Collabora Ltd. # SPDX-License-Identifier: MIT # (see debian/copyright) export LC_ALL=C.UTF-8 include /usr/share/dpkg/default.mk ifeq ($(shell dpkg --compare-versions `c++ -dumpversion || echo 0` ge 4.8 || echo old),old) export CXX = g++-4.8 endif gtk_doc_has_cflags := $(shell \ if gtkdoc-scangobj --help 2>&1 | grep '[-]-cflags' >/dev/null; then \ echo true; \ else \ echo false; \ fi \ ) dh_options := ifeq ($(gtk_doc_has_cflags),false) dh_options += -Nlibsteam-runtime-tools-0-doc endif %: dh $@ $(dh_options) # We open-code the Meson clean, configure, build, test, install steps # because the debhelper in SteamRT 1 'scout' is too old to have built-in # knowledge of Meson. override_dh_auto_clean: rm -fr builddir rm -fr debian/locales override_dh_auto_configure: meson builddir \ --prefix=/usr \ --libexecdir=/usr/libexec \ -Dgtk_doc=$(gtk_doc_has_cflags) \ -Dintrospection=false \ $(NULL) override_dh_auto_build: ninja -C builddir override_dh_auto_test: ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),) mkdir debian/locales localedef -f UTF-8 -i en_US --no-archive debian/locales/en_US.UTF-8 env LOCPATH=$(CURDIR)/debian/locales LC_ALL=en_US.UTF-8 \ meson test -C builddir --verbose endif override_dh_auto_install: DESTDIR=$(CURDIR)/debian/tmp ninja -C builddir install override_dh_missing: dh_missing --fail-missing