File libs3-Makefile.diff of Package libs3

Index: libs3/GNUmakefile
===================================================================
--- libs3.orig/GNUmakefile
+++ libs3/GNUmakefile
@@ -42,8 +42,10 @@ LIBS3_VER_MAJOR ?= 4
 LIBS3_VER_MINOR ?= 1
 LIBS3_VER := $(LIBS3_VER_MAJOR).$(LIBS3_VER_MINOR)
 
 
+LIB=lib
+
 # -----------------------------------------------------------------------------
 # Determine verbosity.  VERBOSE_SHOW should be prepended to every command which
 # should only be displayed if VERBOSE is set.  QUIET_ECHO may be used to
 # echo text only if VERBOSE is not set.  Typically, a VERBOSE_SHOW command will
@@ -90,9 +92,9 @@ endif
 
 # --------------------------------------------------------------------------
 # LIBDIR directory
 ifndef LIBDIR
-    LIBDIR := ${DESTDIR}/lib
+    LIBDIR := ${DESTDIR}/${LIB}
 endif
 
 # --------------------------------------------------------------------------
 # Compiler CC handling
@@ -129,15 +131,15 @@ endif
 # compiler.
 
 ifndef CFLAGS
     ifdef DEBUG
-        CFLAGS := -g
+        CFLAGS := $(RPM_OPT_FLAGS) -g
     else
-        CFLAGS := -O3
+        CFLAGS := $(RPM_OPT_FLAGS)
     endif
 endif
 
-CFLAGS += -Wall -Werror -Wshadow -Wextra -Iinc \
+CFLAGS += -Wall -Werror -Wshadow -Wextra -Wno-unused -Wno-sign-compare -Iinc \
           $(CURL_CFLAGS) $(LIBXML2_CFLAGS) \
           -DLIBS3_VER_MAJOR=\"$(LIBS3_VER_MAJOR)\" \
           -DLIBS3_VER_MINOR=\"$(LIBS3_VER_MINOR)\" \
           -DLIBS3_VER=\"$(LIBS3_VER)\" \
@@ -197,12 +199,12 @@ uninstall:
 	$(QUIET_ECHO) Installed files: Uninstalling
 	$(VERBOSE_SHOW) \
 	    rm -f $(DESTDIR)/bin/s3 \
               $(DESTDIR)/include/libs3.h \
-              $(DESTDIR)/lib/libs3.a \
-              $(DESTDIR)/lib/libs3.so \
-              $(DESTDIR)/lib/libs3.so.$(LIBS3_VER_MAJOR) \
-              $(DESTDIR)/lib/libs3.so.$(LIBS3_VER)
+              $(DESTDIR)/$(LIB)/libs3.a \
+              $(DESTDIR)/$(LIB)/libs3.so \
+              $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER_MAJOR) \
+              $(DESTDIR)/$(LIB)/libs3.so.$(LIBS3_VER)
 
 
 # --------------------------------------------------------------------------
 # Compile target patterns