aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: e9211ba008490fbf7b286e2f98a0e2d09b03e036 (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="9.0.0"
pkgrel=1
_contactsver="1.0.0.0"
_calendarver="1.0"
_tasksver="0.8.1"
_documentsver="$pkgver"
_pdfviewerver="$pkgver"
_texteditorver="$pkgver"
_mozillasyncver="1.4"
_musicver="0.3.10"
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-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/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
}

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
}

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

md5sums="1f14d7f2faa0ba704901e062301854db  owncloud-9.0.0.tar.bz2
c8e28f8d3557d24c98d16a235ac3b60c  owncloud-contacts-1.0.0.0.tar.gz
e9f40fccdafa6c8cd8c028f4d5fddf24  owncloud-calendar-1.0.tar.gz
fdbd3757d1bdbadfd3e0e81670db746a  owncloud-documents-9.0.0.tar.gz
736acdf1497f77e545faea221796484d  owncloud-texteditor-9.0.0.tar.gz
e98fdb10ff4139b4259e2a183a88975a  owncloud-mozilla_sync-1.4.tar.gz
9f1d98ba83039e42d53487348ff22df2  owncloud-music-0.3.10.zip
2a9beacbdd90b477979fac48af7db33a  owncloud-pdfviewer-9.0.0.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="d16737510a77a81489f7c4d5e19b0756fa2ea1c5081ba174b0fec0f00da3a77c  owncloud-9.0.0.tar.bz2
225f9454b1dce0c3975d19e1dfa0f9f3fb812edbbc0052f0f75f4559edbc2c32  owncloud-contacts-1.0.0.0.tar.gz
c0260c85e72d0e333e650d7149fff742798b3a7a8c0ab325302f80c0752fe0ce  owncloud-calendar-1.0.tar.gz
c50638127f612034e6d4235d6b62a899dad2c6a7e0266c2183384427c45e552a  owncloud-documents-9.0.0.tar.gz
e8e51eac01f32701c35a86d6adc0a8c593a459d908bda44f4af54d596bf3b475  owncloud-texteditor-9.0.0.tar.gz
314621c290daee93429d881e78d8cae13faaca3205b23860f06450633c5c3b6a  owncloud-mozilla_sync-1.4.tar.gz
f71eb59637f2a688e66283abf3a232f9e8cbb9aef189475115271ea64d296ff2  owncloud-music-0.3.10.zip
73b430d75623e69227e98bf00bf53a75fad7ce3a32d59a6b1322b5d8f0dc9a8d  owncloud-pdfviewer-9.0.0.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="c82f42d227ee59ed2875133230e303a0b51ee28b21e4d3c253d2f142aed514050e3138f57082d02350a3c7a69f28ba34d3fb4dc86ce51384119c817196963e55  owncloud-9.0.0.tar.bz2
497c311063f0880487874c37e5a31170c7e973191f2929fd8802fadfaef61bbd7930b522304f08fc9306f7a6c47dc2e7d0abf429687cfecb08310b7a0c1bf0bc  owncloud-contacts-1.0.0.0.tar.gz
14d1921b2d01f75f1bfb7287151911715448b84a628d96789cbaa58e89328bc04d644b7b49f5fb280987a2a20fee612a95da8a2b0ca26abb05f5ccd5d1030c34  owncloud-calendar-1.0.tar.gz
75a7051fb6c9105ed9698e3a8b6f2dc85597429216a7d3d6cd403534cdad7b65d4248d556ce79f101b813cafbfcc9880f9e9cc4031167a92fc2bd5cf227796a8  owncloud-documents-9.0.0.tar.gz
c455e01745126e9714b763ae32f676cc69090b586d994fcbbf7f68d22ef6607c4cd608b8f4f36da7e9e278757564a9155eeaafe682e03f567fae1f4473edad36  owncloud-texteditor-9.0.0.tar.gz
a279a6e0109aa3b17442265358284583d846f88afa3746005792b93dffbd3396dc1277ce892b2a226496038ec6e8ec7ef2295b981ef8acf1a3fa3c32886623d0  owncloud-mozilla_sync-1.4.tar.gz
d229b82552b71bf34574c61b6dd2987ac0ece3ed2021530df7cf63170033b9d69703d14fae8b0c66418339756b6e729f5dc3898f5117898f161f0ff76e723f91  owncloud-music-0.3.10.zip
46e416d10ca27596c0ad9d55782036f86282a81fe99a28e4252113c80718f67802f6c1e52d246e453f4e26f3951cc003d51220eb965fc79a8e075b0e70511fce  owncloud-pdfviewer-9.0.0.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"