mutt-kz: play nicely with other mutts

This commit is contained in:
Toyam Cox 2016-05-06 04:08:02 -04:00
parent f2da46364f
commit 26182f399b

View file

@ -2,17 +2,17 @@
pkgname=mutt-kz pkgname=mutt-kz
reverts=20141129_6 reverts=20141129_6
version=1.6.0.1 version=1.6.0.1
revision=1 revision=2
build_style=gnu-configure build_style=gnu-configure
configure_args="--enable-notmuch --enable-pop --enable-imap --enable-smtp configure_args="--enable-notmuch --enable-pop --sysconfdir=/etc/$pkgname
--enable-hcache --enable-gpgme --with-regex --with-idn --with-ssl --with-sasl --enable-hcache --enable-gpgme --with-regex --with-idn --with-ssl --with-sasl
--enable-sidebar --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr --enable-sidebar --with-gpgme-prefix=${XBPS_CROSS_BASE}/usr --enable-smtp
--with-gdbm=${XBPS_CROSS_BASE}/usr mutt_cv_regex_broken=no" --with-gdbm=${XBPS_CROSS_BASE}/usr mutt_cv_regex_broken=no --enable-imap"
hostmakedepends="automake perl pkg-config" hostmakedepends="automake perl pkg-config"
makedepends="ncurses-devel libressl-devel libidn-devel gpgme-devel makedepends="ncurses-devel libressl-devel libidn-devel gpgme-devel
libnotmuch-devel gdbm-devel libsasl-devel" libnotmuch-devel gdbm-devel libsasl-devel"
depends="notmuch mime-types" depends="notmuch mime-types"
conf_files="/etc/Muttrc" conf_files="/etc/$pkgname/Muttrc"
short_desc="Mutt (MUA) fork with notmuch support and another improvements" short_desc="Mutt (MUA) fork with notmuch support and another improvements"
maintainer="Jan S. <jan.schreib@gmail.com>" maintainer="Jan S. <jan.schreib@gmail.com>"
license="GPL-3" license="GPL-3"
@ -20,16 +20,53 @@ homepage="https://github.com/karelzak/mutt-kz/"
distfiles="https://github.com/karelzak/mutt-kz/archive/v${version}.tar.gz" distfiles="https://github.com/karelzak/mutt-kz/archive/v${version}.tar.gz"
checksum=7832ba066fb6d2681450e4c32b910dfb645ae7afd99dfa6b83c33ce1c5e58cea checksum=7832ba066fb6d2681450e4c32b910dfb645ae7afd99dfa6b83c33ce1c5e58cea
provides="mutt-${version}_${revision}" provides="mutt-0_1"
replaces="mutt>=0" # Begin alternatives:
alternatives="
mutt:mutt:/usr/bin/mutt-$pkgname
mutt:pgpewrap:/usr/bin/pgpewrap-$pkgname
mutt:flea:/usr/bin/flea-$pkgname
mutt:muttbug:/usr/bin/muttbug-$pkgname
mutt:smime_keys:/usr/bin/smime_keys-$pkgname
mutt:pgpewrap.1:/usr/share/man/man1/pgpewrap-${pkgname}.1
mutt:flea.1:/usr/share/man/man1/flea-${pkgname}.1
mutt:mutt.1:/usr/share/man/man1/mutt-${pkgname}.1
mutt:pgpring.1:/usr/share/man/man1/pgpring-${pkgname}.1
mutt:muttbug.1:/usr/share/man/man1/muttbug-${pkgname}.1
mutt:smime_keys.1:/usr/share/man/man1/smime_keys-${pkgname}.1
mutt:mbox.5:/usr/share/man/man5/mbox-${pkgname}.5
mutt:muttrc.5:/usr/share/man/man5/muttrc-${pkgname}.5
mutt:mmdf.5:/usr/share/man/man5/mmdf-${pkgname}.5
"
# End alternatives
pre_configure() { pre_configure() {
autoreconf -fi autoreconf -fi
} }
post_install() { post_install() {
# provided by mime-types. # provided by mime-types
rm ${DESTDIR}/etc/mime.* rm "${DESTDIR}"/etc/${pkgname}/mime.*
# move dist to examples dir. ln -s /etc/mime.types "${DESTDIR}/etc/${pkgname}/mime.types"
vmkdir usr/share/examples/${pkgname} # move dist to examples dir
mv ${DESTDIR}/etc/Muttrc.dist ${DESTDIR}/usr/share/examples/${pkgname} vsconf contrib/gpg.rc Muttrc.gpg.dist
mv "${DESTDIR}/etc/${pkgname}/Muttrc.dist" "${DESTDIR}/usr/share/examples/${pkgname}"
# Allows alternatives to work
for manpage in "${DESTDIR}"/usr/share/man/man[15]/*; do
mv "$manpage" "${manpage%.*}-${pkgname}.${manpage##*.}"
done
for binary in "${DESTDIR}"/usr/bin/*; do
mv "$binary" "${binary}-${pkgname}"
done
} }
# REMARKS:
# Conf file is in a --sysconfdir=/etc/$pkgname/Muttrc and then alternatives to
# /etc/Muttrc. In addition, a dependency on mime-types is broken by having
# /etc/dir/ because mutt probably expects the mime information in the same
# dir as sysconfdir. Thus a symlink is created to deal with this.
# /etc/Muttrc is not currently in alternatives to prevent inadvertently
# overwriting configuration.