mail/msmtp: Remove use of symlink postinst/postrm
authorDaniel Dickinson <redacted>
Tue, 5 Jul 2016 01:53:57 +0000 (21:53 -0400)
committerDaniel Dickinson <redacted>
Mon, 3 Oct 2016 06:51:57 +0000 (02:51 -0400)
Avoid the postrm/postinst symlink addition and removal as
1) This fails to conflict with other packages which also provide
the same commands and makes what packages is supply the command
depend on which command was installed last.
2) Trunk devs don't like postrm/postinst symlink mangling
3) Packages changing things from other packages is considered bad
packaging pratice on most distros and debian, for example,
prohibits it.

Signed-off-by: Daniel Dickinson <redacted>
mail/msmtp/Makefile

index 0c3af6df62eaf7226f39fb5aeb3858b8f8434b18..9ea72427b2bcdd4d1c1a6dfef084f1873b8b7a57 100644 (file)
@@ -112,19 +112,7 @@ define Package/msmtp/install
                $(1)/etc/msmtprc
        $(INSTALL_DIR) $(1)/usr/bin
        $(CP) $(PKG_INSTALL_DIR)/usr/bin/msmtp $(1)/usr/bin/
-endef
-
-define Package/msmtp/postinst
-       [ -e $${IPKG_INSTROOT}/usr/sbin/sendmail ] || {
-               mkdir -p $${IPKG_INSTROOT}/usr/sbin
-               ln -sf ../bin/msmtp $${IPKG_INSTROOT}/usr/sbin/sendmail
-       }
-endef
-
-define Package/msmtp/prerm
-       [ "../bin/msmtp" = "$(readlink -qs $${IPKG_INSTROOT}/usr/sbin/sendmail)" ] && {
-               rm -f $${IPKG_INSTROOT}/usr/sbin/sendmail
-       }
+       ln -s ../bin/msmtp $(1)/usr/sbin/sendmail
 endef
 
 Package/msmtp-nossl/conffiles = $(Package/msmtp/conffiles)
git clone https://git.99rst.org/PROJECT