File majordomo-1.94.5.destdir.patch of Package majordomo
--- Makefile
+++ Makefile
@@ -11,7 +11,9 @@
#
#------------- Configure these items ----------------#
#
-
+
+#
+DESTDIR =
# Put the location of your Perl binary here:
PERL = /usr/bin/perl
@@ -117,8 +119,12 @@
install-wrapper: wrapper
+ifeq ($(DESTDIR),)
$(INSTALL) -o $(WRAPPER_OWNER) \
- -m $(WRAPPER_MODE) wrapper $(W_HOME)/wrapper
+ -m $(WRAPPER_MODE) wrapper $(DESTDIR)$(W_HOME)/wrapper
+else
+ $(INSTALL) -m $(WRAPPER_MODE) wrapper $(DESTDIR)$(W_HOME)/wrapper
+endif
@echo ""
@echo "To verify that all the permissions and etc are correct,"
@echo "run the command"
@@ -133,40 +139,40 @@
@echo "Testing for perl ($(PERL))..."
@test -f $(PERL) -a -x $(PERL) || \
{ echo "You didn't correctly tell me where Perl is."; exit 1; }
- @rm -rf $(TMP); mkdir $(TMP)
+ @rm -rf $(DESTDIR)$(TMP); mkdir $(DESTDIR)$(TMP)
@echo "Configuring scripts..."
@for file in $(TOOLS); do \
- cp contrib/$$file $(TMP) ; \
+ cp contrib/$$file $(DESTDIR)$(TMP) ; \
done
- @cp $(BINBIN) $(BIN) $(TMP)
- @cd $(TMP); $(PERL) -p -i -e 's@^#!\S+perl.*@#!$(PERL)@' $(TOOLS) $(BINBIN) $(BIN)
+ @cp $(BINBIN) $(BIN) $(DESTDIR)$(TMP)
+ cd $(DESTDIR)$(TMP); $(PERL) -p -i -e 's@^#!\S+perl.*@#!$(PERL)@' $(TOOLS) $(BINBIN) $(BIN)
install-scripts: config-scripts
- $(INSTALL) -m $(HOME_MODE) $(INSTALL_FLAGS) . $(W_HOME)
+ $(INSTALL) -m $(HOME_MODE) $(INSTALL_FLAGS) . $(DESTDIR)$(W_HOME)
for file in $(BINBIN); do \
$(INSTALL) -m $(EXEC_MODE) $(INSTALL_FLAGS) \
- $(TMP)/$$file /usr/bin/$$file; \
+ $(DESTDIR)$(TMP)/$$file $(DESTDIR)/usr/bin/$$file; \
done
@echo "Copying Majordomo files to $(W_HOME)"
@for file in $(BIN); do \
$(INSTALL) -m $(EXEC_MODE) $(INSTALL_FLAGS) \
- $(TMP)/$$file $(W_HOME)/$$file; \
+ $(DESTDIR)$(TMP)/$$file $(DESTDIR)$(W_HOME)/$$file; \
done
@echo "Copying archiving and other tools to $(W_HOME)/Tools"
- $(INSTALL) -m $(EXEC_MODE) $(INSTALL_FLAGS) . $(W_HOME)/Tools
+ $(INSTALL) -m $(EXEC_MODE) $(INSTALL_FLAGS) . $(DESTDIR)$(W_HOME)/Tools
@for file in $(TOOLS); do \
$(INSTALL) -m $(EXEC_MODE) $(INSTALL_FLAGS) \
- $(TMP)/$$file $(W_HOME)/Tools/$$file; \
+ $(DESTDIR)$(TMP)/$$file $(DESTDIR)$(W_HOME)/Tools/$$file; \
done
- @rm -rf $(TMP)
+ @rm -rf $(DESTDIR)$(TMP)
# the install.cf target will install the sample config file in the proper
# place unless a majordomo.cf file exists, in which case the majordomo.cf
@@ -180,34 +186,34 @@
then \
echo "Using majordomo.cf"; \
$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- majordomo.cf $(W_HOME)/majordomo.cf; \
+ majordomo.cf $(DESTDIR)$(W_HOME)/majordomo.cf; \
else \
echo "Using sample.cf"; \
$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- sample.cf /etc/majordomo.cf; \
+ sample.cf $(DESTDIR)/etc/majordomo.cf; \
fi; \
else \
echo "Using installed majordomo.cf"; \
fi;
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- sample.cf $(W_HOME)
+ sample.cf $(DESTDIR)$(W_HOME)
install-man:
@echo "Installing manual pages in $(MAN)"
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/approve.1 $(MAN)/man1/approve.1
+ Doc/man/approve.1 $(DESTDIR)$(MAN)/man1/approve.1
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/digest.1 $(MAN)/man1/digest.1
+ Doc/man/digest.1 $(DESTDIR)$(MAN)/man1/digest.1
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/bounce.1 $(MAN)/man1/bounce.1
+ Doc/man/bounce.1 $(DESTDIR)$(MAN)/man1/bounce.1
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/bounce-remind.1 $(MAN)/man1/bounce-remind.1
+ Doc/man/bounce-remind.1 $(DESTDIR)$(MAN)/man1/bounce-remind.1
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/resend.1 $(MAN)/man1/resend.1
+ Doc/man/resend.1 $(DESTDIR)$(MAN)/man1/resend.1
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/majordomo.8 $(MAN)/man8/majordomo.8
+ Doc/man/majordomo.8 $(DESTDIR)$(MAN)/man8/majordomo.8
@$(INSTALL) -m $(FILE_MODE) $(INSTALL_FLAGS) \
- Doc/man/resend.1 $(MAN)/man1/resend.1
+ Doc/man/wrapper.8.gz $(DESTDIR)$(MAN)/man8/wrapper.8.gz
wrapper: wrapper.c
$(CC) $(WRAPPER_FLAGS) -o wrapper wrapper.c