aboutsummaryrefslogtreecommitdiffstats
path: root/community/rainloop-webmail/APKBUILD
blob: fbe08975bfe4de3ab185e3191e8683f1a53589bb (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.12.1
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="3e2f8c93fbbc38bf4150175312954ea5245abc318179abb73fb2da6d02f58a3140e8d94b4c16a13ecc8bd070e34dd382db582258c3c426bf4bc405dbecd2ef61  rainloop-webmail-1.12.1.zip
08d4eea20176d647b82a8fb8eeed9415b21a96f2e81bbc1a7a208334e4489fe74b60ded1fd333f553a6020040fcf19121be975468785df27f2a35e363fd6a169  move-addressbook-in-etc.patch"