#!/usr/bin/make -f

# See debhelper(7) (uncomment to enable).
# Output every command that modifies files on the build system.

include /usr/share/dpkg/pkg-info.mk

#export DH_VERBOSE = 1

export TDIR=debian/pycharm-community

# See FEATURE AREAS in dpkg-buildflags(1).
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# See ENVIRONMENT in dpkg-buildflags(1).
# Package maintainers to append CFLAGS.
#export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
# Package maintainers to append LDFLAGS.
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
	dh $@


# dh_make generated override targets.
# This is an example for Cmake (see <https://bugs.debian.org/641051>).
#override_dh_auto_configure:
#	dh_auto_configure -- \
#	-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

override_dh_install:
	dh_install
	find $(TDIR) -exec touch {} +
ifeq ($(DEB_BUILD_ARCH),amd64)
	rm $(TDIR)/usr/share/pycharm/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_x86.so
	rm -Rf $(TDIR)/usr/share/pycharm/lib/pty4j-native/linux/x86
else
	rm $(TDIR)/usr/share/pycharm/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_amd64.so
	rm $(TDIR)/usr/share/pycharm/bin/pycharm64.vmoptions
	rm -Rf $(TDIR)/usr/share/pycharm/lib/pty4j-native/linux/x86_64
	rm -Rf $(TDIR)/usr/share/pycharm/lib/native/linux-x86_64
endif
	rm -Rf $(TDIR)/usr/share/pycharm/plugins/cwm-plugin/quiche-native/linux-aarch64/libquiche.so
	rm -Rf $(TDIR)/usr/share/pycharm/plugins/python-ce/helpers/pydev/pydevd_attach_to_process/attach_linux_aarch64.so

override_dh_strip_nondeterminism:
	dh_strip_nondeterminism -Xjar

override_dh_dwz:

override_dh_shlibdeps: