files/nbd-2.8.2-gznbd.patch should have LDFLAGS after the object.
+ $(CC) $(CFLAGS) $< -o $@ $(LDFLAGS)
rather than before
+ $(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
erm, not quite ... problem is that LDFLAGS should not contain libs
Fix it up however you want, this worked for me. Make a new LIBS var if you like for -lz, and tag that after.
fixed patch to use LDLIBS and to use implicit make rules (which handles LDFLAGS/LDLIBS ordering)