# Maintainer: Leonardo Arena pkgname=owncloud pkgver=5.0.6 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="$pkgname.post-install $pkgname.post-upgrade" subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-texteditor $pkgname-videoviewer" replaces="$pkgname-plugins" source="http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2 owncloud.config.php " _builddir="$srcdir"/$pkgname prepare() { cd "$_builddir" return 0 } build() { cd "$_builddir" } package() { cd "$_builddir" mkdir -p "$pkgdir"/etc/owncloud mkdir -p "$pkgdir"/var/lib/owncloud/data mkdir -p "$pkgdir"/usr/share/webapps/owncloud rm -rf config data mv * "$pkgdir"/usr/share/webapps/owncloud ln -s /etc/owncloud "$pkgdir"/usr/share/webapps/owncloud/config || exit 1 #ln -s /var/lib/owncloud/data "$pkgdir"/usr/share/webapps/owncloud/data || exit 1 install -m640 ../owncloud.config.php "$pkgdir"/etc/owncloud/config.php } pgsql() { pkgdesc="ownCloud PostgreSQL support" depends="owncloud php-pgsql php-pdo_pgsql php-pear-mdb2-driver-pgsql" mkdir -p "$subpkgdir"/usr/share/webapps/owncloud } sqlite() { pkgdesc="ownCloud SQLite support" depends="owncloud php-sqlite3 php-pdo_sqlite" mkdir -p "$subpkgdir"/usr/share/webapps/owncloud } mysql() { pkgdesc="ownCloud MySQL support" depends="owncloud php-mysql php-pdo_mysql php-pear-mdb2-driver-mysql" mkdir -p "$subpkgdir"/usr/share/webapps/owncloud } plugins() { 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 } _mv_app() { mkdir -p "$subpkgdir"/usr/share/webapps/owncloud/apps mv "$pkgdir"/usr/share/webapps/owncloud/apps/files_$1 \ "$subpkgdir"/usr/share/webapps/owncloud/apps } texteditor() { pkgdesc="ownCloud integrated text editor" depends="owncloud" _mv_app texteditor } videoviewer() { pkgdesc="ownCloud integrated video viewer" depends="owncloud" _mv_app videoviewer } md5sums="21c5faf22569ae1be805b7857720aa6b owncloud-5.0.6.tar.bz2 eb202d73721e0d99eb3250b242a334b3 owncloud.config.php" sha256sums="1017a62e64ca820c6bd42a4e1c58a644f487cd7c4d81fda2b7bc82f811a288a3 owncloud-5.0.6.tar.bz2 33634927fbd8d09fb1df63e130e734d091411427c21e5d35873f2934281f50c6 owncloud.config.php" sha512sums="7dd5b3f982f975e24153c0f0e4acfa4427c8f0d3116303613d72e20786d60c64ae1900601d0d8042e97c2eab07c055b558ad9638ac90aa7e7d35ac2ca17298dc owncloud-5.0.6.tar.bz2 722e81fcff4e37ef2efddcebfec94642e9b7af9cce50fe64cf5ce308bfe4bda635e443973002bce1cf816437a2638aaca2878ce2dc6c128b782060cb3e4a4c53 owncloud.config.php"