#!/usr/bin/make -f
# -*- makefile -*-

export DEB_LDFLAGS_MAINT_APPEND := -Wl,--as-needed

DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)

l10npkgs_firstversion_ok := 4:4.14.0-2
include /usr/share/pkg-kde-tools/qt-kde-team/2/l10n-packages.mk

%:
	dh $@ --with kf5,pkgkde_symbolshelper --buildsystem kf5 --without build_stamp

override_dh_install:
ifeq ($(DEB_HOST_ARCH_OS),linux)
	rm debian/kinfocenter/usr/share/kcmview1394/oui.db
endif
	rm debian/kinfocenter/usr/share/kcmusb/usb.ids
	dh_install

override_dh_fixperms:
	dh_fixperms
	chmod 755 debian/kinfocenter/var/lib/ieee-data/update.d/kinfocenter_oui.sh

override_dh_link:
	dh_link
ifeq ($(DEB_HOST_ARCH_OS),linux)
	dh_link /var/lib/ieee-data/kinfocenter_oui.db /usr/share/kcmview1394/oui.db
endif

override_dh_gencontrol: l10npkgs_firstversion_ok
	dh_gencontrol
