Subject: [alpine-aports] [PATCH] main/mutt: don't tamper with the global configuration

From: Sören Tempel <[email-masked]>
Date: Tue, 8 Sep 2015 00:57:06 +0200

---
 main/mutt/APKBUILD | 37 +++++++++++++++----------------------
 1 file changed, 15 insertions(+), 22 deletions(-)

diff --git a/main/mutt/APKBUILD b/main/mutt/APKBUILD
index c416186..5377ab6 100644
--- a/main/mutt/APKBUILD
+++ b/main/mutt/APKBUILD
@@ -1,31 +1,23 @@
+# Contributor: Sören Tempel <[email-masked]>
 # Contributor: Andrew Manison<[email-masked]>
-# Maintainer:  Andrew Manison<[email-masked]>
+# Maintainer: Andrew Manison<[email-masked]>
 pkgname=mutt
 pkgver=1.5.24
-pkgrel=1
+pkgrel=2
 pkgdesc="a small but very powerful text-mode email client"
 url="http://www.mutt.org"
 arch="all"
 license="GPL"
-depends=
-makedepends="cyrus-sasl-dev gdbm-dev gettext-dev gpgme-dev
-	libidn-dev ncurses-dev openssl-dev perl"
-install=
+depends=""
+depends_dev="cyrus-sasl-dev gdbm-dev gettext-dev gpgme-dev
+	libidn-dev ncurses-dev openssl-dev"
+makedepends="$depends_dev perl"
+install=""
 options="suid"
 subpackages="$pkgname-doc $pkgname-lang"
 source="https://bitbucket.org/$pkgname/$pkgname/downloads/$pkgname-$pkgver.tar.gz"
 
 _builddir="$srcdir"/$pkgname-$pkgver
-
-prepare() {
-	cd "$_builddir"
-	for i in $source; do
-		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
-		esac
-	done
-}
-
 build() {
 	cd "$_builddir"
 	ISPELL=/usr/bin/hunspell \
@@ -43,7 +35,7 @@ build() {
 		--enable-gpgme \
 		--with-curses \
 		--with-mailpath=/var/spool/mail \
-		--with-docdir=/usr/share/doc/mutt \
+		--with-docdir=/usr/share/doc/$pkgname \
 		--without-included-gettext \
 		--with-ssl \
 		--with-sasl \
@@ -61,11 +53,12 @@ package() {
 		"$pkgdir"/usr/bin/flea \
 		|| return 1
 
-	# fix up default config
-	cat contrib/gpg.rc >> "$pkgdir"/etc/Muttrc
-	grep -C 5 "^color" contrib/sample.muttrc >> "$pkgdir"/etc/Muttrc
-	echo "source /etc/Muttrc.local" >> "$pkgdir"/etc/Muttrc
-	echo "# Local configuration for Mutt." > "$pkgdir"/etc/Muttrc.local
+	# Don't tamper with the global configuration file.
+	# Many options set in the global config cannot be
+	# overwritten in the users configuration file.
+	# Example: Resetting colors isn't possible.
+	install -Dm644 contrib/gpg.rc \
+		"$pkgdir"/etc/Muttrc.gpg.dist || return 1
 }
 
 md5sums="7f25d27f3c7c82285ac07aac35f5f0f2  mutt-1.5.24.tar.gz"
-- 
2.5.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---