#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --sysconfdir=/etc --disable-static --disable-rpath

override_dh_autoreconf:
	dh_autoreconf $(CURDIR)/autogen.sh

override_dh_auto_install:
	dh_auto_install
	# Clean up unnecessary static libraries for modules
	rm -f debian/scim-chewing/usr/lib/*/scim-1.0/*/*/*.a
	rm -f debian/scim-chewing/usr/lib/*/scim-1.0/*/*/*.la

	# install file for im-switch handling
	install -d $(CURDIR)/debian/scim-chewing/etc/X11/xinit/xinput.d/
	install -m 644 debian/im-switch/scim-chewing debian/scim-chewing/etc/X11/xinit/xinput.d/

override_dh_auto_test:
        # Disabled: Incompelete in po/
