mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
msmtp: msmtp-scripts: Enable PROVIDES and ALTERNATIVES
Use the PROVIDES mechanism so that msmtp and msmtp-nossl can be be +depended-on and avoid generating a file level conflict. Also use alternatives for msmtp-mta and msmtpq-ng-mta with msmtp-mta since we can only have one sendmail at a time. Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
This commit is contained in:
+8
-5
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=msmtp
|
||||
PKG_VERSION:=1.8.5
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://marlam.de/msmtp/releases
|
||||
@@ -49,6 +49,7 @@ $(call Package/msmtp/Default)
|
||||
DEPENDS+= +libgnutls +ca-bundle
|
||||
TITLE+= (with SSL support)
|
||||
VARIANT:=ssl
|
||||
DEFAULT_VARIANT:=1
|
||||
endef
|
||||
|
||||
define Package/msmtp/conffiles
|
||||
@@ -64,6 +65,7 @@ define Package/msmtp-nossl
|
||||
$(call Package/msmtp/Default)
|
||||
TITLE+= (without SSL support)
|
||||
VARIANT:=nossl
|
||||
PROVIDES:=msmtp
|
||||
endef
|
||||
|
||||
define Package/msmtp-nossl/description
|
||||
@@ -74,7 +76,10 @@ endef
|
||||
define Package/msmtp-mta
|
||||
$(call Package/msmtp/Default)
|
||||
TITLE+= (as MTA)
|
||||
DEPENDS+=@(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
|
||||
DEPENDS+=+msmtp
|
||||
ALTERNATIVES:=\
|
||||
100:/usr/sbin/sendmail:/usr/bin/msmtp \
|
||||
100:/usr/lib/sendmail:/usr/bin/msmtp
|
||||
endef
|
||||
|
||||
define Package/msmtp-mta/description
|
||||
@@ -85,7 +90,7 @@ endef
|
||||
|
||||
define Package/msmtp-queue
|
||||
$(call Package/msmtp/Default)
|
||||
DEPENDS+= +bash @(PACKAGE_msmtp||PACKAGE_msmtp-nossl)
|
||||
DEPENDS+= +bash +msmtp
|
||||
TITLE+= (queue scripts)
|
||||
endef
|
||||
|
||||
@@ -119,8 +124,6 @@ endef
|
||||
|
||||
define Package/msmtp-mta/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/usr/lib
|
||||
ln -sf ../bin/msmtp $(1)/usr/sbin/sendmail
|
||||
ln -sf ../bin/msmtp $(1)/usr/lib/sendmail
|
||||
endef
|
||||
|
||||
Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
|
||||
|
||||
Reference in New Issue
Block a user