summaryrefslogtreecommitdiff
path: root/core/s-nail/PKGBUILD
blob: 4f8597e818002efff66872a2d85b5104760a1040 (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
49
50
51
52
53
54
55
56
57
58
59
# $Id: PKGBUILD 205499 2014-02-06 08:39:31Z bisson $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s@arch@gmail.com>
# Contributor: Andreas Wagner <Andreas.Wagner@em.uni-frankfurt.de>

pkgname=s-nail
pkgver=14.5.2
pkgrel=3
pkgdesc='Mail processing system with a command syntax reminiscent of ed'
url='http://sdaoden.users.sourceforge.net/code.html#s-nail'
license=('custom:BSD')
arch=('i686' 'x86_64')
depends=('openssl')
optdepends=('smtp-forwarder: for sending mail')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}-${pkgver//./_}.tar.xz"
        'mimeheader.patch'
        'sort.patch')
sha1sums=('26ad43f5f41b429d5f13a3ce73a3dff75325950c'
          'e72ed84f584ebc50eb9d04779b8b754afa446bf4'
          '909da731e590d1d2877ed38bed667440a02d1259')

groups=('base')
backup=('etc/mail.rc')
replaces=('mailx' 'mailx-heirloom' 'heirloom-mailx')
provides=('mailx' 'mailx-heirloom' 'heirloom-mailx')
conflicts=('mailx' 'mailx-heirloom' 'heirloom-mailx')

prepare() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	patch -p1 -i ../mimeheader.patch
	patch -p1 -i ../sort.patch
}

build() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make \
		PREFIX=/usr \
		SYSCONFDIR=/etc \
		MANDIR=/usr/share/man \
		MAILSPOOL=/var/spool/mail \
		SID= NAIL=mail \
		config

	make build
}

check() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make test
}

package() {
	cd "${srcdir}/${pkgname}-${pkgver}"
	make DESTDIR="${pkgdir}" packager-install
	ln -sf mail "${pkgdir}"/usr/bin/mailx
	ln -sf mail.1.gz "${pkgdir}"/usr/share/man/man1/mailx.1.gz
	install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}