[Pkg-wmaker-commits] [wmcalc] 34/65: wmcalc: Allow installation without root access.

Doug Torrance dtorrance-guest at moszumanska.debian.org
Sun Aug 23 13:54:05 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmcalc.

commit ef032882f5609484c2748a5e674f4666381e6ac7
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date:   Sat Jan 10 10:59:52 2015 -0600

    wmcalc: Allow installation without root access.
    
    Drop "-p -o root -g root" from the INSTALL_* Makefile variables and honor
    the CONF Makefile variable for accessing the global config file instead of
    hardcoding it as /etc.
    
    These changes allow users without root access to install wmcalc in their home
    directory.
---
 Makefile   | 6 +++---
 wmcalc_c.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 0559573..4dc8440 100644
--- a/Makefile
+++ b/Makefile
@@ -10,11 +10,11 @@ MANDIR = $(PREFIX)/share/man/man1
 CONF   = /etc
 INSTALL = /usr/bin/install
 INSTALL_DIR	= $(INSTALL) -d
-INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
-INSTALL_FILE    = $(INSTALL) -p -o root -g root -m 644
+INSTALL_PROGRAM = $(INSTALL)
+INSTALL_FILE    = $(INSTALL) -m 644
 
 .c.o:
-	$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
+	$(CC) -DCONF=\"$(CONF)\" $(CPPFLAGS) $(CFLAGS) -c $< -o $*.o
 
 $(TARGET): $(OBJECTS)
 	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
diff --git a/wmcalc_c.h b/wmcalc_c.h
index 9212e6d..af41e24 100644
--- a/wmcalc_c.h
+++ b/wmcalc_c.h
@@ -17,7 +17,7 @@
 #define CALC_CMD_SIZE 128
 #define CONFFILENAME  "/.wmcalc"
 #define CONFTEMPFILE  "/tmp/wmcalc.tmp"
-#define CONFIGGLOBAL  "/etc/wmcalc.conf"
+#define CONFIGGLOBAL  CONF"/wmcalc.conf"
 #define VER           0
 #define REL           3
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmcalc.git



More information about the Pkg-wmaker-commits mailing list