aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: 603f355e36497e88dc06b176a692c60f80188f24 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="8.0.4"
pkgrel=0
_contactsver="$pkgver"
_calendarver="$pkgver"
_tasksver="0.6"
_documentsver="$pkgver"
_pdfviewerver="$pkgver"
_texteditorver="$pkgver"
_mozillasyncver="1.4"
_musicver="0.3.5"
pkgdesc="Your own WebDAV-based cloud service"
url="http://owncloud.org"
arch="noarch"
license="AGPL"
depends="php php-ctype php-dom php-gd php-iconv php-json php-xml php-zlib
	php-zip"
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-encryption
	$pkgname-calendar $pkgname-contacts $pkgname-documents $pkgname-external
	$pkgname-mozilla_sync $pkgname-music $pkgname-ldap $pkgname-tasks
	$pkgname-texteditor $pkgname-pdfviewer $pkgname-videoviewer"
replaces="$pkgname-plugins"

source="https://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2
	$pkgname-contacts-$_contactsver.tar.gz::https://github.com/owncloud/contacts/archive/v$_contactsver.tar.gz
	$pkgname-calendar-$_calendarver.tar.gz::https://github.com/owncloud/calendar/archive/v$_calendarver.tar.gz
	$pkgname-documents-$_documentsver.tar.gz::https://github.com/owncloud/documents/archive/v$_documentsver.tar.gz
	$pkgname-texteditor-$_texteditorver.tar.gz::https://github.com/owncloud/files_texteditor/archive/v$_texteditorver.tar.gz
	$pkgname-mozilla_sync-$_mozillasyncver.tar.gz::https://github.com/owncloud/mozilla_sync/archive/v$_mozillasyncver.tar.gz
	$pkgname-music-$_musicver.zip::https://github.com/owncloud/music/releases/download/v$_musicver/music.zip
	$pkgname-pdfviewer-$_pdfviewerver.tar.gz::https://github.com/owncloud/files_pdfviewer/archive/v$_pdfviewerver.tar.gz
	$pkgname-tasks-$_tasksver.tar.gz::https://github.com/owncloud/tasks/releases/download/v$_tasksver/tasks.tar.gz
	owncloud.config.php
	owncloud-6-always-return-true-isSetLocaleWorking.patch
	"
pkggroups="www-data"

#_builddir="$srcdir"/core-$pkgver
_builddir="$srcdir"/$pkgname

_ocbasedir="/var/lib/owncloud"
_ocdatadir="$_ocbasedir/data"
_ocwwwdir="/usr/share/webapps/owncloud"
_ocappsdir="$_ocwwwdir/apps"
_occonfdir="/etc/owncloud"


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

build() {
	cd "$_builddir"
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"${_occonfdir}
	mkdir -p "$pkgdir"${_ocdatadir}
	mkdir -p "$pkgdir"${_ocwwwdir}
	rm -rf config data
	mv * "$pkgdir"${_ocwwwdir} || return 1
	ln -s $_occonfdir "$pkgdir"${_ocwwwdir}/config || return 1
	install -m660 ../owncloud.config.php "$pkgdir"${_occonfdir}/config.php
	for dir in \
	 "$pkgdir"${_occonfdir} \
	 "$pkgdir"${_ocdatadir} \
	 "$pkgdir"${_ocappsdir}; do
		chown -R :www-data $dir || return 1
		chmod 770 $dir || return 1
	done
}

pgsql() {
	arch="noarch"
	pkgdesc="ownCloud PostgreSQL support"
	depends="owncloud php-pgsql php-pdo_pgsql php-pear-mdb2-driver-pgsql"
	mkdir -p "$subpkgdir"${_ocwwwdir}
}

sqlite() {
	arch="noarch"
	pkgdesc="ownCloud SQLite support"
	depends="owncloud php-sqlite3 php-pdo_sqlite"
	mkdir -p "$subpkgdir"${_ocwwwdir}
}

mysql() {
	arch="noarch"
	pkgdesc="ownCloud MySQL support"
	depends="owncloud php-mysql php-pdo_mysql php-pear-mdb2-driver-mysql"
	mkdir -p "$subpkgdir"${_ocwwwdir}
}

plugins() {
	arch="noarch"
	pkgdesc="ownCloud 3rdparty plugins"
	depends="owncloud"
	mkdir -p "$subpkgdir"${_ocwwwdir} || return 1
	mv "$pkgdir"${_ocwwwdir}/3rdparty "$subpkgdir"${_ocwwwdir}
}

_mv_app() {
	mkdir -p "$subpkgdir"${_ocappsdir} || return 1
	if [ "$1" = "pkg" ]; then
		mv "$pkgdir"${_ocappsdir}/$2 "$subpkgdir"${_ocappsdir}
	elif [ "$1" = "src" ]; then
		mv "$srcdir"/$2 "$subpkgdir"${_ocappsdir}
	fi
}

contacts() {
	arch="noarch"
	pkgdesc="ownCloud contacts"
	depends="owncloud"
	_mv_app src contacts-$_contactsver
}

calendar() {
	arch="noarch"
	pkgdesc="ownCloud calendar"
	depends="owncloud"
	_mv_app src calendar-$_calendarver
}

documents() {
	arch="noarch"
	pkgdesc="ownCloud integrated documents editor"
	depends="owncloud"
	_mv_app src documents-$_documentsver
}

encryption() {
	arch="noarch"
	pkgdesc="ownCloud integrated encryption support"
	depends="owncloud php-openssl"
	_mv_app pkg files_encryption
}

external() {
	arch="noarch"
	pkgdesc="ownCloud integrated external storage support"
	depends="owncloud php-curl php-ftp"
	_mv_app pkg files_external
}

ldap() {
	arch="noarch"
        pkgdesc="ownCloud integrated LDAP authentication"
	depends="owncloud php-ldap"
	_mv_app pkg user_ldap
}

mozilla_sync() {
	arch="noarch"
        pkgdesc="ownCloud Mozilla Sync app"
	depends="owncloud"
	_mv_app src mozilla_sync-$_mozillasyncver
}

music() {
	arch="noarch"
        pkgdesc="ownCloud music app"
	depends="owncloud"
	_mv_app src music
	# Correct world-writable directories
	find "${subpkgdir}${_ocappsdir}" -type d -exec chmod 775 {} \;
}

pdfviewer() {
	arch="noarch"
        pkgdesc="ownCloud integrated PDF viewer"
	depends="owncloud"
	_mv_app pkg files_pdfviewer
}

tasks() {
	arch="noarch"
	pkgdesc="ownCloud tasks"
	depends="owncloud"
	_mv_app src tasks
}

texteditor() {
	arch="noarch"
	pkgdesc="ownCloud integrated text editor"
	depends="owncloud"
	_mv_app pkg files_texteditor
}

videoviewer() {
	arch="noarch"
	pkgdesc="ownCloud integrated video viewer"
	depends="owncloud"
	_mv_app pkg files_videoviewer
}

md5sums="b49c20123cc955b7d85a55b86d099282  owncloud-8.0.4.tar.bz2
45715d31c18dd19b589094425f4262b1  owncloud-contacts-8.0.4.tar.gz
5a150c3b7a7ad798c7910d2b36e57dca  owncloud-calendar-8.0.4.tar.gz
db3a5e01a82163c2f06bbf2508670180  owncloud-documents-8.0.4.tar.gz
c94a9cfb857fe583e36880717bc57a54  owncloud-texteditor-8.0.4.tar.gz
e98fdb10ff4139b4259e2a183a88975a  owncloud-mozilla_sync-1.4.tar.gz
7e12f595a2f367b2c3fb117747a340d3  owncloud-music-0.3.5.zip
32639d67583c3fa62c6344f860a765b8  owncloud-pdfviewer-8.0.4.tar.gz
ce1cac0448434a83f678b1a95c92a648  owncloud-tasks-0.6.tar.gz
7d29c52fb9cea2537b56a534a8385f19  owncloud.config.php
f497dbf3a67d14fc9049ca680673c805  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha256sums="0a99df7d6c6cdf3d5654b306d337c5d5980fa3b490e7791d357ffd82f2249179  owncloud-8.0.4.tar.bz2
6041bea8498e7e42c15a6e0ccd276d8e0e2de42e04ca47736b06715ea94997c2  owncloud-contacts-8.0.4.tar.gz
c9896a86552dfce73dea9b4ed4890e77e0e3a2dade1af6d2a339efd2e41a8b57  owncloud-calendar-8.0.4.tar.gz
a5f0e98f05a28ddb5d6928c91fd126e0a43388fb6902ef26af7cf5f86177473f  owncloud-documents-8.0.4.tar.gz
fcc03563f8d5d4d9eb2b474916ffffdeb9be7b68e2a2aeec68bc3ed9848c9ef6  owncloud-texteditor-8.0.4.tar.gz
314621c290daee93429d881e78d8cae13faaca3205b23860f06450633c5c3b6a  owncloud-mozilla_sync-1.4.tar.gz
dee4ded5b525097961e7f93e92404a4d1844a7d645a2e5847a4dc0354affb208  owncloud-music-0.3.5.zip
8a9ea27abb470dbf46a47085ba233e86008881948edc9842c1c1704aa4c5787e  owncloud-pdfviewer-8.0.4.tar.gz
1e60df52c816ceb5e748e3231e95a22f96561df2ac0d6565819779ffff51accf  owncloud-tasks-0.6.tar.gz
7ec1e79c6dc8c154d9b7d4c6477a659be55798091f3e9d6c07fd3fcc16332692  owncloud.config.php
3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha512sums="6ce8c86fe7a145ac8ca1e2316f50e8f719f154554a161942b999674f111dd5afb54f1a7065ce8f53e1d31a8d17cd571d285fbfd6e6eb939fde2f637328f420fa  owncloud-8.0.4.tar.bz2
e615b6abebd22336cd604c61e95e02312748bf4620da0286264a956bf8b38772847640e3c06a7d5e49ab78f96ad8c897bdb94582d9d0995e0476b75103c8c3a3  owncloud-contacts-8.0.4.tar.gz
fffc91f024ec37f362ed10d3e018a0b74623d4b70165c81cc85c9349dddf73b5bd00b1411f43574139ef52c2b0c355318eb091ee7da666562e0c4385cb457ac0  owncloud-calendar-8.0.4.tar.gz
840c0b168eb184394693669f4154ac03e874440e764cabb1c69258543a607738a44e330915c4708125a2bf311cea4070d34f346931bebb10756ba88e6f369c67  owncloud-documents-8.0.4.tar.gz
81868941dc7171684db501c1b91f687dfd34c4d5dda8291e9329eafc3e90881f7eea8d66cf04bd4e4f6bdb2cca316e1061663b8dda0578e1b52b71e5f6871106  owncloud-texteditor-8.0.4.tar.gz
a279a6e0109aa3b17442265358284583d846f88afa3746005792b93dffbd3396dc1277ce892b2a226496038ec6e8ec7ef2295b981ef8acf1a3fa3c32886623d0  owncloud-mozilla_sync-1.4.tar.gz
125e13c00ed92ce94bde5208cf72f13dda5361059736aad332da00021813d61801d380543de85e54142e81b7344df1d6f959e8f918b2938b448a5f1e608aaa16  owncloud-music-0.3.5.zip
8d961813e2612b99353338b250836bb2f7ec61efceb575eb7fb2066f282c2fb6c1046604b4dd39319b56b42649f5c757e787a602c2718cf2308cc713f1f8c0da  owncloud-pdfviewer-8.0.4.tar.gz
79285efc95ec330b8d46d0360d70956b1c6c888c1da77c72377fb9ad9fa80f4410cdb09f7a611dc0887db09d8f7006c6525d41bdfe6515958a63a38fd4181f71  owncloud-tasks-0.6.tar.gz
a1142059f860ee1245ee2e324f206e1ab509ee6fcbd9020f793be557117ac5f6a8ba0e7a1677250df8662c19460e88b6ca2a24b40c14007d18535ab5110280e6  owncloud.config.php
4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13  owncloud-6-always-return-true-isSetLocaleWorking.patch"