Blob Blame History Raw
Patch by Robert Scheck <robert@fedoraproject.org> for ifstatus >= 1.1.0,
which honors $RPM_OPT_FLAGS by default and allows to override all makefile
variables. Using of variables as been also corrected at missing points.

--- ifstatus/Makefile			2005-07-13 03:22:03.000000000 +0200
+++ ifstatus/Makefile.fedora		2009-04-14 00:48:26.000000000 +0200
@@ -3,7 +3,7 @@
 
 GCC = g++
 LDFLAGS = -lncurses
-CFLAGS = -O2 -Wall
+CFLAGS = -O2 -Wall $(RPM_OPT_FLAGS)
 
 BIN = ifstatus
 OBJ = BorderDecorator.o\
@@ -23,9 +23,10 @@
 	Window.o
 	
 
-INSTDIR = /usr/local/bin
-INSTALL=/usr/bin/install
-INSTALL_PARMS=-o 0 -g 0 -s -m 0755
+MKDIR := mkdir -p
+INSTDIR := /usr/local/bin
+INSTALL := /usr/bin/install
+INSTALL_PARMS := -o 0 -g 0 -s -m 0755
 
 all : ifstatus printdone
 
@@ -38,7 +39,8 @@
 clean:
 	rm -f ${BIN} *.o core *~ 
 install:
-	$(INSTALL) $(INSTALL_PARMS) ifstatus /usr/local/bin
+	$(MKDIR) $(DESTDIR)$(INSTDIR)
+	$(INSTALL) $(INSTALL_PARMS) $(BIN) $(DESTDIR)$(INSTDIR)