aboutsummaryrefslogtreecommitdiffstats
path: root/main/owncloud
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2014-03-19 14:33:12 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2014-03-19 14:34:43 +0000
commit436abe5bafbe71dfb62e2eb0d187c4a9a3749574 (patch)
treec7999e7fefc9b49b44d68bcf64fdf9ce23735acd /main/owncloud
parentb557971b9515e4d632864a7868e9035f0c46d8f1 (diff)
downloadaports-436abe5bafbe71dfb62e2eb0d187c4a9a3749574.tar.bz2
aports-436abe5bafbe71dfb62e2eb0d187c4a9a3749574.tar.xz
main/owncloud: use www-data group, make default apps dir read-only, workaround locale check
Diffstat (limited to 'main/owncloud')
-rw-r--r--main/owncloud/APKBUILD54
-rw-r--r--main/owncloud/owncloud.config.php28
-rw-r--r--main/owncloud/owncloud.post-install8
-rw-r--r--main/owncloud/owncloud.post-upgrade8
4 files changed, 53 insertions, 45 deletions
diff --git a/main/owncloud/APKBUILD b/main/owncloud/APKBUILD
index aadcf0159e..0378ea984b 100644
--- a/main/owncloud/APKBUILD
+++ b/main/owncloud/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname="owncloud"
pkgver="6.0.2"
-pkgrel=0
+pkgrel=1
pkgdesc="Your own WebDAV-based cloud service"
url="http://owncloud.org"
arch="all"
@@ -10,7 +10,7 @@ depends="php php-ctype php-dom php-gd php-iconv php-json php-zlib
php-zip"
depends_dev=
makedepends="$depends_dev"
-install="$pkgname.post-install $pkgname.post-upgrade"
+install=
subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-documents
$pkgname-external $pkgname-texteditor $pkgname-videoviewer"
replaces="$pkgname-plugins"
@@ -19,9 +19,16 @@ source="http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2
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
@@ -37,51 +44,54 @@ build() {
package() {
cd "$_builddir"
- mkdir -p "$pkgdir"/etc/owncloud
- mkdir -p "$pkgdir"/var/lib/owncloud/data
- mkdir -p "$pkgdir"/usr/share/webapps/owncloud
+ mkdir -p "$pkgdir"${_occonfdir}
+ mkdir -p "$pkgdir"${_ocdatadir}
+ mkdir -p "$pkgdir"${_ocwwwdir}
rm -rf config data
- mv * "$pkgdir"/usr/share/webapps/owncloud || exit
- ln -s /etc/owncloud "$pkgdir"/usr/share/webapps/owncloud/config || exit 1
- mv "$pkgdir"/usr/share/webapps/owncloud/apps "$pkgdir"/var/lib/owncloud || exit 1
- ln -s /var/lib/owncloud/apps "$pkgdir"/usr/share/webapps/owncloud/apps || exit 1
- install -m640 ../owncloud.config.php "$pkgdir"/etc/owncloud/config.php
+ 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"/usr/share/webapps/owncloud
+ mkdir -p "$subpkgdir"${_ocwwwdir}
}
sqlite() {
arch="noarch"
pkgdesc="ownCloud SQLite support"
depends="owncloud php-sqlite3 php-pdo_sqlite"
- mkdir -p "$subpkgdir"/usr/share/webapps/owncloud
+ 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"/usr/share/webapps/owncloud
+ mkdir -p "$subpkgdir"${_ocwwwdir}
}
plugins() {
arch="noarch"
pkgdesc="ownCloud 3rdparty plugins"
depends="owncloud"
- mkdir -p "$subpkgdir"/usr/share/webapps/owncloud
- mv "$pkgdir"/usr/share/webapps/owncloud/3rdparty \
- "$subpkgdir"/usr/share/webapps/owncloud
+ mkdir -p "$subpkgdir"${_ocwwwdir} || exit 1
+ mv "$pkgdir"${_ocwwwdir}/3rdparty "$subpkgdir"${_ocwwwdir}
}
_mv_app() {
- mkdir -p "$subpkgdir"/var/lib/owncloud/apps
- mv "$pkgdir"/var/lib/owncloud/apps/$1 \
- "$subpkgdir"/var/lib/owncloud/apps
+ mkdir -p "$subpkgdir"${_ocappsdir} || exit 1
+ mv "$pkgdir"${_ocappsdir}/$1 "$subpkgdir"${_ocappsdir}
}
texteditor() {
@@ -113,14 +123,14 @@ external() {
}
md5sums="da5286427771c68d14b351cf68f515fd owncloud-6.0.2.tar.bz2
-ff335ac21c1dd21520e7218a7240d713 owncloud.config.php
+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="a5a194ad07fca7cbf158b660cc098c6364590bdd15d086069221faf4386b713f owncloud-6.0.2.tar.bz2
-2bdcb131bee57aaee8f073db66a199c999b95b4a7bf741ae55ee2e0b7b359a1a owncloud.config.php
+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="8a603e3a7cc16a8e4951f0c9ad8919cea04c9cefe1d90db1ee377a51011c0604bed6c620d59e83650e557f89acba2d86060e6238b1f96023dae473d8e63cfa0f owncloud-6.0.2.tar.bz2
-54b7fcb7fd9bcd2992b71205df3fe51597deda32c2919dfd43dd80a803568fd28c78492024eb8041f04bb23de749ee6225a8029dd8234cc861ce5501f810827a owncloud.config.php
+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"
diff --git a/main/owncloud/owncloud.config.php b/main/owncloud/owncloud.config.php
index d189b9adc3..be37d17691 100644
--- a/main/owncloud/owncloud.config.php
+++ b/main/owncloud/owncloud.config.php
@@ -1,11 +1,25 @@
<?php
$CONFIG = array(
-"datadirectory" => '/var/lib/owncloud/data',
-"version" => '6.0.0',
-"dbname" => 'owncloud',
-"dbhost" => 'localhost',
-"dbuser" => 'owncloud',
-"installed" => false,
-"loglevel" => '0',
+ 'datadirectory' => '/var/lib/owncloud/data',
+ 'apps_path' => array (
+ 0 => array (
+ "path" => OC::$SERVERROOT."/apps",
+ "url" => "/apps",
+ "writable" => false,
+ ),
+ /* Uncomment this and install your apps here
+ 1 => array (
+ "path" => "/var/www/localhost/htdocs/myoc_apps",
+ "url" => "/myoc_apps",
+ "writable" = true,
+ ),
+ */
+ ),
+ 'version' => '6.0.2',
+ 'dbname' => 'owncloud',
+ 'dbhost' => 'localhost',
+ 'dbuser' => 'owncloud',
+ 'installed' => false,
+ 'loglevel' => '0',
);
?>
diff --git a/main/owncloud/owncloud.post-install b/main/owncloud/owncloud.post-install
deleted file mode 100644
index 7662899bd8..0000000000
--- a/main/owncloud/owncloud.post-install
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-echo "*"
-echo "* Please give ownership to the web server user, the following directories:"
-echo "*"
-echo "* /etc/owncloud"
-echo "* /var/lib/owncloud/data"
-echo "* /var/lib/owncloud/apps"
-echo "*"
diff --git a/main/owncloud/owncloud.post-upgrade b/main/owncloud/owncloud.post-upgrade
deleted file mode 100644
index cae2dc9dad..0000000000
--- a/main/owncloud/owncloud.post-upgrade
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-echo "*"
-echo "* Please give ownership to the web server user, the following directories:"
-echo "*"
-echo "* /etc/owncloud"
-echo "* /var/lib/owncloud/data"
-echo "* /usr/share/webapps/owncloud/apps"
-echo "*"