In file resin-4.0.5-Makefile.patch, "DISTDIR" in the last 2 lines should be "DESTDIR" Reproducible: Always
This is fixed in Resin 4.0.6.