# Maintainer: Leonardo Arena pkgname="owncloud" pkgver="5.0.13" 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 || 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 } 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"/var/lib/owncloud/apps mv "$pkgdir"/var/lib/owncloud/apps/files_$1 \ "$subpkgdir"/var/lib/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="4ce4cf5de3fdf1f70666549c5ecfda7a owncloud-5.0.13.tar.bz2 7d90d633c7ef408773854dbacab6d33b owncloud.config.php" sha256sums="8a64ab8cc2ae4c71713a2922e5fbcda029de8ab2cf4dee04e15f041be48aa326 owncloud-5.0.13.tar.bz2 8f63333fd298fcf806f1faaed49e472ef076678d012324015fb518d266fcad10 owncloud.config.php" sha512sums="53256c5afb6ea2537f5dcc685db59b1af5ed6a5a4a0608af8a106f67db3179eae4bff07b7a2c84e0416720c1b7f12686acde7121dbdd21dedeb36c49e569c195 owncloud-5.0.13.tar.bz2 5c3cbc93e2720a5aaf64fee44d64b4679984b3b18ab3be31c1b30b6db5d7c34db784bd78a2355d5cbb690e8c4cb5299ae9da42197b21f0aee9e8e7be78c92c25 owncloud.config.php"