File pachi_scores.patch of Package pachi

commit 1ed1a125fdcd37dd1a7a87c647a55792f3778919
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date:   Thu Dec 11 10:12:14 2025 +0100

    Change score dir

diff --git a/data/Makefile.am b/data/Makefile.am
index a61da49..4f4fc7d 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -16,7 +16,7 @@ scores.dat
 EXTRA_DIST = $(dat_DATA) $(score_DATA)
 
 install-data-local:
+	mkdir -p $(DESTDIR)$(scoredir)
 	for file in $(score_DATA); do\
-	    chgrp $(group) $(scoredir)/$$file; \
-	    chmod $(perms) $(scoredir)/$$file; \
+	    install -p -m $(perms) $$file $(DESTDIR)$(scoredir)/ ; \
 	done					    
diff --git a/src/file.c b/src/file.c
index 2338b83..7b2d53f 100644
--- a/src/file.c
+++ b/src/file.c
@@ -96,7 +96,7 @@ void load_hiscoredata()
     LoadT(&scorefont,DATADIR"/fonts/font16b.T");
     LoadT(&scorefont1,DATADIR"/fonts/font16d.T");
 
-    FILE *file = fopen(SCOREDIR"/data/scores.dat","rb");
+    FILE *file = fopen("/var/games/pachi.scores","rb");
     for(int a=0; a < 10; a++)
     {
 	for(int b=0; b < 10; b++)
@@ -124,7 +124,7 @@ void unload_hiscoredata()
 }
 void save_hiscoredata()
 {
-    FILE *file = fopen(SCOREDIR"/data/scores.dat","rb+");
+    FILE *file = fopen("/var/games/pachi.scores","rb+");
 
     for(int a=0;a<10;a++)
     {    
openSUSE Build Service is sponsored by