[packages] mini_sendmail, msmtp, nullmailer, ssmtp: don't ship sendmail symlink, create it at postinstall time
[packages] mini_sendmail, msmtp, nullmailer, ssmtp: don't ship sendmail symlink, create it at postinstall time


git-svn-id: svn://svn.openwrt.org/openwrt/packages@20406 3c298f89-4303-0410-b956-a3cf2f4a3e73

--- a/mail/mini_sendmail/Makefile
+++ b/mail/mini_sendmail/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2008 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 
 PKG_NAME:=mini-sendmail
 PKG_VERSION:=1.3.6
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=mini_sendmail-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.acme.com/software/mini_sendmail/
@@ -39,7 +39,10 @@
 define Package/mini-sendmail/install	
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mini_sendmail $(1)/usr/sbin/
-	ln -sf mini_sendmail $(1)/usr/sbin/sendmail
+endef
+
+define Package/mini-sendmail/postinstall
+	ln -sf mini_sendmail $${IPKG_INSTROOT}/usr/sbin/sendmail
 endef
 
 $(eval $(call BuildPackage,mini-sendmail))

--- a/mail/msmtp/Makefile
+++ b/mail/msmtp/Makefile
@@ -10,7 +10,7 @@
 
 PKG_NAME:=msmtp
 PKG_VERSION:=1.4.19
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/msmtp
@@ -99,10 +99,14 @@
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/msmtp $(1)/usr/bin/msmtp
 	$(INSTALL_DIR) $(1)/usr/sbin
-	ln -sf /usr/bin/msmtp $(1)/usr/sbin/sendmail
+endef
+
+define Package/msmtp/postinstall
+	ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
 endef
 
 Package/msmtp-nossl/install = $(Package/msmtp/install)
+Package/msmtp-nossl/postinstall = $(Package/msmtp/postinstall)
 
 $(eval $(call BuildPackage,msmtp))
 $(eval $(call BuildPackage,msmtp-nossl))

--- a/mail/nullmailer/Makefile
+++ b/mail/nullmailer/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2007-2009 OpenWrt.org
+# Copyright (C) 2007-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -9,7 +9,7 @@
 
 PKG_NAME:=nullmailer
 PKG_VERSION:=1.05
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://untroubled.org/nullmailer/
@@ -41,11 +41,15 @@
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nullmailer-queue $(1)/usr/sbin/
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/nullmailer-send $(1)/usr/sbin/
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sendmail $(1)/usr/sbin/
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sendmail $(1)/usr/sbin/nullmailer-sendmail
 	$(INSTALL_DIR) $(1)/usr/lib/nullmailer
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/protocols/qmqp $(1)/usr/lib/nullmailer/
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/protocols/smtp $(1)/usr/lib/nullmailer/
-	ln -sf ../sbin/sendmail $(1)/usr/lib/
+endef
+
+define Package/nullmailer/postinstall
+	ln -sf ../sbin/sendmail $(1)/usr/lib/sendmail
+	ln -sf nullmailer-sendmail $(1)/usr/sbin/sendmail
 endef
 
 $(eval $(call BuildPackage,nullmailer))

--- a/mail/ssmtp/Makefile
+++ b/mail/ssmtp/Makefile
@@ -9,7 +9,7 @@
 
 PKG_NAME:=ssmtp
 PKG_VERSION:=2.64
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.bz2
 PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/s/ssmtp
@@ -52,7 +52,10 @@
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/revaliases $(1)/etc/ssmtp/
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(INSTALL_BIN) $(PKG_BUILD_DIR)/ssmtp $(1)/usr/sbin/
-	ln -sf ssmtp $(1)/usr/sbin/sendmail
+endef
+
+define Package/ssmtp/postinstall
+	ln -sf ssmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
 endef
 
 $(eval $(call BuildPackage,ssmtp))

comments