#!/usr/bin/make -f

#export DH_VERBOSE=1
#
# Uncomment to check dependencies during build:
# export GEM2DEB_TEST_RUNNER = --check-dependencies

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

export DEB_VERSION_UPSTREAM

%:
	dh $@ --buildsystem=ruby --with ruby

# Disable as it removes files in under ext/fox16_c/
override_dh_auto_clean:


execute_after_dh_fixperms:
	chmod 644 debian/ruby-fxruby/usr/share/doc/ruby-fxruby/examples/*.rb
	chmod 644 debian/ruby-fxruby/usr/share/doc/ruby-fxruby/examples/README
	chmod 644 debian/ruby-fxruby/usr/share/doc/ruby-fxruby/examples/textedit/*.rb
	chmod 644 debian/ruby-fxruby/usr/share/doc/ruby-fxruby/examples/icons/*.ico
	chmod 644 debian/ruby-fxruby/usr/lib/ruby/vendor_ruby/fox16/*.rb

override_dh_dwz:
	# fails with dwz: debian/ruby-fxruby/usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.5.0/fox16_c.so: DWARF version 0 unhandled
