aboutsummaryrefslogtreecommitdiffstats
path: root/main/roundcubemail/APKBUILD
blob: d216d6bc24b517ddd5b68c468db8a885a016fd41 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=roundcubemail
pkgver=0.8.6
pkgrel=0
pkgdesc="A PHP web-based mail client"
url="http://www.roundcube.net"
arch="noarch"
license="GPL3+"
install="$pkgname.post-upgrade"
depends="php php-imap php-xml php-json php-dom php-exif"
makedepends=""
subpackages="$pkgname-installer $pkgname-doc"
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname-$pkgver.tar.gz
	fix-dirs.patch"

_src="$srcdir"/roundcubemail-$pkgver

prepare() {
	cd "$_src"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done

	# fix permissions
	find . -type f -print | xargs chmod a-x
	# remove .htaccess
	find . -name \.htaccess -print | xargs rm -f

	# fixup paths to use the right paths
	sed -i -e 's|temp/|/tmp/|' \
		-e 's|config/|/etc/roundcube/|' \
		-e 's|logs/|/var/log/roundcube/|' \
		config/main.inc.php.dist || return 1

	# cleanup 
	sed -i 's/\r//' SQL/mssql.initial.sql
	rm -rf logs temp
}

build() {
	return 0
}

package() {
	_instdir="$pkgdir"/usr/share/webapps/roundcube
	mkdir -p "${_instdir}"
	cd "${_instdir}"
	cp -rp "$srcdir"/roundcubemail-$pkgver/* .
	# install config in /etc/roundcube so config files are not overwritten
	# on upgrades
	mkdir -p "$pkgdir"/etc/
	mv config "$pkgdir"/etc/roundcube

	install -d "$pkgdir"/var/log/roundcube
	mkdir -p "$pkgdir"/usr/share/doc/roundcube
	mkdir -p "$pkgdir"/usr/share/licenses/roundcube
	for file in CHANGELOG INSTALL README.md UPGRADING
	do
		mv "$pkgdir"/usr/share/webapps/roundcube/$file \
		  "$pkgdir"/usr/share/doc/roundcube || exit 1
	done
	mv "$pkgdir"/usr/share/webapps/roundcube/LICENSE \
	  "$pkgdir"/usr/share/licenses/roundcube || exit 1
}

installer() {
	pkgdesc="Roundcubemail installer script"
	mkdir -p "$subpkgdir"/usr/share/webapps/roundcube
	mv "$pkgdir"/usr/share/webapps/roundcube/installer \
		"$subpkgdir"/usr/share/webapps/roundcube
}

md5sums="d8fc9958e45dccea0b016e84fde288aa  roundcubemail-0.8.6.tar.gz
987406fd8f12719544aeb057973b368e  fix-dirs.patch"
sha256sums="88128db0dc57651e08beb3c4811bc9e33aca1c39a50cfc9efb5d14b0baa17704  roundcubemail-0.8.6.tar.gz
dcc49f9e43d443477244448ed746f86b56bbacb942adf9ca5613e8b3fb50c1a7  fix-dirs.patch"
sha512sums="b49956ab923bee773aeaa140c24c6ca012a6fae05bb2cb664e874f4bb14436d9aaedee6c2d82638f1a1db6ab58dfd8cc3b9d0144d256d07f662565c4fa287d63  roundcubemail-0.8.6.tar.gz
cfd169b3e15bc5ffd98179cf295311c24188e4d94278d9b8020508648abb96088fe511599bd7e2be3c3ca5948c29f4f35491e67244821c2752ddcdfe4cd20959  fix-dirs.patch"