File: rules

package info (click to toggle)
openfst 1.7.9-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,080 kB
  • sloc: cpp: 49,340; ansic: 5,391; sh: 4,451; makefile: 524
file content (53 lines) | stat: -rwxr-xr-x 1,555 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
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1
export DH_OPTIONS
export LC_ALL=C.UTF-8

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk

%:
	dh $@

override_dh_autoreconf:
ifeq ($(DEB_BUILD_ARCH),i386)
	patch -p1 < debian/patches/openfst-sse.diff
else ifeq ($(DEB_BUILD_ARCH),amd64)
	patch -p1 < debian/patches/openfst-sse.diff
endif
	dh_autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --enable-far --enable-pdt --enable-lookahead-fsts --enable-ngram-fsts --enable-const-fsts --enable-compact-fsts --enable-compress --enable-linear-fsts --enable-mpdt --enable-bin --disable-static --with-libfstdir=/usr/lib/$(DEB_HOST_MULTIARCH)/fst/22

override_dh_auto_build:
	mkdir -p debian/manpages_files
	set -e ; for i in debian/addons/man/*.1; do \
		sed -e 's/@DATE@/Jul 2020/g' -e 's/@VERSION@/1.7.9/g' $$i > debian/manpages_files/$$(basename $$i) ; \
	done
	dh_auto_build

override_dh_auto_install:
	dh_auto_install
	find $(CURDIR) -type f -name '*.la' -exec rm -f '{}' \;

override_dh_auto_test:
	# Tests disabled on MIPS
ifeq ($(findstring mips,$(DEB_BUILD_ARCH)),)
	dh_auto_test --max-parallel=2
endif

override_dh_missing:
	dh_missing --fail-missing

override_dh_clean:
ifeq ($(DEB_BUILD_ARCH),i386)
	[ ! -f config.log ] || patch -R -p1 < debian/patches/openfst-sse.diff
else ifeq ($(DEB_BUILD_ARCH),amd64)
	[ ! -f config.log ] || patch -R -p1 < debian/patches/openfst-sse.diff
endif
	$(RM) -r debian/manpages_files
	dh_clean