aboutsummaryrefslogtreecommitdiffstats
path: root/community/rainloop-webmail/APKBUILD
blob: 6cff6d0f8d40596141448b530b96e1d1db587df2 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
_php=php7
pkgname=rainloop-webmail
pkgver=1.13.0
pkgrel=0
pkgdesc="Simple, modern & fast web-based email client"
url="http://www.rainloop.net"
arch="noarch"
license="AGPL-3.0-only"
depends="$_php $_php-curl $_php-iconv $_php-json $_php-dom $_php-openssl
	$_php-pdo_sqlite $_php-simplexml
	"
source="$pkgname-$pkgver.zip::https://github.com/RainLoop/$pkgname/releases/download/v$pkgver/rainloop-$pkgver.zip
	move-addressbook-in-etc.patch
	"
options="!check" # no test suite
pkggroups="www-data"
builddir="$srcdir"/rainloop

_staticdir=usr/share/webapps/rainloop
_datadir=var/lib/rainloop
_configdir=etc/rainloop

build() {
	return 0	
}

package() {
	mkdir -p \
		"$pkgdir"/$_staticdir \
		"$pkgdir"/$_datadir \
		"$pkgdir"/$_configdir
	mv "$srcdir"/rainloop/* "$pkgdir"/$_staticdir
	mv "$pkgdir"/$_staticdir/v/$pkgver/index.php.root \
		"$pkgdir"/$_staticdir/index.php

	# put config/dynamic data into /var
	mv "$srcdir"/data "$pkgdir"/$_datadir/data
	ln -s /$_datadir/data "$pkgdir"/$_staticdir/data

	# code wants to run from "rainloop" dir
	ln -s . "$pkgdir"/$_staticdir/rainloop

	# setup config dirs into /etc
	install -d -m770 -g www-data \
		"$pkgdir"/$_configdir/configs \
		"$pkgdir"/$_configdir/domains \
		"$pkgdir"/$_datadir/data/_data_/_default_
	ln -s /$_configdir/configs "$pkgdir"/$_datadir/data/_data_/_default_/configs
	ln -s /$_configdir/domains "$pkgdir"/$_datadir/data/_data_/_default_/domains

	# allow webserver to write config and temp files
	chown :www-data "$pkgdir"/$_datadir/data "$pkgdir"/$_configdir
	chmod 770 "$pkgdir"/$_datadir/data "$pkgdir"/$_configdir
}

sha512sums="37fb3bcc1f4c2a4cbcbcec1b6f61d12050157c985df18ec3e377fb31dc2a877a12f5c1bb8614d4cf19b33452e90a5d47c93dadde55d9c97137afd061c90bbc32  rainloop-webmail-1.13.0.zip
0795597625f9e72c22f28af00280eae39156a840647f91329eb3e8c3da14005ea9df0650d687ffdd3c8aaa86c07356f43a56139280481a68cf8801962f2eefdc  move-addressbook-in-etc.patch"