summaryrefslogtreecommitdiff
path: root/extra/msmtp/PKGBUILD
blob: c560cb7cc243fb89a70922b228cd8d5fae066940 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# $Id: PKGBUILD 154176 2012-03-23 22:05:03Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>
# Contributor: Ben Mazer <blm@groknil.org>

pkgbase=msmtp
pkgname=('msmtp' 'msmtp-mta')
pkgver=1.4.27
pkgrel=2
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3')
url="http://msmtp.sourceforge.net"
makedepends=('texlive-core' 'gsasl' 'libgnome-keyring')
source=(http://download.sourceforge.net/sourceforge/msmtp/${pkgbase}-${pkgver}.tar.bz2)
sha1sums=('e335745133b4729fe84c49f836b4d2fa9281e040')

build() {
  cd "${srcdir}/${pkgbase}-${pkgver}"
  ./configure --prefix=/usr --sysconfdir=/etc --with-ssl=gnutls
  make
  make -C doc html pdf
}

package_msmtp() {
  pkgdesc="A mini smtp client"
  depends=('gsasl' 'libgnome-keyring')
  install=msmtp.install

  cd "${srcdir}/${pkgbase}-${pkgver}"
  make DESTDIR="${pkgdir}" install 
  make DESTDIR="${pkgdir}" -C doc install-html install-pdf

# Installing example configs and scripts to /usr/share/doc/msmtp
# as they are not installed by default (Debian and Gentoo do it this way)
  install -d "${pkgdir}/usr/share/doc/msmtp"
  cp -r scripts/{find_alias,msmtp-gnome-tool,msmtpqueue,msmtpq,set_sendmail} "${pkgdir}/usr/share/doc/msmtp/"
  install -D -m644 doc/*.example "${pkgdir}/usr/share/doc/msmtp/"

  install -D -m644 scripts/vim/msmtp.vim "${pkgdir}/usr/share/vim/vimfiles/syntax/msmtp.vim"
}

package_msmtp-mta() {
  pkgdesc="A mini smtp client - the regular MTA"
  depends=('msmtp')
  provides=('smtp-forwarder')

  install -d "${pkgdir}/usr/sbin"
  ln -s /usr/bin/msmtp "${pkgdir}/usr/sbin/sendmail"
}