rules 1.14 KB
Newer Older
1 2
#!/usr/bin/make -f

3 4
include /usr/share/dpkg/architecture.mk

Jeremy Bicha's avatar
Jeremy Bicha committed
5
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Jeremy Bicha's avatar
Jeremy Bicha committed
6
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
7

8 9 10 11 12
no_java_archs = hppa hurd-i386 m68k sh4
ifneq (,$(filter $(DEB_HOST_ARCH), $(no_java_archs)))
CONFIGURE_ARGS += --disable-java-bindings
endif

Jeremy Bicha's avatar
Jeremy Bicha committed
13
%:
14
	dh $@ --with python2,python3
15

16
override_dh_auto_clean:
17
	dh_auto_clean
18 19
	-rm -r bin/org
	-rm linkgrammar-*.jar
20

Jeremy Bicha's avatar
Jeremy Bicha committed
21
override_dh_auto_configure:
22 23
	dh_auto_configure -- \
		--disable-static \
24
		--enable-pthreads \
25 26
		--with-hunspell-dictdir=/usr/share/hunspell \
		$(CONFIGURE_ARGS)
Jeremy Bicha's avatar
Jeremy Bicha committed
27

28 29 30
override_dh_autoreconf:
	dh_autoreconf --as-needed

31
override_dh_install:
32
ifeq (,$(filter $(DEB_HOST_ARCH), $(no_java_archs)))
33 34 35
	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
36
endif
37
	find debian/ -name "*.la" -delete
Fabian Wolff's avatar
Fabian Wolff committed
38 39 40 41
	dh_install

override_dh_missing:
	dh_missing --fail-missing
42

43 44 45
override_dh_compress:
	dh_compress --exclude=.py

Jeremy Bicha's avatar
Jeremy Bicha committed
46 47 48
override_dh_makeshlibs:
	dh_makeshlibs -- -c4

Jeremy Bicha's avatar
Jeremy Bicha committed
49
override_dh_auto_test:
50
# We use autopkgtest instead