aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: e7fb1ff5e08e0da0640df52f37457bd02789f9cc (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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="9.0.2"
pkgrel=0
_contactsver="0.0.0.51"
_calendarver="1.1"
_tasksver="0.8.1"
_documentsver="$pkgver"
_pdfviewerver="$pkgver"
_texteditorver="$pkgver"
_mozillasyncver="1.4"
_musicver="0.3.11"
_php=php5
pkgdesc="Your own WebDAV-based cloud service"
url="http://owncloud.org"
arch="noarch"
license="AGPL"
depends="$_php ${_php}-ctype ${_php}-curl ${_php}-dom ${_php}-gd ${_php}-iconv ${_php}-json ${_php}-xml
	${_php}-xmlreader ${_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-gallery $pkgname-mozilla_sync $pkgname-music $pkgname-ldap
	$pkgname-tasks $pkgname-texteditor $pkgname-pdfviewer $pkgname-videoplayer"
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/archive/v$_tasksver.tar.gz
	owncloud.config.php

	owncloud-6-always-return-true-isSetLocaleWorking.patch
	owncloud-9-disable-chmod.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
	chmod +x "$pkgdir"${_ocwwwdir}/occ || return 1
	ln -s $_occonfdir "$pkgdir"${_ocwwwdir}/config || return 1
	install -m660 ../owncloud.config.php "$pkgdir"${_occonfdir}/config.php
	install -m664 .htaccess "$pkgdir"${_ocwwwdir}/.htaccess
	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} || return 1
	elif [ "$1" = "src" ]; then
		local appname="${subpkgname#$pkgname-}"
		mv "$srcdir"/$2 "$subpkgdir"${_ocappsdir}/$appname || return 1
	fi
	chown -R :www-data "$subpkgdir"${_ocappsdir} || return 1
	chmod 770 "$subpkgdir"${_ocappsdir} || return 1
}

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 encryption
}

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

gallery() {
	arch="noarch"
	pkgdesc="ownCloud integrated gallery application"
	depends="owncloud"
	_mv_app pkg gallery
}

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-$_tasksver
}

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

videoplayer() {
	arch="noarch"
	pkgdesc="ownCloud integrated video viewer"
	depends="owncloud"
	provides="$pkgname-videoviewer"
	_mv_app pkg files_videoplayer
}

md5sums="a0131f5cae2b1503b8de6796487c1bdc  owncloud-9.0.2.tar.bz2
8362a691e0edc181c1e4c6c2da3a6e88  owncloud-contacts-0.0.0.51.tar.gz
3a23fd76d55f7f8306b2eee162729670  owncloud-calendar-1.1.tar.gz
7406780d79176e3b0544bb9494ce06d0  owncloud-documents-9.0.2.tar.gz
dc7d1e32faf348517bbc78d880dbeb44  owncloud-texteditor-9.0.2.tar.gz
e98fdb10ff4139b4259e2a183a88975a  owncloud-mozilla_sync-1.4.tar.gz
8452cdd43587469e680597a2c10c830e  owncloud-music-0.3.11.zip
a480ce37a663308c11d5a04d0d0c1402  owncloud-pdfviewer-9.0.2.tar.gz
b12ac39aead677329675c27bb549374a  owncloud-tasks-0.8.1.tar.gz
2c131b3ed0632bef7c372b6ec09f55cb  owncloud.config.php
f497dbf3a67d14fc9049ca680673c805  owncloud-6-always-return-true-isSetLocaleWorking.patch
5e393c5cbfa0dc9f5d4d35dbdef3b839  owncloud-9-disable-chmod.patch"
sha256sums="845c43fe981fa0fd07fc3708f41f1ea15ecb11c2a15c65a4de191fc85b237c74  owncloud-9.0.2.tar.bz2
1cff826bd37b6cf0e19bd569b91a72d9932083e77d8c55bc505f92cd8a04af27  owncloud-contacts-0.0.0.51.tar.gz
6da684c75774b4c9f422011de10bc62352e90e16e80c3d6836578096c6d4de21  owncloud-calendar-1.1.tar.gz
3ae4f868c58c8ad4f303b6638e34003e1c6f3973885377cb10fb1aa19fb2b80b  owncloud-documents-9.0.2.tar.gz
25bdbbf69cfdd9848b94c00dddd6f911622c650b11207c776383db3243ca60ee  owncloud-texteditor-9.0.2.tar.gz
314621c290daee93429d881e78d8cae13faaca3205b23860f06450633c5c3b6a  owncloud-mozilla_sync-1.4.tar.gz
e480e639e48419977f06822aa92f1245c21a43d9aafc156edb6fd097873a73ca  owncloud-music-0.3.11.zip
02bb27f991c12d8921c48b0000fb7ef2ef8eec9a19ae9f0badf61286ac3d676f  owncloud-pdfviewer-9.0.2.tar.gz
1120f7c45c98b3bf790e0842808c1c24e5482bd7f7a5667be2216d0f4e1af2f4  owncloud-tasks-0.8.1.tar.gz
41b9bcd59604b8150e1a865ab37c2cbbe433d49eb3ef2ba2f55c37b3a8cc41c9  owncloud.config.php
3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762  owncloud-6-always-return-true-isSetLocaleWorking.patch
9739810a5f040ff1488559fb17360b65aec94a4024b2f74437785420336d4d72  owncloud-9-disable-chmod.patch"
sha512sums="3ae3e107e38bae273ce0e689352a1b9d97ce7eef7b1b5ea01dc4f97479045d3d861b7c0f708ab88480414aac9f15e069a4750096ff6f89a40812c8cdd7a26cd4  owncloud-9.0.2.tar.bz2
fc7370250bb13cd4955d19c507434efae94d33bf7c3e4f5d80b5651ee930b66b473184782d7f38272700597ae74067d68a47a18e5d0487210c5812053daabf84  owncloud-contacts-0.0.0.51.tar.gz
530f2aa92a15389a33e5cb3fe3768918fbe8644cf8cfb645559a924c68739d353c9a923a5ec6c344773833249982b71362b2d384256469a6c235c1c95207c341  owncloud-calendar-1.1.tar.gz
d7231a87f609ef4c4c69a2f782974d740f2b824e59eb7819f22bfc345662393b99ed26ef576726606eb725b935a9da69388f03cf361bf0de59886bdecb50031e  owncloud-documents-9.0.2.tar.gz
6bbe84c4f971d3bff3e0d74aa5216316458acdc6fd4aad1de7334118afa11d3b3d41492b65c2792d528605558ccd7a99d907e902e0b53e58fffda1f2c170d4f5  owncloud-texteditor-9.0.2.tar.gz
a279a6e0109aa3b17442265358284583d846f88afa3746005792b93dffbd3396dc1277ce892b2a226496038ec6e8ec7ef2295b981ef8acf1a3fa3c32886623d0  owncloud-mozilla_sync-1.4.tar.gz
fde1758a512a960985cbbfde9294f77458fad2cb4801daceedac76a58dbb2862f2586cb17376915cdcb47a768c75be46f863834a96f1148eae98285217491d59  owncloud-music-0.3.11.zip
4bd211e95776c392c0cbc5f5f595cdf19fa711a4cfd3ae46ff5333edb087a0f83178ef472676d791dce8c679fc048dd7fdec3d6070ae91196fa1205e075f0740  owncloud-pdfviewer-9.0.2.tar.gz
5b0880cd86588142d32f77dbcdd3fe7406541b790012528ba8efdceb62d0638a7d4b11e91b5fd3f0c5b4f5cfb3ae8213b28a41b4e7fa0fa0a8e978163175ec00  owncloud-tasks-0.8.1.tar.gz
b4bd206bff5f4871f023344ea03afd52795876d4563da00ccd026c5d976570dfb0923cd218449395e238a2b23de516f6a655a69539bc5a7d0cb67048c94bb15f  owncloud.config.php
4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13  owncloud-6-always-return-true-isSetLocaleWorking.patch
62f4c4e5f0c23aea98a3cefdd5f08773fc34039ef444d167063f7b1f4640aee48bd108776e6f28f12acec3833f7bcf6b76aaa300c41f5f3fc8fc536c9f6b7586  owncloud-9-disable-chmod.patch"