#!/usr/bin/make -f # -*- makefile -*- # Copyright © 2021, Ryan Pavlik # Copyright © 2010-2019 Stephen Kitt # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation, either version 2.1 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . include /usr/share/dpkg/pkg-info.mk include /usr/share/dpkg/architecture.mk # export DH_VERBOSE = 1 target := i686-w64-mingw32 builddir := debian/build/$(target) src_from_build := ../../.. destdir := usr/share/virt-tools # relro doesn't work with mingw builds export DEB_BUILD_MAINT_OPTIONS=hardening=-relro # allow 64 bit address space export DEB_CFLAGS_MAINT_APPEND=-Wl,--large-address-aware # reproducibility and static linking for standalone usage export DEB_LDFLAGS_MAINT_APPEND=-Xlinker --no-insert-timestamp -static %: dh $@ --with autoreconf --builddirectory=$(builddir) override_dh_auto_configure: mkdir -p $(builddir) cd $(builddir) && \ $(src_from_build)/configure \ --build=$(DEB_BUILD_GNU_TYPE) \ --host=$(target) --target=$(target) \ --bin=/$(destdir) \ $(shell dpkg-buildflags --export=cmdline) # Overridden so we verify the right files got installed. override_dh_auto_install: test -f $(builddir)/pnp_wait/pnp_wait.exe test -f $(builddir)/RHSrvAny/rhsrvany.exe dh_auto_install --builddirectory=$(builddir) test -f debian/rhsrvany/$(destdir)/pnp_wait.exe test -f debian/rhsrvany/$(destdir)/rhsrvany.exe