Files
macports-ports/games/galaxis/files/patch-makefile.diff
2024-03-02 17:36:17 -05:00

37 lines
1.1 KiB
Diff

diff -urN a/Makefile b/Makefile
--- a/Makefile 2024-02-08 11:25:35.000000000 +0000
+++ b/Makefile 2024-03-02 20:26:12.000000000 +0000
@@ -8,7 +8,12 @@
# Flags for use with the Linux ncurses package (recommended)
CFLAGS = -g -DNDEBUG
TERMLIB = -lncurses
-CC = gcc
+
+PREFIX ?= /usr
+BINDIR := $(PREFIX)/bin
+MANDIR := $(PREFIX)/share/man/man6
+
+all: galaxis
galaxis: galaxis.c
$(CC) $(CFLAGS) -o galaxis galaxis.c $(TERMLIB)
@@ -25,13 +30,13 @@
asciidoctor -D. -a nofooter -a webfonts! $<
install: galaxis.6 uninstall
- install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
- install -m 755 -o 0 -g 0 galaxis $(ROOT)/usr/bin/galaxis
- install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man6/
- install -m 755 -o 0 -g 0 galaxis.6 $(ROOT)/usr/share/man/man6/galaxis.6
+ install -m 755 -d $(DESTDIR)$(BINDIR)
+ install -m 755 galaxis $(DESTDIR)$(BINDIR)
+ install -m 755 -d $(DESTDIR)$(MANDIR)
+ install -m 755 galaxis.6 $(DESTDIR)$(MANDIR)
uninstall:
- rm -f ${ROOT}/usr/bin/galaxis ${ROOT}/usr/share/man/man6/galaxis.6
+ rm -f $(DESTDIR)$(BINDIR)/galaxis $(DESTDIR)$(MANDIR)/galaxis.6
clean:
rm -f galaxis galaxis.6 galaxis-*.tar.gz *~ *.html