void-packages/srcpkgs/mutt/template

56 lines
1.7 KiB
Bash

# Template file for 'mutt'
pkgname=mutt
version=1.5.24
revision=1
build_style=gnu-configure
configure_args="--enable-pop --enable-imap --enable-smtp --enable-hcache
--enable-gpgme --with-regex --with-idn --with-ssl --with-sasl
--with-gpgme-prefix=${XBPS_CROSS_BASE}/usr
--with-gdbm=${XBPS_CROSS_BASE}/usr mutt_cv_regex_broken=no"
hostmakedepends="perl pkg-config libidn-devel automake"
makedepends="ncurses-devel libressl-devel libidn-devel gpgme-devel gdbm-devel
libsasl-devel"
depends="mime-types"
conf_files="/etc/Muttrc"
short_desc="The Mutt Mail Client"
maintainer="Jan S. <jan.schreib@gmail.com>"
license="GPL-2"
homepage="http://www.mutt.org"
distfiles="http://ftp.mutt.org/pub/mutt/${pkgname}-${version}.tar.gz"
checksum=a292ca765ed7b19db4ac495938a3ef808a16193b7d623d65562bb8feb2b42200
# Package build options
build_options="trash sidebar"
desc_option_trash="apply trash folder patch"
desc_option_sidebar="apply sidebar patch"
pre_configure() {
if [ "$build_option_trash" ]; then
patch -sNp1 -i ${FILESDIR}/trashfolder-1.5.22.diff0
msg_normal "$pkgver: applied trashfolder patch.\n"
fi
if [ "$build_option_sidebar" ]; then
patch -sNp1 -i ${FILESDIR}/patch-1.5.23.sidebar.20140412.txt
msg_normal "$pkgver: applied sidebar patch.\n"
fi
autoreconf -fi
}
pre_build() {
find -name Makefile -exec sed \
-e 's,-I/usr/include,,g' \
-e 's,${prefix}/include,,g' -i {} \;
make CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS= mutt_md5
make CC="$BUILD_CC" CFLAGS="$BUILD_CFLAGS" CPPFLAGS= -C doc
}
post_install() {
rm ${DESTDIR}/etc/Muttrc.dist
rm ${DESTDIR}/etc/mime.types{,.dist}
rm ${DESTDIR}/usr/bin/{flea,muttbug}
rm ${DESTDIR}/usr/share/man/man1/{flea,muttbug}.1
vinstall contrib/gpg.rc 644 etc Muttrc.gpg.dist
}