File: rules

package info (click to toggle)
rhsrvany 1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: ansic: 509; makefile: 31; sh: 5
file content (55 lines) | stat: -rwxr-xr-x 1,938 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
#!/usr/bin/make -f
# -*- makefile -*-
# Copyright © 2021, Rylie Pavlik <rylie@ryliepavlik.com>
# Copyright © 2010-2019 Stephen Kitt <steve@sk2.org>
#
# 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 <http://www.gnu.org/licenses/>.


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