APKBUILD 2.24 KB
Newer Older
1 2
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Valery Kartel <valery.kartel@gmail.com>
3
# Contributor: Stefan Wagner <stw@bit-strickerei.de>
4
pkgname=libmilter
5 6 7 8 9
_pkgname=sendmail
# This library is part of sendmail, but it does not share the version number with it.
# In order to find the right libmilter version number, check SMFI_VERSION definition
# that can be found in ${S}/include/libmilter/mfapi.h (see also SM_LM_VRS_* defines).
# For example, version 1.0.1 has a SMFI_VERSION of 0x01000001.
10 11
pkgver=1.0.2
_pkgver=8.15.2
12
pkgrel=6
13
pkgdesc="Sendmail Mail Filter API (Milter)"
14 15
url="http://www.sendmail.com/sm/open_source"
arch="all"
16 17
options="!check"  # No independent test suite.
license="Sendmail"
18
makedepends="m4 linux-headers bsd-compat-headers"
19 20
subpackages="$pkgname-dev $pkgname-doc"
source="ftp://ftp.sendmail.org/pub/$_pkgname/$_pkgname.$_pkgver.tar.gz
21
	libmilter-sharedlib.patch
22 23 24 25
	default-pthread-stacksize.patch"
builddir="$srcdir/$_pkgname-$_pkgver"

prepare() {
26
	default_prepare
27

28
	cd "$builddir"
29 30 31 32 33 34 35
	cat >> devtools/Site/site.config.m4 <<-EOF
		dnl enable ipv6
		APPENDDEF(\`conf_libmilter_ENVDEF',\`-DNETINET6=1')
		dnl getipnodebyname/getipnodebyaddr is deprecated and not part of musl libc
		APPENDDEF(\`conf_libmilter_ENVDEF',\`-DNEEDSGETIPNODE=1')
	EOF
}
36 37

build() {
38
	cd "$builddir"
39
	make -j1 -C libmilter MILTER_SOVER=$pkgver
40 41 42
}

package() {
43
	cd "$builddir"
44

45 46 47 48
	mkdir -p "$pkgdir"/usr/lib
	make -j1 -C libmilter \
		INCOWN=root INCGRP=root INCMODE=644 \
		LIBOWN=root LIBGRP=root LIBMODE=644 UBINMODE=755 \
49 50
		MILTER_SOVER=$pkgver \
		DESTDIR="$pkgdir" \
51
		install
52 53

	install -m 644 -D libmilter/README \
54 55
		"$pkgdir"/usr/share/doc/$pkgname/README
	cp -r libmilter/docs "$pkgdir"/usr/share/doc/$pkgname/
56 57 58 59
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/license
}

sha512sums="04feb37316c13b66b1518596507a7da7c16cb0bf1abf10367f7fd888a428fadb093a9efa55342fa55b936c3f0cbdc63b9e2505cd99201a69a0c05b8ad65f49f9  sendmail.8.15.2.tar.gz
60
31c36b57739946c1b9c7c85307fe5c53c45d7f8cbf427a0f2248db8b74871a6f5a30ef1af524915821aeca54310d28272bcd0a587cb918192214fa5c30e4a8da  libmilter-sharedlib.patch
61
d3e12943fe7e9babdf700a2d8c0229bc16fa2ea16097615600341dee13f137b157ffa4b03f76c92ba9c5552ca3bf01cb598f6a6201720408df3a37247001a219  default-pthread-stacksize.patch"