Created
April 26, 2013 18:12
-
-
Save liangqi/5469225 to your computer and use it in GitHub Desktop.
The patch for Makefile in fairymax-4.8S.tar.gz, used by homebrew.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u a/Makefile b/Makefile | |
--- a/Makefile | |
+++ b/Makefile | |
@@ -2,8 +2,8 @@ | |
CC?=gcc | |
CFLAGS?= -O2 -s | |
-INI_F?=$(DESTDIR)/usr/share/games/fairymax/fmax.ini | |
-INI_Q?=$(DESTDIR)/usr/share/games/fairymax/qmax.ini | |
+INI_F?=$(DESTDIR)/share/games/fairymax/fmax.ini | |
+INI_Q?=$(DESTDIR)/share/games/fairymax/qmax.ini | |
ALL= fairymax shamax maxqi fairymax.6.gz | |
@@ -20,13 +20,19 @@ | |
$(CC) $(CFLAGS) -DINI_FILE=\"${INI_Q}\" maxqi.c -o maxqi | |
install: ${ALL} ${srcdir}/data/* | |
- cp -u ${srcdir}/fairymax $(DESTDIR)/usr/games | |
- cp -u ${srcdir}/shamax $(DESTDIR)/usr/games | |
- cp -u ${srcdir}/maxqi $(DESTDIR)/usr/games | |
- install -d -m0755 $(DESTDIR)/usr/share/games/fairymax | |
- cp -u ${srcdir}/data/* $(DESTDIR)/usr/share/games/fairymax | |
- install -d -m0755 $(DESTDIR)/usr/share/man/man6 | |
- cp -u ${srcdir}/fairymax.6.gz $(DESTDIR)/usr/share/man/man6 | |
+ test -d $(DESTDIR) || mkdir $(DESTDIR) | |
+ test -d $(DESTDIR)/bin || mkdir $(DESTDIR)/bin | |
+ test -d $(DESTDIR)/share || mkdir $(DESTDIR)/share | |
+ test -d $(DESTDIR)/share/games || mkdir $(DESTDIR)/share/games | |
+ test -d $(DESTDIR)/share/man || mkdir $(DESTDIR)/share/man | |
+ test -d $(DESTDIR)/share/man/man6 || mkdir $(DESTDIR)/share/man/man6 | |
+ cp ${srcdir}/fairymax $(DESTDIR)/bin | |
+ cp ${srcdir}/shamax $(DESTDIR)/bin | |
+ cp ${srcdir}/maxqi $(DESTDIR)/bin | |
+ install -d -m0755 $(DESTDIR)/share/games/fairymax | |
+ cp ${srcdir}/data/* $(DESTDIR)/share/games/fairymax | |
+ install -d -m0755 $(DESTDIR)/share/man/man6 | |
+ cp ${srcdir}/fairymax.6.gz $(DESTDIR)/share/man/man6 | |
fairymax.6.gz: fairymax.pod | |
pod2man -s 6 fairymax.pod > fmax.man | |
@@ -55,10 +61,10 @@ | |
rmdir Fairy-Max | |
uninstall: | |
- rm -f $(DESTDIR)/usr/share/games/fairymax/* | |
- rmdir $(DESTDIR)/usr/share/games/fairymax | |
- rm -f $(DESTDIR)/usr/share/man/man6/fairymax.6.gz | |
- rm -f $(DESTDIR)/usr/games/fairymax | |
- rm -f $(DESTDIR)/usr/games/shamax | |
- rm -f $(DESTDIR)/usr/games/maxqi | |
+ rm -f $(DESTDIR)/share/games/fairymax/* | |
+ rmdir $(DESTDIR)/share/games/fairymax | |
+ rm -f $(DESTDIR)/share/man/man6/fairymax.6.gz | |
+ rm -f $(DESTDIR)/bin/fairymax | |
+ rm -f $(DESTDIR)/bin/shamax | |
+ rm -f $(DESTDIR)/bin/maxqi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment