aboutsummaryrefslogtreecommitdiffstats
path: root/community/postfixadmin/APKBUILD
blob: 88abe2697c17d65c4611b49b0a9ebdbc6511bcf5 (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
# Contributor: Sergei Lukin <sergej.lukin@gmail.com>
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=postfixadmin
pkgver=3.0.2
pkgrel=1
pkgdesc="Web Based Management tool for Postfix"
url="http://postfixadmin.com/"
arch="noarch"
license="GPL"
depends="postfix"
options="!check"
source="http://downloads.sourceforge.net/project/postfixadmin/postfixadmin/postfixadmin-$pkgver/postfixadmin-$pkgver.tar.gz"

# secfixes:
#   3.0.2-r0:
#   - CVE-2017-5930

builddir="$srcdir"/postfixadmin-$pkgver

prepare() {
	default_prepare || return 1
}

build() {
	cd "$builddir"
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/share/webapps/postfixadmin \
		"$pkgdir"/etc/postfixadmin
	cp -r * "$pkgdir"/usr/share/webapps/postfixadmin/

	# move config to /etc/postfixadmin and create symlink
	mv "$pkgdir"/usr/share/webapps/postfixadmin/config.inc.php \
		"$pkgdir"/etc/postfixadmin/
	ln -s /etc/postfixadmin/config.inc.php \
		"$pkgdir"/usr/share/webapps/postfixadmin/config.inc.php
	echo -e "User-Agent: *\nDisallow: /" \
		> "$pkgdir"/usr/share/webapps/postfixadmin/robots.txt
}

sha512sums="19db70cc59e8e41356e4cd632b0cb9df8d8de0f0451e7e2c84d61a0aa6ede5cc93bbf8914786a2eec012e4c013ad130a001d143ce869aa54b54a50fb798ed92b  postfixadmin-3.0.2.tar.gz"