File: rules

package info (click to toggle)
openfst 1.8.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,264 kB
  • sloc: cpp: 50,990; ansic: 5,663; makefile: 535
file content (51 lines) | stat: -rwxr-xr-x 1,591 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
#!/usr/bin/make -f
# -*- makefile -*-
#export DH_VERBOSE=1
export DH_OPTIONS
export LC_ALL=C.UTF-8

include /usr/share/dpkg/architecture.mk

export "DEB_BUILD_MAINT_OPTIONS=hardening=+all optimize=+lto reproducible=+fixfilepath"
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.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-bin --enable-compact-fsts --enable-compress --enable-const-fsts --enable-far --enable-fsts --enable-grm --enable-linear-fsts --enable-lookahead-fsts --enable-mpdt --enable-ngram-fsts --enable-pdt --enable-special --disable-static --with-libfstdir=/usr/lib/$(DEB_HOST_MULTIARCH)/fst/26

override_dh_auto_build:
	mkdir -p debian/manpages_files
	set -e ; for i in debian/addons/man/*.1; do \
		sed -e 's/@DATE@/Dec 2024/g' -e 's/@VERSION@/1.8.4/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_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