Mail archive
alpine-aports

[alpine-aports] [PATCH] testing/exim: packaging fixes, fix startup w/o any certificates, fix /var/log/exim perms

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Fri, 25 Nov 2016 17:07:15 +0200

---
 testing/exim/APKBUILD | 33 +++++++++++++++++++--------------
 1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/testing/exim/APKBUILD b/testing/exim/APKBUILD
index 1bf657a..dbbc8ca 100644
--- a/testing/exim/APKBUILD
+++ b/testing/exim/APKBUILD
_at_@ -4,7 +4,7 @@
 # Maintainer: Jesse Young <jlyo_at_jlyo.org>
 pkgname=exim
 pkgver=4.87
-pkgrel=2
+pkgrel=3
 pkgdesc="A Message Transfer Agent"
 url="http://www.exim.org/"
 arch="all"
_at_@ -14,18 +14,22 @@ depends="ca-certificates"
 pkgusers="exim"
 pkggroups="exim"
 depends_dev=""
-makedepends="bash gawk perl $depends_dev db-dev pcre-dev libressl-dev libspf2-dev mariadb-dev postgresql-dev sqlite-dev libidn-dev"
+makedepends="$depends_dev bash gawk perl db-dev pcre-dev libressl-dev libspf2-dev
+	mariadb-dev postgresql-dev sqlite-dev libidn-dev"
 install="exim.pre-install exim.post-upgrade"
-subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql $pkgname-postgresql $pkgname-utils $pkgname-scripts $pkgname-doc"
+subpackages="$pkgname-cdb $pkgname-dbmdb $pkgname-dnsdb $pkgname-sqlite $pkgname-mysql
+	$pkgname-postgresql $pkgname-utils $pkgname-scripts::noarch $pkgname-doc"
 source="ftp://ftp.exim.org/pub/exim/exim4/$pkgname-$pkgver.tar.bz2
 	exim.Makefile
 	exim.confd
 	exim.initd
 	exim.logrotate"
 
-_builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir"/$pkgname-$pkgver
+
 prepare() {
-	cd "$_builddir"
+	cd "$builddir"
+	default_prepare || return 1
 	cp "$srcdir/$pkgname.Makefile" Local/Makefile
 	sed	-e 's/^LIBS = -lnsl/LIBS =/g' \
 		-e 's/^HAVE_ICONV=yes/#HAVE_ICONV=yes/' \
_at_@ -33,16 +37,17 @@ prepare() {
 }
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 	make makefile || return 1
 	make -j1 || return 1
 }
 
 package() {
-	cd "$_builddir"
-	install -m750 -D -g mail -d "$pkgdir"/etc/mail
+	cd "$builddir"
+	install -Dm750 -g mail -d "$pkgdir"/etc/mail
+	install -Dm750 -o $pkgusers -d "$pkgdir"/var/log/$pkgname
 	make DESTDIR="$pkgdir" INSTALL_ARG="-no_symlink -no_chown exim" install || return 1
-	install -D -m644 doc/exim.8 "$pkgdir"/usr/share/man/man8/exim.8
+	install -Dm644 doc/exim.8 "$pkgdir"/usr/share/man/man8/exim.8
 	cd "$pkgdir"/usr/sbin
 	mv exim-${pkgver%.*}* exim
 	chmod u+s exim
_at_@ -56,14 +61,14 @@ package() {
 	sed -i \
 		-e 's~# av_scanner = clamd:/tmp/clamd~# av_scanner = clamd:/run/clamav/clamd.sock~' \
 		-e '/# spamd_address = 127.0.0.1 783/a# spamd_address = 127.0.0.1 11333 variant=rspamd' \
+		-e '/# tls_advertise_hosts = */atls_advertise_hosts = :' \
 		"$pkgdir"/etc/$pkgname/$pkgname.conf
 }
 
 scripts() {
 	pkgdesc="exim scripts"
-	depends="exim perl"
-	arch="noarch"
-	cd "$_builddir"
+	depends="$pkgname perl"
+	cd "$builddir"
 	make	DESTDIR="$subpkgdir" \
 		INSTALL_ARG="exicyclog exim_checkaccess eximstats exiqgrep exigrep exinext exiqsumm exipick exiwhat convert4r3 convert4r4" \
 		install || return 1
_at_@ -73,7 +78,7 @@ scripts() {
 utils() {
 	pkgdesc="exim utils"
 	depends="exim"
-	cd "$_builddir"
+	cd "$builddir"
 	make	DESTDIR="$subpkgdir" \
 		INSTALL_ARG="exim_dbmbuild exim_dumpdb exim_tidydb exim_fixdb exim_lock" \
 		install || return 1
_at_@ -83,7 +88,7 @@ utils() {
 _mv_ext() {
 	pkgdesc="$1 support for EXIM"
 	depends="$pkgname"
-	install -D -m755 "$_builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so
+	install -D -m755 "$builddir"/build-Linux-*/lookups/$1.so "$subpkgdir"/usr/lib/$pkgname/$1.so
 }
 
 sqlite() { _mv_ext sqlite; }
-- 
2.10.2
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Nov 25 2016 - 17:07:15 GMT