aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud/APKBUILD
blob: 6802ddae65ad9ffd941f8a9f939c8d8cf7200066 (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
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="6.0.3"
pkgrel=0
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-zlib
	php-zip"
depends_dev=
makedepends="$depends_dev"
install=
subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-documents
	$pkgname-external $pkgname-texteditor $pkgname-videoviewer"
replaces="$pkgname-plugins"
source="http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2
	owncloud.config.php
	owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch
	owncloud-6-always-return-true-isSetLocaleWorking.patch
	"
pkggroups="www-data"

_builddir="$srcdir"/$pkgname

_ocvardir="/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} || exit
	ln -s $_occonfdir "$pkgdir"${_ocwwwdir}/config || exit 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 || exit 1
		chmod 770 $dir || exit 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} || exit 1
	mv "$pkgdir"${_ocwwwdir}/3rdparty "$subpkgdir"${_ocwwwdir}
}

_mv_app() {
	mkdir -p "$subpkgdir"${_ocappsdir} || exit 1
	mv "$pkgdir"${_ocappsdir}/$1 "$subpkgdir"${_ocappsdir}
}

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

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

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

external() {
	arch="noarch"
	pkgdesc="ownCloud integrated video viewer"
	depends="owncloud"
	_mv_app files_external
}

md5sums="007d6025cca1e46abd52bc6700149bc9  owncloud-6.0.3.tar.bz2
7ede4afaefb4c03a433b14408052daf9  owncloud.config.php
e033c3211983429ef811ffea8159bb46  owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch
f497dbf3a67d14fc9049ca680673c805  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha256sums="422b831ed5892ce20642a75130eb7ac755c678b798675778d857319c1afbc28a  owncloud-6.0.3.tar.bz2
5d48a5049130f6ba441901516350f020fc3aa4dabb2bd4a28848cffa060164da  owncloud.config.php
0dc56930cc725def606aabdb3ba380fc38daa203b4544ddde523a7d1f962ade8  owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch
3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762  owncloud-6-always-return-true-isSetLocaleWorking.patch"
sha512sums="46206907c96df66687c91807fae376271990b098fec0efc578eed9aa6246004a1a5ecbcd0f846b8f815792a41ff55b37fa6264ea6ed0933fb7ea561f3f13a8cb  owncloud-6.0.3.tar.bz2
f0532af3a377595c41a62e69e4d179c98c27a59b6e30b21f2f3d24652f4aa3d79a029c061adf6abb90a18e09e0808196933e40f34a59cfbfa780835cb1648b47  owncloud.config.php
1c05b9c96c92e74d0b603fe76facb4fc9510dbb18dc210cd0b073ca2776886416303abb28d66266982a60e67aa6c7ba06c2ad45dfd926f3a6260f58f1a90e882  owncloud-5.0.13-remove-shares-where-files-do-not-exist-postgres.patch
4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13  owncloud-6-always-return-true-isSetLocaleWorking.patch"