File paths.patch of Package crafty
diff -Naur crafty-23.4.orig/annotate.c crafty-23.4/annotate.c
--- crafty-23.4.orig/annotate.c 2010-11-08 20:07:43.000000000 +0200
+++ crafty-23.4/annotate.c 2013-07-20 21:31:58.345197694 +0300
@@ -568,7 +568,7 @@
for (rank = RANK8; rank >= RANK1; rank--) {
fprintf(annotate_out, "<TR>\n");
for (file = FILEA; file <= FILEH; file++) {
- (void) strcpy(filename, "bitmaps/");
+ (void) strcpy(filename, "/usr/share/crafty/bitmaps/");
if ((rank + file) % 2)
(void) strcat(filename, "w");
else
diff -Naur crafty-23.4.orig/chess.h crafty-23.4/chess.h
--- crafty-23.4.orig/chess.h 2010-11-08 20:07:43.000000000 +0200
+++ crafty-23.4/chess.h 2013-07-20 21:32:19.666512508 +0300
@@ -110,16 +110,16 @@
# define UNIX /* system is unix-based */
# endif
# if !defined(BOOKDIR)
-# define BOOKDIR "."
+# define BOOKDIR "/usr/share/crafty"
# endif
# if !defined(LOGDIR)
# define LOGDIR "."
# endif
# if !defined(TBDIR)
-# define TBDIR "./TB"
+# define TBDIR "/usr/share/crafty/TB"
# endif
# if !defined(RCDIR)
-# define RCDIR "."
+# define RCDIR "/etc"
# endif
# define MAXPLY 65
# define MAX_TC_NODES 1000000
@@ -684,7 +684,7 @@
# include "inline32.h"
# endif
# if defined(UNIX)
-# define SPEAK "./speak "
+# define SPEAK "/usr/bin/crafty-speak "
# else
# define SPEAK ".\\Speak.exe "
# endif
diff -Naur crafty-23.4.orig/option.c crafty-23.4/option.c
--- crafty-23.4.orig/option.c 2010-11-08 20:07:43.000000000 +0200
+++ crafty-23.4/option.c 2013-07-20 21:31:58.347197724 +0300
@@ -1093,7 +1093,7 @@
char *readstat = (char *) -1;
int lines = 0;
- helpfile = fopen("crafty.hlp", "r");
+ helpfile = fopen("/usr/share/crafty/crafty.hlp", "r");
if (!helpfile) {
printf("ERROR. Unable to open \"crafty.hlp\" -- help unavailable\n");
return (1);
diff -Naur crafty-23.4.orig/speak crafty-23.4/speak
--- crafty-23.4.orig/speak 2010-11-08 20:07:43.000000000 +0200
+++ crafty-23.4/speak 2013-07-20 21:31:58.348197739 +0300
@@ -8,7 +8,7 @@
# Where the sound files are located
#my $soundpath = "/opt/chess/sound";
-my $soundpath = "/home/hyatt/crafty/sound";
+my $soundpath = "/usr/share/crafty/sound";
# Which language to use (each supported language is in a separate
# subdir of $soundpath)
my $language = "english";