dkjson: backport makefile from openwrt/packages.git