The original patch was broken since a85e19a5e1 because an `APPNAME` variable was introduced there.
a85e19a5e1