aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: f7ac29c20263676c7cf66b4565e9f459407fc7a3 (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
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="8.2.9"
pkgrel=0
_contactsver="0.5.0.0"
_calendarver="0.8.2"
_tasksver="0.8"
_documentsver="0.11.1"
_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/owncloudarchive/contacts/releases/download/v$_contactsver/contacts.tar.gz
	$pkgname-calendar-$_calendarver.zip::https://github.com/owncloudarchive/calendar/releases/download/v$_calendarver/calendar.zip
	$pkgname-documents-$_documentsver.zip::https://github.com/owncloud/documents/releases/download/$_documentsver/documents.zip
	$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
	$pkgname-texteditor-$_texteditorver.tar.gz::https://github.com/owncloud/files_texteditor/archive/v$_texteditorver.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}
	install -m664  "$_builddir"/resources/config/ca-bundle.crt "$pkgdir"${_occonfdir}/ca-bundle.crt || return 1
	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
}

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

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

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

md5sums="fa07d3de94699d6c7b9f5db48a58b15b  owncloud-8.2.9.tar.bz2
106e5c74e26989b6a3dc9dd4a69df5f1  owncloud-contacts-0.5.0.0.tar.gz
95570ae37e1985678daf3b1f4008d3a9  owncloud-calendar-0.8.2.zip
581c2e0874ff961498845c49efa6f46b  owncloud-documents-0.11.1.zip
e98fdb10ff4139b4259e2a183a88975a  owncloud-mozilla_sync-1.4.tar.gz
9f1d98ba83039e42d53487348ff22df2  owncloud-music-0.3.10.zip
45959f6b466a7a045f966465b4f4ed53  owncloud-pdfviewer-8.2.9.tar.gz
ba3838830c4ce81ebc299d67526cc8d7  owncloud-tasks-0.8.tar.gz
623e381a6917e1005f5323f61175601d  owncloud-texteditor-8.2.9.tar.gz
c2d6aedbec4766375cfe51a69fe28e97  owncloud.config.php
f497dbf3a67d14fc9049ca680673c805  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha256sums="fc2673c038868580fc92954f1f4a5acd15946d371948544f81e8c9975abfff25  owncloud-8.2.9.tar.bz2
3ab3d121576c4136c5e5e43af02843d16d2badabe7475efc999e4c1a9fabfff8  owncloud-contacts-0.5.0.0.tar.gz
28cb63f3e4e3086831f87cf467092d7937d18be4ddbcabe31b5ce5e1af61b68f  owncloud-calendar-0.8.2.zip
6b5465a573022a2cd888ca213ed52441a0f53b7ec023cc9a060aa1c8a6805061  owncloud-documents-0.11.1.zip
314621c290daee93429d881e78d8cae13faaca3205b23860f06450633c5c3b6a  owncloud-mozilla_sync-1.4.tar.gz
f71eb59637f2a688e66283abf3a232f9e8cbb9aef189475115271ea64d296ff2  owncloud-music-0.3.10.zip
6fc9b853936365ebd92016b869575eac7dbbe0e434e5eaf253036a34d30d1f48  owncloud-pdfviewer-8.2.9.tar.gz
a5ec7d004372721803293e5dce3cff818acdfcfe986bf84ff9de560b3b99fc01  owncloud-tasks-0.8.tar.gz
847b0c2c8cd999fb3a6847f9ad6078ab705e60507ea207165fa007b5659cb6c8  owncloud-texteditor-8.2.9.tar.gz
717daea08063132547a431768e9e4c449397ede2d73d2b70c235b6af11d69a85  owncloud.config.php
3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha512sums="a8ab358947e930d96719b45845ed262004c8611fcde8ae34e08ececfe057a017bd7348cba7ded0433220fbab088484baaf357e441021044fa8283d4612c1af2e  owncloud-8.2.9.tar.bz2
ac7dbf6f461bd3e20865652cb64a0ff41e4b5fd15a9e415ac741ff60bf5a40ba2bcbe67522ca01fd0933594a50e9f18beb36c783b69661e5ddffbdb60f8a0508  owncloud-contacts-0.5.0.0.tar.gz
724168868452fcd2a4e7c5621267c7a63c97ccb0b58c44efc30999b92b9964c68f2ffb53e9279e092337f1b26568267a86627cd790af01d687047c977477f570  owncloud-calendar-0.8.2.zip
1e2378a862f3015129610fe3fd979f2452e4f97cc880d4854f1f5d825a12a73c013a23bfdd3cd6efc8536be2efa014997e8df74bcb736b80415396843181ffb5  owncloud-documents-0.11.1.zip
a279a6e0109aa3b17442265358284583d846f88afa3746005792b93dffbd3396dc1277ce892b2a226496038ec6e8ec7ef2295b981ef8acf1a3fa3c32886623d0  owncloud-mozilla_sync-1.4.tar.gz
d229b82552b71bf34574c61b6dd2987ac0ece3ed2021530df7cf63170033b9d69703d14fae8b0c66418339756b6e729f5dc3898f5117898f161f0ff76e723f91  owncloud-music-0.3.10.zip
caaed8a8a83dd91b1a000d90410af75d4bc1ae1636d2794b65d19e7838a663eb6b9239da39ec8783c87ec8d9fd184659d1b7ab0d6f463f4861c11f4f53be34e8  owncloud-pdfviewer-8.2.9.tar.gz
f69f9ac50ae7aa10036a35cf20ac3aa89a5c41617f811d04e6026438c0f8ceeda764621ccf5bbe2f086ce29c12260b65ee1db208ff8d74c183d55970d4c9af4a  owncloud-tasks-0.8.tar.gz
9c1f5ab90dc11c230b172f9b8918c673096ad9f801d0c134f4b91c3c00a416d0021ebbdbcf039fffeff4e15e51c5e70a73a2a8cc9a3db1340b381dc8787d02db  owncloud-texteditor-8.2.9.tar.gz
c4b2c38aca1a71a46b91d23f98e65d2350421697dee119adefda560b3606177f858ea32b36a8f622c03041a2f75a87bf8532e701954237c8b46874f5895e731f  owncloud.config.php
4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13  owncloud-6-always-return-true-isSetLocaleWorking.patch"