summaryrefslogtreecommitdiff
path: root/fetchmail/PKGBUILD
blob: 499402d23bab4d281db77b5095a79a177fcc4951 (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
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname=fetchmail
pkgver=6.4.8
pkgrel=1
pkgdesc="A remote-mail retrieval utility"
arch=('i486' 'i686' 'pentium4' 'x86_64')
url="http://www.fetchmail.info"
license=('GPL')
_pinned_dependencies=(
  'glibc>=2.31'
  'openssl=1.1.1.g'
)
depends=("${_pinned_dependencies[@]}")
makedepends=('python2')
optdepends=('tk: for using fetchmailconf'
            'python2: for using fetchmailconf')
options=('!makeflags')
source=("https://sourceforge.net/projects/fetchmail/files/branch_${pkgver%.*}/${pkgname}-${pkgver}.tar.xz"
        'disable-sslv3.patch' 'fetchmail.tmpfiles' 'fetchmail.sysusers' 'fetchmail.service')
sha512sums=('c1052389baafa3a48186733133130bf69b87c8dda8faa00e82f5947037845b95d3271c8183df729728a351888175174ca11eb18f9adb8b3515860cba95ab8987'
            '1425f3655c8fe7c6ca32b6fc876fd7f0ecfb24a86f63d9ee123fe710ebbdd8fbf5b5ef0f1831cd9702de56cc707a2361a427cf2ed840b63a39beda71a18dfba3'
            'f6e3eb409a1d88bcfb02012491fdbbf859803dbee45998879525fd35a2377bae95504da8aafcb24bcc2e695e15c96f6ec6f7e6521d28012370a4ec5e2a25a351'
            'c1169c54b70be53e3093d65a2d0f1e251fadf24a8008484583d79dd3cedea13782137c0db5f9052b2d02fdbd6bd0fdcb78c6403fe39926ac636b45a44d452b29'
            '49c2843ddb06f587611f838bc9dab3fe04af991d70c27f8ffdd6351d8d6401683a356a03401e232a53e44ee43f6d85aa520f233f256974d07972913145fdf0f5')

prepare() {
  cd "${srcdir}/${pkgname}-${pkgver}"
  patch -Np1 -i ../disable-sslv3.patch
}

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 -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.sysusers ${pkgdir}/usr/lib/sysusers.d/fetchmail.conf
  install -D -m644 ${srcdir}/fetchmail.service ${pkgdir}/usr/lib/systemd/system/fetchmail.service
}