File bigsync-makefile.patch of Package bigsync

--- Makefile.orig	2011-04-10 23:26:37.000000000 +0200
+++ Makefile	2011-04-10 23:33:14.000000000 +0200
@@ -1,21 +1,27 @@
 VERSION=0.0.7
-CC=gcc -Wall -O3 -funroll-loops
+CC=gcc
+OPTFLAGS=-O3
+CFLAGS=-Wall -funroll-loops $(OPTFLAGS)
+DESTDIR=
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
+MANDIR=$(PREFIX)/man
 
 all: bigsync
 
 dev: bigsync randombreak truncates
 
 bigsync: bigsync.o md4.o hr.o
-	$(CC) -o bigsync bigsync.o md4.o hr.o
+	$(CC) $(CFLAGS) -o bigsync bigsync.o md4.o hr.o
 
 bigsync.o: bigsync.c
-	$(CC) -c bigsync.c -DVERSION=\"$(VERSION)\"
+	$(CC) $(CFLAGS) -c bigsync.c -DVERSION=\"$(VERSION)\"
 
 md4.o: md4.c md4.h
-	$(CC) -c md4.c
+	$(CC) $(CFLAGS) -c md4.c
 
 hr.o: hr.c hr.h
-	$(CC) -c hr.c
+	$(CC) $(CFLAGS) -c hr.c
 
 clean:
 	rm -f bigsync md4.o bigsync.o hr.o test/randombreak test/truncates 
@@ -27,10 +33,8 @@
 	$(CC) -o test/truncates test/truncates.c
 
 install: bigsync
-	strip bigsync
-	cp bigsync /usr/local/bin/
-	mkdir -p /usr/local/man/man1/
-	cp bigsync.1 /usr/local/man/man1/
+	install -D -m0755 bigsync $(DESTDIR)$(BINDIR)/bigsync
+	install -D -m0644 bigsync.1 $(DESTDIR)$(MANDIR)/man1/bigsync.1
 
 dist:
 	mkdir bigsync-$(VERSION)
openSUSE Build Service is sponsored by