summaryrefslogtreecommitdiff
path: root/extra/fetchmail/PKGBUILD
blob: a19e9146924c8d12b5f355760a7c2cb83ad59b71 (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
# $Id: PKGBUILD 173148 2012-12-11 16:53:09Z pierre $

pkgname=fetchmail
pkgver=6.3.23
pkgrel=1
pkgdesc="A remote-mail retrieval utility"
arch=('i686' 'x86_64')
url="http://fetchmail.berlios.de/"
license=('GPL')
depends=('openssl')
makedepends=('python2')
optdepends=('tk: for using fetchmailconf'
            'python2: for using fetchmailconf')
backup=('etc/conf.d/fetchmail')
options=('!makeflags')
install='fetchmail.install'
source=("http://download.berlios.de/$pkgname/${pkgname}-${pkgver}.tar.xz"
        "http://download.berlios.de/$pkgname/${pkgname}-${pkgver}.tar.xz.asc"
        'fetchmail.rc' 'fetchmail.conf' 'fetchmail.tmpfiles' 'fetchmail.service')
sha1sums=('ac3a4a16dff60fe2651fdcf3d146c91399af2a27'
          'ec1268dad146d55b45dd3fb043613a7af77b890d'
          'fc25180f1add26df0a3bdaac03fd9d2e3473ff88'
          '30401729386d6f774c6c36ab8530842166de54a8'
          '199ba749c829f22286c34aabcf8b7dd5bbd7c0e6'
          '11ff81fc8363a54099880da18634b0d1ecf9fa82')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' fetchmailconf.py
  PYTHON=python2 ./configure --prefix=/usr --with-ssl=/usr
  make
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  install -Dm755 "${srcdir}/fetchmail.rc" "${pkgdir}/etc/rc.d/fetchmail"
  install -Dm644 "${srcdir}/fetchmail.conf" "${pkgdir}/etc/conf.d/fetchmail"
  install -d -o 90 -g nobody "${pkgdir}/var/lib/fetchmail"
  install -D -m644 ${srcdir}/fetchmail.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/fetchmail.conf
  install -D -m644 ${srcdir}/fetchmail.service ${pkgdir}/usr/lib/systemd/system/fetchmail.service
}