From 4b37219a2e44b9b6f6feb3edfb0e9cd6fdf430d4 Mon Sep 17 00:00:00 2001 From: Gernot Tenchio Date: Tue, 11 Jan 2011 14:27:13 +0100 Subject: [PATCH] dhcprelay: added proper install target --- network/dhcprelay/dhcprelay-1.2-make.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 network/dhcprelay/dhcprelay-1.2-make.patch diff --git a/network/dhcprelay/dhcprelay-1.2-make.patch b/network/dhcprelay/dhcprelay-1.2-make.patch new file mode 100644 index 000000000..7da10d0fd --- /dev/null +++ b/network/dhcprelay/dhcprelay-1.2-make.patch @@ -0,0 +1,28 @@ +diff -up dhcprelay-1.2/Makefile.make dhcprelay-1.2/Makefile +--- dhcprelay-1.2/Makefile.make 2006-03-21 03:46:28.000000000 +0100 ++++ dhcprelay-1.2/Makefile 2011-01-11 13:41:19.351123143 +0100 +@@ -1,8 +1,22 @@ ++CC = gcc ++CFLAGS = -O2 -Wall -W -D_BSD_SOURCE ++LIBS = -lpcap -ldnet ++ ++prefix=/usr/local ++sbindir=$(prefix)/sbin ++ ++all: dhcprelay ++ + dhcprelay: dhcprelay.o +- gcc -g -o $@ -Wall -L/usr/local/lib -lpcap -ldnet $> ++ $(CC) $(LDFLAGS) -g -o $@ -Wall -L/usr/local/lib $< $(LIBS) + + dhcprelay.o: dhcprelay.c +- gcc -g -c -o $@ -Wall -I/usr/local/include $< ++ $(CC) $(CFLAGS) -g -c -o $@ -Wall -I/usr/local/include $< + + clean: + rm -f dhcprelay.o dhcprelay dhcprelay.core ++ ++install: ++ mkdir -p $(DESTDIR)$(sbindir) ++ chmod 755 dhcprelay ++ cp -f dhcprelay $(DESTDIR)$(sbindir)