#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1

# See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/deepin-icon-theme


# 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 =


%:
	dh $@

override_dh_auto_build:
	$(MAKE) hicolor-links

execute_after_dh_auto_install:
	cp -a ./Sea ./usr/share/icons/hicolor ./debian/deepin-icon-theme/usr/share/icons/
	# https://github.com/linuxdeepin/developer-center/issues/1793
	# https://github.com/linuxdeepin/deepin-icon-theme/commit/15ec0e917a47361d70c20d6415eb1eb2371672d3
	# needs Rules-Requires-Root
	find $(CURDIR)/debian/ -name "* 2.svg" -delete

execute_after_dh_fixperms:
	find $(CURDIR)/debian/ -name '*.svg' -exec chmod -x {} \;
	find $(CURDIR)/debian/ -name '*.theme' -exec chmod -x {} \;

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGELOG.md
