# Maintainer: Leonardo Arena pkgname="owncloud" pkgver="7.0.4" 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-xml php-zlib php-zip" depends_dev= makedepends="$depends_dev" install= subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-documents $pkgname-external $pkgname-ldap $pkgname-search $pkgname-texteditor $pkgname-videoviewer" replaces="$pkgname-plugins" source="http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2 owncloud.config.php owncloud-6-always-return-true-isSetLocaleWorking.patch " pkggroups="www-data" _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} rm -rf config data mv * "$pkgdir"${_ocwwwdir} || return 1 ln -s $_occonfdir "$pkgdir"${_ocwwwdir}/config || return 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 || 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 mv "$pkgdir"${_ocappsdir}/$1 "$subpkgdir"${_ocappsdir} } documents() { arch="noarch" pkgdesc="ownCloud integrated documents editor" depends="owncloud" _mv_app documents } external() { arch="noarch" pkgdesc="ownCloud integrated external storage support" depends="owncloud php-ftp" _mv_app files_external } ldap() { arch="noarch" pkgdesc="ownCloud integrated LDAP authentication" depends="owncloud php-ldap" _mv_app user_ldap } search() { arch="noarch" pkgdesc="ownCloud integrated search engine" depends="owncloud" _mv_app search_lucene } 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 } md5sums="6d4a3f9275d1f2b2607e7e6484051d4c owncloud-7.0.4.tar.bz2 30477c6a00189272dc7e2f16322f749c owncloud.config.php f497dbf3a67d14fc9049ca680673c805 owncloud-6-always-return-true-isSetLocaleWorking.patch" sha256sums="7179f8d775c57a73e7a246bf51a5adb3259065ab2e08ab09e301e6d97dc34f36 owncloud-7.0.4.tar.bz2 bf6277eb9bd416eb8c2b7de6836541e8fd4e455b644c98643036bb5c57c06a73 owncloud.config.php 3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762 owncloud-6-always-return-true-isSetLocaleWorking.patch" sha512sums="7d11ae717e1cc4c0a68b1bb89ef9c11a539c9dfc362832249a3b4034964700fa0dc62e2f415db637bb5952ea836a49514ef573ae225f86ac1ac8c937a3e1d4eb owncloud-7.0.4.tar.bz2 bb25fa74068d6d21c0f00044e0a58518e3699fc76c6d42ed068cc4d8e6acf97e8057aade0574f41ef0d3cbf46e4357ee1934fe1a0fbc777f9aa7ce94bb238e7d owncloud.config.php 4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13 owncloud-6-always-return-true-isSetLocaleWorking.patch"