From 23454acb66be2a88647262d98d50e0f115519ea0 Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Sun, 28 Mar 2021 14:39:02 -0400 Subject: Use PREFIX now --- phantasia/Makefile | 10 +++++----- phantasia/pathnames.h | 20 +++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'phantasia') diff --git a/phantasia/Makefile b/phantasia/Makefile index 3792164c..c0a4484a 100644 --- a/phantasia/Makefile +++ b/phantasia/Makefile @@ -5,7 +5,7 @@ PROG= phantasia SRCS= fight.c gamesupport.c interplayer.c io.c main.c misc.c phantglobs.c MAN= phantasia.6 -FILESDIR=/var/games/phantasia +FILESDIR=$(LOCALSTATEDIR)/games/phantasia FILESMODE=0660 ALLFILES=gold lastdead mess monsters void motd characs scoreboard FILES=gold lastdead mess monsters void motd @@ -21,7 +21,7 @@ files.stamp: mkdata monsters.asc touch files.stamp mkdata: phantglobs.c setup.c - clang -o mkdata phantglobs.c setup.c + clang -o mkdata phantglobs.c setup.c -I$(ROOT) # Make Phantasia map. Change the map commands reflect your installation. # PLOTDEVICE is used for plotting the map. Change as appropriate. @@ -31,14 +31,14 @@ map: map.c ./map | plot > /dev/tty $(PROG): $(SRCS) - $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw + $(CC) $(CFLAGS) $(LDFLAGS) -o $(PROG) $(SRCS) -lncursesw -I$(ROOT) $(STRIP) $(PROG) $(ALLFILES): $(FILES) install: $(PROG) $(MAN) $(ALLFILES) - $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/usr/games/$(PROG) - $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/usr/share/man/man6/$(MAN) + $(GINSTALL) -Dm2755 $(PROG) $(DESTDIR)/$(PREFIX)/games/$(PROG) + $(GINSTALL) -Dm644 $(MAN) $(DESTDIR)/$(PREFIX)/share/man/man6/$(MAN) $(GINSTALL) -d $(DESTDIR)$(FILESDIR) $(GINSTALL) -Dm$(FILESMODE) $(ALLFILES) $(DESTDIR)$(FILESDIR) diff --git a/phantasia/pathnames.h b/phantasia/pathnames.h index af287785..5bfc3bc0 100644 --- a/phantasia/pathnames.h +++ b/phantasia/pathnames.h @@ -31,12 +31,14 @@ * @(#)pathnames.h 8.2 (Berkeley) 4/2/94 */ -#define _PATH_GAMEPROG "/usr/games/phantasia" -#define _PATH_GOLD "/var/games/phantasia/gold" -#define _PATH_LASTDEAD "/var/games/phantasia/lastdead" -#define _PATH_MESS "/var/games/phantasia/mess" -#define _PATH_MONST "/var/games/phantasia/monsters" -#define _PATH_MOTD "/var/games/phantasia/motd" -#define _PATH_PEOPLE "/var/games/phantasia/characs" -#define _PATH_SCORE "/var/games/phantasia/scoreboard" -#define _PATH_VOID "/var/games/phantasia/void" +#include "config.h" + +#define _PATH_GAMEPROG PREFIX"/games/phantasia" +#define _PATH_GOLD LOCALSTATEDIR"/games/phantasia/gold" +#define _PATH_LASTDEAD LOCALSTATEDIR"/games/phantasia/lastdead" +#define _PATH_MESS LOCALSTATEDIR"/games/phantasia/mess" +#define _PATH_MONST LOCALSTATEDIR"/games/phantasia/monsters" +#define _PATH_MOTD LOCALSTATEDIR"/games/phantasia/motd" +#define _PATH_PEOPLE LOCALSTATEDIR"/games/phantasia/characs" +#define _PATH_SCORE LOCALSTATEDIR"/games/phantasia/scoreboard" +#define _PATH_VOID LOCALSTATEDIR"/games/phantasia/void" -- cgit v1.2.3-56-ge451