File aop-Makefile.patch of Package aop

--- Makefile.orig	2015-12-02 20:24:06.948137032 +0100
+++ Makefile	2015-12-02 20:27:39.028599460 +0100
@@ -1,13 +1,18 @@
+PREFIX = /usr
+BINDIR = $(PREFIX)/bin
+DATADIR = $(PREFIX)/share
+DESTDIR =
 
-LDFLAGS = -lncurses
+LIBS = $(shell ncurses6-config --libs)
 
 aop: aop.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
 
 install: aop
-	install -d /usr/local/bin
-	install -d /usr/local/share/aop
-	install -m 755 aop /usr/local/bin/aop
-	install -m 644 aop-level-*.txt /usr/local/share/aop/
+	install -d $(DESTDIR)$(BINDIR)
+	install -d $(DESTDIR)$(DATADIR)/aop
+	install -m 755 aop $(DESTDIR)$(BINDIR)/aop
+	install -m 644 aop-level-*.txt $(DESTDIR)$(DATADIR)/aop/
 
 clean:
 	rm -f aop core* *~
openSUSE Build Service is sponsored by