# Contributor: Natanael Copa # Maintainer: Natanael Copa pkgname=msmtp pkgver=1.6.4 pkgrel=0 pkgdesc="SMTP client with a sendmail compatible interface" url="http://msmtp.sourceforge.net/" arch="all" license="GPLv3+" depends="" makedepends="openssl-dev" install="" subpackages="$pkgname-doc $pkgname-vim:vim" source="http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz" _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i 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" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ --with-ssl=openssl \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 } vim() { depends="" pkgdesc="Vim syntax for $pkgname" arch="noarch" install -Dm644 "$_builddir"/scripts/vim/$pkgname.vim \ "$subpkgdir"/usr/share/vim/vimfiles/syntax/$pkgname.vim } md5sums="aa829b5e9faeca5139f7983e6637f0d6 msmtp-1.6.4.tar.xz" sha256sums="9b49c022a5440d41b6782c97ef2977d0346c3dae05aa8836243a9953e982d1cd msmtp-1.6.4.tar.xz" sha512sums="a4e84b61ab66fcbd1cd8e03b23b5911a688d1e90affff1637b0fa2b607c051b816fba85883961f0bcbf65b0734b026710af22ace0d02efaa937b3106a901e810 msmtp-1.6.4.tar.xz"