aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: 515f7b524d92f31f83561901d2a5eaa2b5171b45 (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
82
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=owncloud
pkgver=4.5.2
pkgrel=0
pkgdesc="Your own WebDAV-based cloud service"
url="http://owncloud.org"
arch="noarch"
license="AGPL"
depends="php php-ctype php-gd php-json php-zip"
depends_dev=
makedepends="$depends_dev"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-pgsql $pkgname-plugins $pkgname-sqlite
	$pkgname-texteditor $pkgname-videoviewer"
source="http://download.owncloud.org/releases/$pkgname-$pkgver.tar.bz2
	owncloud.config.php"


_builddir="$srcdir"/$pkgname

prepare() {
	cd "$_builddir"
	# apply patches here
}

build() {
	cd "$_builddir"
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/etc/owncloud
	mkdir -p "$pkgdir"/var/lib/owncloud/data
	mkdir -p "$pkgdir"/usr/share/webapps/owncloud
	rm -rf config data
	mv * "$pkgdir"/usr/share/webapps/owncloud
	ln -s /etc/owncloud "$pkgdir"/usr/share/webapps/owncloud/config || exit 1
	#ln -s /var/lib/owncloud/data "$pkgdir"/usr/share/webapps/owncloud/data || exit 1
	install -m640 ../owncloud.config.php "$pkgdir"/etc/owncloud/config.php
}

pgsql() {
	pkgdesc="ownCloud PostgreSQL support"
	depends="owncloud php-pgsql php-pdo_pgsql"
	mkdir -p "$subpkgdir"/usr/share/webapps/owncloud
}

sqlite() {
	pkgdesc="ownCloud SQLite support"
	depends="owncloud php-sqlite php-pdo_sqlite"
	mkdir -p "$subpkgdir"/usr/share/webapps/owncloud
}

plugins() {
	pkgdesc="ownCloud 3rdparty plugins"
	depends="owncloud"
	mkdir -p "$subpkgdir"/usr/share/webapps/owncloud
	mv "$pkgdir"/usr/share/webapps/owncloud/3rdparty \
	 "$subpkgdir"/usr/share/webapps/owncloud
}

_mv_app() {
	mkdir -p "$subpkgdir"/usr/share/webapps/owncloud/apps
	mv "$pkgdir"/usr/share/webapps/owncloud/apps/files_$1 \
	 "$subpkgdir"/usr/share/webapps/owncloud/apps
}

texteditor() {
	pkgdesc="ownCloud integrated text editor"
	depends="ownCloud"
	_mv_app texteditor
}

videoviewer() {
	pkgdesc="ownCloud integrated video viewer"
	depends="ownCloud"
	_mv_app videoviewer
}


md5sums="a23cd7567a35d7c0d3b5e50566ca3853  owncloud-4.5.2.tar.bz2
a8ae737f61fb8597ccbbb34b27b96100  owncloud.config.php"