]> git.pld-linux.org Git - packages/0verkill.git/commitdiff
- CONFIG_DIR support
authorjuandon <witekfl@pld-linux.org>
Mon, 17 Mar 2003 05:29:49 +0000 (05:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    0verkill-home_etc.patch -> 1.1
    0verkill.spec -> 1.18

0verkill-home_etc.patch [new file with mode: 0644]
0verkill.spec

diff --git a/0verkill-home_etc.patch b/0verkill-home_etc.patch
new file mode 100644 (file)
index 0000000..427a61d
--- /dev/null
@@ -0,0 +1,43 @@
+diff -Nru 0verkill-0.16/cfg.h 0verkill-0.16.new/cfg.h
+--- 0verkill-0.16/cfg.h        Sat Mar 15 13:01:51 2003
++++ 0verkill-0.16.new/cfg.h    Sat Mar 15 13:08:52 2003
+@@ -32,6 +32,7 @@
+ #define LEVEL_SPRITES_SUFFIX ".sp"
+ #define CFG_FILE ".0verkill"
++#define CONFIG_DIR_CFG_FILE "0verkill"
+ #define AREA_X 1000
+ #define AREA_Y 500
+diff -Nru 0verkill-0.16/client.c 0verkill-0.16.new/client.c
+--- 0verkill-0.16/client.c     Sun Dec 16 10:26:38 2001
++++ 0verkill-0.16.new/client.c Sat Mar 15 13:12:35 2003
+@@ -189,8 +189,12 @@
+       FILE *stream;
+       int a;
+       unsigned char txt[256];
+-
++      char *config_dir;
+ #ifndef WIN32
++      config_dir = getenv("CONFIG_DIR");
++      if (config_dir) {
++              sprintf(txt, "%s/%s", config_dir, CONFIG_DIR_CFG_FILE);
++      } else
+       sprintf(txt,"%s/%s",getenv("HOME"),CFG_FILE);
+ #else
+       sprintf(txt,"./%s",CFG_FILE);
+@@ -221,8 +225,13 @@
+ {
+       FILE *stream;
+       unsigned char txt[256];
+-
++      char *config_dir;
++      
+ #ifndef WIN32
++      config_dir = getenv("CONFIG_DIR");
++      if (config_dir) {
++              sprintf(txt, "%s/%s", config_dir, CONFIG_DIR_CFG_FILE);
++      } else
+       sprintf(txt,"%s/%s",getenv("HOME"),CFG_FILE);
+ #else
+       sprintf(txt,"./%s",CFG_FILE);
index b7d3ed5fd279f27371c590227ce23d54f04fda04..dbec492fed2693423da31b8a6638c117992f6dc4 100644 (file)
@@ -2,11 +2,13 @@ Summary:      0verkill - ASCII-art multiplayer game
 Summary(pl):   0verkill - gra multiplayer w ASCII
 Name:          0verkill
 Version:       0.16
-Release:       1
+Release:       2
 License:       GPL
 Group:         Applications/Games
 Source0:       http://artax.karlin.mff.cuni.cz/~brain/%{name}/release/%{name}-%{version}.tgz
 Patch0:                %{name}-datadir.patch
+Patch1:                %{name}-home_etc.patch
+Patch2:                %{name}-home_etc-doc.patch
 URL:           http://artax.karlin.mff.cuni.cz/~brain/%{name}/
 BuildRequires: autoconf
 BuildRequires: automake
@@ -35,7 +37,9 @@ Ten pakiet pozwala na uruchomienie klienta 0verkill w oknie X.
 
 %prep
 %setup -q
-%patch -p1
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %{__aclocal}
This page took 0.080423 seconds and 4 git commands to generate.