[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdegames
From:       Heinrich Wendel <h_wendel () cojobo ! net>
Date:       2006-04-12 21:20:37
Message-ID: 1144876837.094415.16477.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 529243 by lanius:

make kreversi and knetwalk global highscore aware

 M  +48 -0     knetwalk/src/Makefile.am  
 M  +49 -0     kreversi/Makefile.am  


--- branches/KDE/3.5/kdegames/knetwalk/src/Makefile.am #529242:529243
@@ -19,3 +19,51 @@
 messages: rc.cpp
 	$(XGETTEXT) rc.cpp *.cpp -o $(podir)/knetwalk.pot
 
+# for system-wide highscore file
+DESTBIN = $(DESTDIR)$(bindir)/$(bin_PROGRAMS)
+DESTHIGHSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)
+DESTSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)/$(bin_PROGRAMS).scores
+
+install-data-local:
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	  echo "********************************************************" ;\
+	  echo "" ;\
+	  echo "This game is installed sgid \"games\" to use the" ;\
+	  echo "system-wide highscore file (in "$(HIGHSCORE_DIRECTORY)")." ;\
+	  echo "" ;\
+	  echo "If the system-wide highscore file does not exist, it is" ;\
+          echo "created with the correct ownership and permissions. See the" ;\
+          echo "INSTALL file in \"kdegames/libkdegames/highscore\" for details." ;\
+	  echo "" ;\
+	  echo "********************************************************" ;\
+	fi 
+
+install-exec-hook:
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	  chown $(highscore_user):$(highscore_group) $(DESTBIN) \
+	  || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+		mkdir -p $(DESTHIGHSCORES) && \
+		chown $(highscore_user):$(highscore_group) $(DESTHIGHSCORES) \
+		&& chmod 750 $(DESTHIGHSCORES) \
+	        || echo "Error: Could not create the highscore directory with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	   chown $(highscore_user):$(highscore_group) $(DESTBIN) \
+	   || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test ${setgid} = true; then \
+	   chmod 2755  $(DESTBIN) \
+	   || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	   touch $(DESTSCORES) && chown $(highscore_user):$(highscore_group) $(DESTSCORES) \
+	   && chmod 0660 $(DESTSCORES) \
+	   || echo "Error: Could not create system-wide highscore file with correct permissions !!" ;\
+	fi
+
--- branches/KDE/3.5/kdegames/kreversi/Makefile.am #529242:529243
@@ -50,3 +50,52 @@
 
 messages: rc.cpp
 	$(XGETTEXT) *.cpp -o $(podir)/kreversi.pot
+
+# for system-wide highscore file
+DESTBIN = $(DESTDIR)$(bindir)/$(bin_PROGRAMS)
+DESTHIGHSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)
+DESTSCORES = $(DESTDIR)$(HIGHSCORE_DIRECTORY)/$(bin_PROGRAMS).scores
+
+install-data-local:
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	  echo "********************************************************" ;\
+	  echo "" ;\
+	  echo "This game is installed sgid \"games\" to use the" ;\
+	  echo "system-wide highscore file (in "$(HIGHSCORE_DIRECTORY)")." ;\
+	  echo "" ;\
+	  echo "If the system-wide highscore file does not exist, it is" ;\
+          echo "created with the correct ownership and permissions. See the" ;\
+          echo "INSTALL file in \"kdegames/libkdegames/highscore\" for details." ;\
+	  echo "" ;\
+	  echo "********************************************************" ;\
+	fi 
+
+install-exec-hook:
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	  chown $(highscore_user):$(highscore_group) $(DESTBIN) \
+	  || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+		mkdir -p $(DESTHIGHSCORES) && \
+		chown $(highscore_user):$(highscore_group) $(DESTHIGHSCORES) \
+		&& chmod 750 $(DESTHIGHSCORES) \
+	        || echo "Error: Could not create the highscore directory with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	   chown $(highscore_user):$(highscore_group) $(DESTBIN) \
+	   || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test ${setgid} = true; then \
+	   chmod 2755  $(DESTBIN) \
+	   || echo "Error: Could not install the game with correct permissions !!" ;\
+	fi
+
+	@if test x$(HIGHSCORE_DIRECTORY) != x; then \
+	   touch $(DESTSCORES) && chown $(highscore_user):$(highscore_group) $(DESTSCORES) \
+	   && chmod 0660 $(DESTSCORES) \
+	   || echo "Error: Could not create system-wide highscore file with correct permissions !!" ;\
+	fi
+
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic