From 409c121185fa9f39aedd03c649d390dce3841727 Mon Sep 17 00:00:00 2001 From: hgy59 Date: Sun, 22 Mar 2020 09:33:39 +0100 Subject: [PATCH] mutt: update to 1.13.4 and add SASL support (#3923) * Update mutt and add SASL support - update mutt to version 1.13.4 - add cross/cyrus-sasl - use service-setup.sh for installation * incorporate code review --- cross/cyrus-sasl/Makefile | 16 +++++ cross/cyrus-sasl/PLIST | 21 +++++++ cross/cyrus-sasl/digests | 3 + ...ost-gcc-to-fix-cross-compile-makemd5.patch | 18 ++++++ cross/mutt/Makefile | 17 +++--- cross/mutt/PLIST | 11 ++-- cross/mutt/digests | 6 +- cross/mutt/patches/001-not-build-doc.patch | 20 ------- cross/mutt/patches/001_not-build-doc.patch | 23 +++++++ spk/mutt/Makefile | 20 +++---- spk/mutt/src/dsm-control.sh | 28 --------- spk/mutt/src/installer.sh | 60 ------------------- spk/mutt/src/service-setup.sh | 11 ++++ 13 files changed, 118 insertions(+), 136 deletions(-) create mode 100644 cross/cyrus-sasl/Makefile create mode 100644 cross/cyrus-sasl/PLIST create mode 100644 cross/cyrus-sasl/digests create mode 100644 cross/cyrus-sasl/patches/001_use-host-gcc-to-fix-cross-compile-makemd5.patch delete mode 100644 cross/mutt/patches/001-not-build-doc.patch create mode 100644 cross/mutt/patches/001_not-build-doc.patch delete mode 100755 spk/mutt/src/dsm-control.sh delete mode 100755 spk/mutt/src/installer.sh create mode 100644 spk/mutt/src/service-setup.sh diff --git a/cross/cyrus-sasl/Makefile b/cross/cyrus-sasl/Makefile new file mode 100644 index 00000000000..76b8e68fbf9 --- /dev/null +++ b/cross/cyrus-sasl/Makefile @@ -0,0 +1,16 @@ +PKG_NAME = cyrus-sasl +PKG_VERS = 2.1.27 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://github.com/cyrusimap/cyrus-sasl/releases/download/$(PKG_NAME)-$(PKG_VERS) +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +DEPENDS = cross/openssl + +HOMEPAGE = https://github.com/cyrusimap/cyrus-sasl +COMMENT = This is the Cyrus SASL API implementation. It can be used on the client or server side to provide authentication and authorization services. See RFC 4422 for more information. +LICENSE = https://github.com/cyrusimap/cyrus-sasl/blob/master/COPYING + +GNU_CONFIGURE = 1 + +include ../../mk/spksrc.cross-cc.mk diff --git a/cross/cyrus-sasl/PLIST b/cross/cyrus-sasl/PLIST new file mode 100644 index 00000000000..52c8e92f577 --- /dev/null +++ b/cross/cyrus-sasl/PLIST @@ -0,0 +1,21 @@ +lnk:lib/libsasl2.so +lnk:lib/libsasl2.so.3 +lib:lib/libsasl2.so.3.0.0 +lnk:lib/sasl2/libanonymous.so +lnk:lib/sasl2/libanonymous.so.3 +lib:lib/sasl2/libanonymous.so.3.0.0 +lnk:lib/sasl2/libcrammd5.so +lnk:lib/sasl2/libcrammd5.so.3 +lib:lib/sasl2/libcrammd5.so.3.0.0 +lnk:lib/sasl2/libdigestmd5.so +lnk:lib/sasl2/libdigestmd5.so.3 +lib:lib/sasl2/libdigestmd5.so.3.0.0 +lnk:lib/sasl2/libotp.so +lnk:lib/sasl2/libotp.so.3 +lib:lib/sasl2/libotp.so.3.0.0 +lnk:lib/sasl2/libplain.so +lnk:lib/sasl2/libplain.so.3 +lib:lib/sasl2/libplain.so.3.0.0 +lnk:lib/sasl2/libscram.so +lnk:lib/sasl2/libscram.so.3 +lib:lib/sasl2/libscram.so.3.0.0 diff --git a/cross/cyrus-sasl/digests b/cross/cyrus-sasl/digests new file mode 100644 index 00000000000..3f998bc6712 --- /dev/null +++ b/cross/cyrus-sasl/digests @@ -0,0 +1,3 @@ +cyrus-sasl-2.1.27.tar.gz SHA1 fbfe6f298b0d2efcdab6a40bf47e16d003ae5dc6 +cyrus-sasl-2.1.27.tar.gz SHA256 26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5 +cyrus-sasl-2.1.27.tar.gz MD5 a33820c66e0622222c5aefafa1581083 diff --git a/cross/cyrus-sasl/patches/001_use-host-gcc-to-fix-cross-compile-makemd5.patch b/cross/cyrus-sasl/patches/001_use-host-gcc-to-fix-cross-compile-makemd5.patch new file mode 100644 index 00000000000..73cae150fb6 --- /dev/null +++ b/cross/cyrus-sasl/patches/001_use-host-gcc-to-fix-cross-compile-makemd5.patch @@ -0,0 +1,18 @@ +--- include/Makefile.in.org 2018-10-09 14:58:13.000000000 +0000 ++++ include/Makefile.in 2020-02-11 18:59:17.401275731 +0000 +@@ -270,12 +270,12 @@ + BUILD_OBJEXT = @BUILD_OBJEXT@ + CC = @CC@ + CCDEPMODE = @CCDEPMODE@ +-CC_FOR_BUILD = @CC_FOR_BUILD@ +-CFLAGS = @CFLAGS@ ++CC_FOR_BUILD = gcc ++CFLAGS = + CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + CMU_LIB_SUBDIR = @CMU_LIB_SUBDIR@ + CPP = @CPP@ +-CPPFLAGS = @CPPFLAGS@ ++CPPFLAGS = + CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ + CPP_FOR_BUILD = @CPP_FOR_BUILD@ + CYGPATH_W = @CYGPATH_W@ diff --git a/cross/mutt/Makefile b/cross/mutt/Makefile index dbd0e498bf7..1d713cf142e 100644 --- a/cross/mutt/Makefile +++ b/cross/mutt/Makefile @@ -1,28 +1,25 @@ PKG_NAME = mutt -PKG_VERS = 1.5.24 +PKG_VERS = 1.13.4 PKG_EXT = tar.gz PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) PKG_DIST_SITE = ftp://ftp.mutt.org/pub/$(PKG_NAME) PKG_DIR = $(PKG_NAME)-$(PKG_VERS) -DEPENDS = cross/ncursesw cross/openssl +DEPENDS = cross/ncursesw cross/openssl cross/cyrus-sasl HOMEPAGE = http://www.mutt.org COMMENT = Mutt is a small but very powerful text-based mail client for Unix operating systems. LICENSE = GPLv2 GNU_CONFIGURE = 1 -CONFIGURE_ARGS = --with-ssl=openssl --enable-pop --enable-imap --enable-smtp +CONFIGURE_ARGS = --with-ssl=openssl --enable-pop --enable-imap --enable-smtp --with-sasl + +INSTALL_TARGET = mutt_install -INSTALL_TARGET = myInstall -POST_INSTALL_TARGET = myPostInstall include ../../mk/spksrc.cross-cc.mk -.PHONY: myInstall -myInstall: +.PHONY: mutt_install +mutt_install: $(RUN) $(MAKE) install DESTDIR=$(INSTALL_DIR) - -.PHONY: myPostInstall -myPostInstall: cp $(WORK_DIR)/$(PKG_DIR)/doc/Muttrc $(STAGING_INSTALL_PREFIX)/etc/Muttrc diff --git a/cross/mutt/PLIST b/cross/mutt/PLIST index f7c37ce6c3a..8911d41a380 100644 --- a/cross/mutt/PLIST +++ b/cross/mutt/PLIST @@ -1,12 +1,12 @@ -bin:bin/flea +rsc:bin/flea bin:bin/mutt -bin:bin/muttbug +bin:bin/mutt_pgpring +rsc:bin/muttbug bin:bin/pgpewrap -bin:bin/pgpring -bin:bin/smime_keys +rsc:bin/smime_keys +rsc:etc/Muttrc rsc:etc/mime.types rsc:etc/mime.types.dist -rsc:etc/Muttrc rsc:share/locale/bg/LC_MESSAGES/mutt.mo rsc:share/locale/ca/LC_MESSAGES/mutt.mo rsc:share/locale/cs/LC_MESSAGES/mutt.mo @@ -17,6 +17,7 @@ rsc:share/locale/eo/LC_MESSAGES/mutt.mo rsc:share/locale/es/LC_MESSAGES/mutt.mo rsc:share/locale/et/LC_MESSAGES/mutt.mo rsc:share/locale/eu/LC_MESSAGES/mutt.mo +rsc:share/locale/fi/LC_MESSAGES/mutt.mo rsc:share/locale/fr/LC_MESSAGES/mutt.mo rsc:share/locale/ga/LC_MESSAGES/mutt.mo rsc:share/locale/gl/LC_MESSAGES/mutt.mo diff --git a/cross/mutt/digests b/cross/mutt/digests index 30ef79465d2..7e7983600cd 100644 --- a/cross/mutt/digests +++ b/cross/mutt/digests @@ -1,3 +1,3 @@ -mutt-1.5.24.tar.gz SHA1 38a2da5eb01ff83a90a2caee28fa2e95dbfe6898 -mutt-1.5.24.tar.gz SHA256 a292ca765ed7b19db4ac495938a3ef808a16193b7d623d65562bb8feb2b42200 -mutt-1.5.24.tar.gz MD5 7f25d27f3c7c82285ac07aac35f5f0f2 +mutt-1.13.4.tar.gz SHA1 2d009e2dee3814fd6416ea12f9a501c475367ea3 +mutt-1.13.4.tar.gz SHA256 b57d3f1040d8018114cf1033dab229f36e4becbcdf59c2edeb294fc044ffcd04 +mutt-1.13.4.tar.gz MD5 8f08d01bb6379ce4f803560db3f1bc65 diff --git a/cross/mutt/patches/001-not-build-doc.patch b/cross/mutt/patches/001-not-build-doc.patch deleted file mode 100644 index c259c4f5dd6..00000000000 --- a/cross/mutt/patches/001-not-build-doc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- Makefile.in.orig 2015-08-30 19:24:26.000000000 +0200 -+++ Makefile.in 2016-01-18 21:35:18.757004586 +0100 -@@ -263,7 +263,7 @@ - ETAGS = etags - CTAGS = ctags - CSCOPE = cscope --DIST_SUBDIRS = m4 po intl doc contrib imap -+DIST_SUBDIRS = m4 po intl contrib imap - DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - distdir = $(PACKAGE)-$(VERSION) - top_distdir = $(distdir) -@@ -458,7 +458,7 @@ - AUTOMAKE_OPTIONS = 1.6 foreign - @BUILD_IMAP_TRUE@IMAP_SUBDIR = imap - @BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap --SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) -+SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) - bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET) - @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h - BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c $(HCVERSION) diff --git a/cross/mutt/patches/001_not-build-doc.patch b/cross/mutt/patches/001_not-build-doc.patch new file mode 100644 index 00000000000..015d2e7fba7 --- /dev/null +++ b/cross/mutt/patches/001_not-build-doc.patch @@ -0,0 +1,23 @@ +# remove doc from makefile +# cross compiled makedoc is not executable on host system + +--- Makefile.in.org 2020-01-12 21:08:53.000000000 +0000 ++++ Makefile.in 2020-02-11 21:02:01.550316103 +0000 +@@ -326,7 +326,7 @@ + ETAGS = etags + CTAGS = ctags + CSCOPE = cscope +-DIST_SUBDIRS = m4 po intl doc contrib imap autocrypt ++DIST_SUBDIRS = m4 po intl contrib imap autocrypt + am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/hcachever.sh.in $(top_srcdir)/flymake.am \ + $(top_srcdir)/intl/Makefile.in ABOUT-NLS ChangeLog INSTALL \ +@@ -540,7 +540,7 @@ + @BUILD_IMAP_TRUE@IMAP_INCLUDES = -I$(top_srcdir)/imap + @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_SUBDIR = autocrypt + @BUILD_AUTOCRYPT_TRUE@AUTOCRYPT_INCLUDES = -I$(top_srcdir)/autocrypt +-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR) ++SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR) + bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET) + @BUILD_HCACHE_TRUE@HCVERSION = hcversion.h + BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION) diff --git a/spk/mutt/Makefile b/spk/mutt/Makefile index a84e75b506b..afc7e59acf3 100644 --- a/spk/mutt/Makefile +++ b/spk/mutt/Makefile @@ -1,32 +1,32 @@ SPK_NAME = mutt -SPK_VERS = 1.5.24 -SPK_REV = 2 +SPK_VERS = 1.13.4 +SPK_REV = 4 SPK_ICON = src/mutt.png DEPENDS = cross/mutt MAINTAINER = SynoCommunity DESCRIPTION = Mutt is a small but very powerful text-based mail client for Unix operating systems. -RELOAD_UI = no DISPLAY_NAME = Mutt STARTABLE = no -BETA = 1 -CHANGELOG = Update to 1.5.24 + +CHANGELOG = "1. Update to 1.13.4
2. Add SASL support" HOMEPAGE = http://www.mutt.org LICENSE = GPLv2 -INSTALLER_SCRIPT = src/installer.sh -SSS_SCRIPT = src/dsm-control.sh +SERVICE_SETUP = src/service-setup.sh -INSTALL_PREFIX = /usr/local/$(SPK_NAME) +SPK_LINKS = /usr/local/bin/mutt:bin/mutt-utf8 POST_STRIP_TARGET = mutt_extra_install + include ../../mk/spksrc.spk.mk .PHONY: mutt_extra_install mutt_extra_install: install -m 755 src/mutt-utf8 $(STAGING_DIR)/bin/mutt-utf8 - install -m 644 src/Muttrc.local $(STAGING_DIR)/etc/Muttrc.local - echo "source $(INSTALL_PREFIX)/etc/Muttrc.local" >> $(STAGING_DIR)/etc/Muttrc + install -d -m 755 $(STAGING_DIR)/var + install -m 644 src/Muttrc.local $(STAGING_DIR)/var/Muttrc.local + echo "source $(INSTALL_PREFIX)/var/Muttrc.local" >> $(STAGING_DIR)/etc/Muttrc diff --git a/spk/mutt/src/dsm-control.sh b/spk/mutt/src/dsm-control.sh deleted file mode 100755 index e0aeb20615a..00000000000 --- a/spk/mutt/src/dsm-control.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Package -PACKAGE="mutt" -DNAME="Mutt" - -# Others -INSTALL_DIR="/usr/local/${PACKAGE}" -PATH="${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin" - - -case $1 in - start) - exit 0 - ;; - stop) - exit 0 - ;; - status) - exit 1 - ;; - log) - exit 1 - ;; - *) - exit 1 - ;; -esac diff --git a/spk/mutt/src/installer.sh b/spk/mutt/src/installer.sh deleted file mode 100755 index 797346a30de..00000000000 --- a/spk/mutt/src/installer.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -# Package -PACKAGE="mutt" -DNAME="Mutt" - -# Others -INSTALL_DIR="/usr/local/${PACKAGE}" -PATH="${INSTALL_DIR}/bin:/usr/local/bin:/bin:/usr/bin:/usr/syno/bin" - - -preinst () -{ - exit 0 -} - -postinst () -{ - # Link - ln -s ${SYNOPKG_PKGDEST} ${INSTALL_DIR} - - # Put mutt in the PATH - mkdir -p /usr/local/bin - ln -s ${INSTALL_DIR}/bin/mutt-utf8 /usr/local/bin/mutt - - exit 0 -} - -preuninst () -{ - exit 0 -} - -postuninst () -{ - # Remove link - rm -f ${INSTALL_DIR} - rm -f /usr/local/bin/mutt - - exit 0 -} - -preupgrade () -{ - # Save configuration - rm -fr ${TMP_DIR}/${PACKAGE} - mkdir -p ${TMP_DIR}/${PACKAGE} - mv ${INSTALL_DIR}/etc/Muttrc.local ${TMP_DIR}/${PACKAGE}/Muttrc.local - - exit 0 -} - -postupgrade () -{ - # Restore configuration - mv ${TMP_DIR}/${PACKAGE}/Muttrc.local ${INSTALL_DIR}/etc/Muttrc.local - rm -fr ${TMP_DIR}/${PACKAGE} - - exit 0 -} diff --git a/spk/mutt/src/service-setup.sh b/spk/mutt/src/service-setup.sh new file mode 100644 index 00000000000..e8ba045c53b --- /dev/null +++ b/spk/mutt/src/service-setup.sh @@ -0,0 +1,11 @@ +INSTALL_TARGET_DIR="/var/packages/${SYNOPKG_PKGNAME}/target" + +service_save () +{ + # Save configuration of previous installation in ${INSTALL_TARGET_DIR}/etc (upgrades use ${INSTALL_TARGET_DIR}/var) + if [ -e "${INSTALL_TARGET_DIR}/etc/Muttrc.local" ]; then + echo "migrate ${INSTALL_TARGET_DIR}/etc/Muttrc.local to ${INSTALL_TARGET_DIR}/var/Muttrc.local" >> "${INST_LOG}" + mv ${INSTALL_TARGET_DIR}/etc/Muttrc.local ${TMP_DIR}/Muttrc.local >> "${INST_LOG}" + fi +} +