#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#DH_VERBOSE = 1

TARGET_DIR=/opt/pycharm-community-sloppy
TARGET_PKG_DIR=debian/pycharm-community-sloppy$(TARGET_DIR)

# main packaging script based on dh7 syntax
%:
	dh $@

override_dh_auto_install:
	cp -Lrp $$(/bin/ls | grep -v debian) $(TARGET_PKG_DIR)
	chmod a+rX -R $(TARGET_PKG_DIR)
	# Clean up a bit
	find $(TARGET_PKG_DIR)  -iname '*.dll' -o -iname '*.exe' -o -iname '*-arm' -delete
	ln -s $(TARGET_DIR)/bin/pycharm.sh debian/pycharm-community-sloppy/usr/bin/pycharm

override_dh_strip_nondeterminism:
	: # do not do any stripping -- too lengthy and probably not worthwhile here

override_dh_shlibdeps:
	: # do nothing since uses embedded copies of th libraries etc

override_dh_strip:
	: # do nothing - dh_strip freaks out on some files and this one is a sloppy one

