In the spec file of zip-2.3-4, the %build section is: > make -f unix/Makefile prefix=/usr "RPM_OPT_FLAGS=$RPM_OPT_FLAGS" generic_gcc The definition of RPM_OPT_FLAGS is of absolutely no use, as that string is totally unknown in the package (and the patch). I suggest using $LOCAL_ZIP ($(LOCAL_ZIP) in the unix/Makefile), as it is otherwise unused, and as redefining CFLAGS conflicts with some other flags (-I. -DUNIX would have to be added). Unless of course, the "-O2" of the original CFLAGS aren't overridden by the RPM_OPT_FLAGS, which I unfortunately couldn't read out of the gcc documentation. > make -f unix/Makefile prefix=/usr LOCAL_ZIP="$RPM_OPT_FLAGS" generic_gcc or > make -f unix/Makefile prefix=/usr CFLAGS="$RPM_OPT_FLAGS -I. -DUNIX" generic_gcc While you're at it, make "prefix=/usr" to "prefix=%{prefix}" (and replace it in all the other places) - it _is_ defined in the spec file's header already.
Fixed in zip-2.3-5.