[ircd-ratbox] [PATCH] ratbox-services: DESTDIR & .db location

Ralf S. Engelschall rse at engelschall.com
Mon May 16 08:05:15 EDT 2005


The patch below (against the latest Ratbox-Services CVS snapshot) adds
support for the usual $(DESTDIR) make variable which is especially
important for packagers (who have to install the software into a
temporary area).

Additionally, it changes the location of the SQLite .db file from
SYSCONFDIR to RUNDIR because such a run-time file should stay under var/
and not under etc/ as it is not a configuration file.

                                       Ralf S. Engelschall
                                       rse at engelschall.com
                                       www.engelschall.com

Index: ratbox-services/Makefile.in
--- ratbox-services/Makefile.in.orig	2005-05-16 10:34:03 +0200
+++ ratbox-services/Makefile.in	2005-05-16 10:57:51 +0200
@@ -35,15 +35,15 @@
 	done

 install: build
-	$(INSTALL) -m 750 -d $(prefix)
-	$(INSTALL) -m 750 -d $(sbindir)
-	$(INSTALL) -m 750 -d $(sysconfdir)
-	$(INSTALL) -m 750 -d $(logdir)
-	$(INSTALL) -m 750 -d $(rundir)
-	$(INSTALL) -m 750 -d $(helpdir)
-	$(INSTALL) -m 750 src/$(BIN) $(sbindir)
-	$(INSTALL) -m 640 doc/example.conf $(sysconfdir)
-	$(INSTALL) -m 640 doc/schema.txt $(sysconfdir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(prefix)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(sbindir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(sysconfdir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(logdir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(rundir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(helpdir)
+	$(INSTALL) -m 750 src/$(BIN) $(DESTDIR)$(sbindir)
+	$(INSTALL) -m 640 doc/example.conf $(DESTDIR)$(sysconfdir)
+	$(INSTALL) -m 640 doc/schema.txt $(DESTDIR)$(sysconfdir)
 	@for i in $(SUBDIRS); do \
 		echo "install -> $$i"; \
 		cd $$i; \
Index: ratbox-services/help/Makefile.in
--- ratbox-services/help/Makefile.in.orig	2005-05-16 10:34:03 +0200
+++ ratbox-services/help/Makefile.in	2005-05-16 10:59:39 +0200
@@ -10,13 +10,13 @@
 SUBDIRS=alis main operbot chanserv userserv jupeserv operserv nickserv

 install:
-	$(INSTALL) -m 750 -d $(helpdir)
+	$(INSTALL) -m 750 -d $(DESTDIR)$(helpdir)

 	@for i in $(SUBDIRS); do \
-		$(INSTALL) -m 750 -d $(helpdir)/$$i; \
+		$(INSTALL) -m 750 -d $(DESTDIR)$(helpdir)/$$i; \
 		for j in $$i/*; do \
 			if [ -f $$j ]; then \
-				$(INSTALL_DATA) $$j $(helpdir)/$$i; \
+				$(INSTALL_DATA) $$j $(DESTDIR)$(helpdir)/$$i; \
 			fi \
 		done \
 	done
Index: ratbox-services/include/config.h
--- ratbox-services/include/config.h.orig	2005-05-16 10:34:04 +0200
+++ ratbox-services/include/config.h	2005-05-16 11:22:36 +0200
@@ -9,7 +9,7 @@
 #define PID_PATH	RUNDIR "/ratbox-services.pid"
 #define LOG_PATH	LOGDIR "/ratbox-services.log"
 #define HELP_PATH       HELPDIR
-#define DB_PATH		SYSCONFDIR "/ratbox-services.db"
+#define DB_PATH		RUNDIR "/ratbox-services.db"

 /* SMALL_NETWORK
  * If your network is fairly small, enable this to save some memory.



More information about the ircd-ratbox mailing list