summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc879302a270264ec6fe75cd9a5bcafc303b9b79 (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
# Maintainer: Ingo Meyer <i.meyer@fz-juelich.de>

pkgname="msmtp-git"
pkgver=1.8.24.r3.g06aa093
pkgrel=1
pkgdesc="A mini smtp client"
arch=("x86_64")
url="https://marlam.de/msmtp/"
license=("GPL3")
depends=("libsecret" "gsasl")
makedepends=("git" "texlive-plaingeneric" "libsecret" "gsasl")
provides=("${pkgname%-*}=${pkgver}")
conflicts=("${pkgname%-*}")
source=("${pkgname%-*}::git+https://git.marlam.de/git/${pkgname%-*}.git#branch=master")
sha256sums=("SKIP")

pkgver() {
    cd "${srcdir}/${pkgname%-*}" || return
    git describe --long --tags | sed 's/^msmtp.//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "${srcdir}/${pkgname%-*}" || return
    aclocal && \
    autoheader && \
    autoconf && \
    automake --add-missing && \
    ./configure --prefix=/usr --sysconfdir=/etc --with-libgsasl && \
    make && \
    make -C doc html pdf
}

package() {
    cd "${srcdir}/${pkgname%-*}" || return
    make DESTDIR="${pkgdir}" install && \
    make DESTDIR="${pkgdir}" -C doc install-html install-pdf || return

    # 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,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" && \

    chmod 755 "${pkgdir}"/usr/share/doc/msmtp/{find_alias,msmtpqueue,set_sendmail}/*.sh && \
    chmod 755 "${pkgdir}"/usr/share/doc/msmtp/msmtpq/msmtp*
}