PREFIX ?= /usr
+BIN_SUFFIX ?=
+
# Where the script binary should go
BINPATH = $(DESTDIR)$(PREFIX)/bin
SBINPATH = $(DESTDIR)$(PREFIX)/sbin
MANPATH = $(DESTDIR)$(PREFIX)/share/man/man1
SHAREDIR = $(DESTDIR)$(PREFIX)/share/smailq
CONFFILE = $(SHAREDIR)/smailq.conf.sample
-
######################################################################
all: manpage
install: all
mkdir -p $(BINPATH) $(SBINPATH) $(MANPATH) $(SHAREDIR)
install -m 0755 smailq $(BINPATH)/smailq
- install -m 0755 mailq $(BINPATH)/mailq
- install -m 0755 sendmail $(SBINPATH)/sendmail
+ install -m 0755 mailq $(BINPATH)/mailq$(BIN_SUFFIX)
+ install -m 0755 sendmail $(SBINPATH)/sendmail$(BIN_SUFFIX)
install -m 0644 smailq.conf $(CONFFILE)
install -m 0644 smailq.1 $(MANPATH)/smailq.1
--- /dev/null
+#!/bin/sh
+
+set -e
+
+if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+#DEBHELPER#
+
+case "$1" in
+ configure)
+ update-alternatives --install /usr/sbin/sendmail sendmail /usr/sbin/sendmail.smailq 5 \
+ --slave /usr/lib/sendmail lib-sendmail /usr/sbin/sendmail.smailq;
+ update-alternatives --set sendmail /usr/sbin/sendmail.smailq || true
+ update-alternatives --set lib-sendmail /usr/sbin/sendmail.smailq || true
+ ;;
+esac