Mail archive
alpine-aports

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

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
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
_at_@ -1,31 +1,23 @@
+# Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Andrew Manison<amanison_at_anselsystems.com>
-# Maintainer:  Andrew Manison<amanison_at_anselsystems.com>
+# Maintainer: Andrew Manison<amanison_at_anselsystems.com>
 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 \
_at_@ -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 \
_at_@ -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:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Sep 08 2015 - 00:57:06 GMT