File: rules

package info (click to toggle)
tidy-html5 2%3A5.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,668 kB
  • sloc: ansic: 43,061; ruby: 1,368; sh: 404; xml: 225; cpp: 30; makefile: 26
file content (46 lines) | stat: -rwxr-xr-x 1,248 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
#! /usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# see FEATURE AREAS in dpkg-buildflags(1)
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND =

include /usr/share/dpkg/default.mk

# We use workaround to deal with cross compilation for man pages.
# This will build tidy-html5 twice.
#
# See https://bugs.debian.org/875429

NATIVE=eval $$(dpkg-architecture -f -a$(DEB_BUILD_ARCH) -s);

CONFIGURE_FLAGS = \
        -DTIDY_CONSOLE_SHARED:BOOL=YES \
        -DTIDY_COMPAT_HEADERS:BOOL=YES \
        -DTIDY_CONFIG_FILE:STRING=/etc/tidy.conf \
        -DTIDY_USER_CONFIG_FILE:STRING=~/.tidyrc


%:
	dh $@


override_dh_auto_configure:
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
	$(NATIVE) dh_auto_configure --builddirectory=build-native -- $(CONFIGURE_FLAGS)
	dh_auto_configure -- $(CONFIGURE_FLAGS) -DXSLTPROC_FOUND:BOOL=Off
else
	dh_auto_configure -- $(CONFIGURE_FLAGS)
endif

ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
execute_before_dh_auto_build:
	$(NATIVE) dh_auto_build --builddirectory=build-native
endif

ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
execute_before_dh_auto_install:
	install -D -m644 build-native/tidy.1 debian/tmp/usr/share/man/man1/tidy.1
endif