File: rules

package info (click to toggle)
link-grammar 5.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 24,604 kB
  • sloc: ansic: 27,839; asm: 11,766; cpp: 6,286; perl: 1,781; python: 1,549; java: 1,275; makefile: 1,246; yacc: 793; lisp: 528; lex: 317; ml: 249; sh: 91; sql: 45; javascript: 5; tcl: 3
file content (67 lines) | stat: -rwxr-xr-x 1,837 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
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# TODO: try re-enable upstream optimizations
# disabled to test if cause of flaky multi-thread test (see bug#975696)
ifeq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
export DEB_CFLAGS_MAINT_STRIP=-O2
export DEB_CXXFLAGS_MAINT_STRIP=-O2
export DEB_CFLAGS_MAINT_APPEND=-O3
export DEB_CXXFLAGS_MAINT_APPEND=-O3
endif

no_java_archs = hppa hurd-i386 kfreebsd-amd64 kfreebsd-i386 m68k sh4
ifneq (,$(filter $(DEB_HOST_ARCH), $(no_java_archs)))
CONFIGURE_ARGS += --disable-java-bindings
endif

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	-rm -rf bin/org
	-rm -f linkgrammar-*.jar

override_dh_autoreconf:
	dh_autoreconf --as-needed

override_dh_auto_configure:
	dh_auto_configure -- \
		--disable-static \
		--enable-pthreads \
		--with-hunspell-dictdir=/usr/share/hunspell \
		$(CONFIGURE_ARGS)

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
override_dh_auto_test:
	dh_auto_test -- || { cat test/test-suite.log; false; }
endif

override_dh_install:
ifeq (,$(filter $(DEB_HOST_ARCH), $(no_java_archs)))
	mkdir -p debian/liblink-grammar-java/usr/lib/$(DEB_HOST_MULTIARCH)/jni
	mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/liblink-grammar-java.so* \
		debian/liblink-grammar-java/usr/lib/$(DEB_HOST_MULTIARCH)/jni
endif
	find debian/ -name "*.la" -delete
	dh_install -Xtests.py
	d-shlibmove --commit \
		--devunversioned \
		--exclude-la \
		--exclude-a \
		--multiarch \
		--movedev "debian/tmp/usr/include/*" usr/include/ \
		--movedev "debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig/*" \
			usr/lib/$(DEB_HOST_MULTIARCH)/pkgconfig \
		debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*.so

override_dh_compress:
	dh_compress --exclude=.py

override_dh_makeshlibs:
	dh_makeshlibs -- -c4