# Contributor: Ɓukasz Jendrysik # Maintainer: Leonardo Arena pkgname="owncloud" pkgver="9.1.0" pkgrel=1 _contactsver="0.0.0.133" _calendarver="1.3.1" _tasksver="0.9.1" _documentsver="$pkgver" _pdfviewerver="$pkgver" _texteditorver="$pkgver" _musicver="0.3.11" _php=php5 pkgdesc="Your own WebDAV-based cloud service" url="http://owncloud.org" arch="noarch" license="AGPL" depends="$_php ${_php}-ctype ${_php}-curl ${_php}-dom ${_php}-gd ${_php}-iconv ${_php}-json ${_php}-xml ${_php}-xmlreader ${_php}-zlib ${_php}-zip" depends_dev= makedepends="$depends_dev" install= subpackages="$pkgname-doc $pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-encryption $pkgname-calendar $pkgname-contacts $pkgname-documents $pkgname-external $pkgname-gallery $pkgname-music $pkgname-ldap $pkgname-tasks $pkgname-texteditor $pkgname-pdfviewer $pkgname-videoplayer" replaces="$pkgname-plugins" source="https://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2 $pkgname-contacts-$_contactsver.tar.gz::https://github.com/owncloud/contacts/releases/download/v$_contactsver/contacts.tar.gz $pkgname-calendar-$_calendarver.tar.gz::https://github.com/owncloud/calendar/releases/download/v$_calendarver/calendar.tar.gz $pkgname-documents-$_documentsver.tar.gz::https://github.com/owncloud/documents/archive/v$_documentsver.tar.gz $pkgname-texteditor-$_texteditorver.tar.gz::https://github.com/owncloud/files_texteditor/archive/v$_texteditorver.tar.gz $pkgname-music-$_musicver.zip::https://github.com/owncloud/music/releases/download/v$_musicver/music.zip $pkgname-pdfviewer-$_pdfviewerver.tar.gz::https://github.com/owncloud/files_pdfviewer/archive/v$_pdfviewerver.tar.gz $pkgname-tasks-$_tasksver.tar.gz::https://github.com/owncloud/tasks/archive/v$_tasksver.tar.gz owncloud.config.php " pkggroups="www-data" #_builddir="$srcdir"/core-$pkgver _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 chmod +x "$pkgdir"${_ocwwwdir}/occ || return 1 ln -s $_occonfdir "$pkgdir"${_ocwwwdir}/config || return 1 install -m660 ../owncloud.config.php "$pkgdir"${_occonfdir}/config.php install -m664 .htaccess "$pkgdir"${_ocwwwdir}/.htaccess for dir in \ "$pkgdir"${_occonfdir} \ "$pkgdir"${_ocdatadir} \ "$pkgdir"${_ocappsdir}; do chown -R :www-data $dir || return 1 chmod 770 $dir || return 1 done } doc() { arch="noarch" pkgdesc="ownCloud documentation" depends="owncloud" mkdir -p "$subpkgdir"/usr/share/doc/$pkgname/core mv "$pkgdir"/usr/share/webapps/$pkgname/core/doc \ "$subpkgdir"/usr/share/doc/$pkgname/core } 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 if [ "$1" = "pkg" ]; then mv "$pkgdir"${_ocappsdir}/$2 "$subpkgdir"${_ocappsdir} || return 1 elif [ "$1" = "src" ]; then local appname="${subpkgname#$pkgname-}" mv "$srcdir"/$2 "$subpkgdir"${_ocappsdir}/$appname || return 1 fi chown -R :www-data "$subpkgdir"${_ocappsdir} || return 1 chmod 770 "$subpkgdir"${_ocappsdir} || return 1 } contacts() { arch="noarch" pkgdesc="ownCloud contacts" depends="owncloud" _mv_app src contacts } calendar() { arch="noarch" pkgdesc="ownCloud calendar" depends="owncloud" _mv_app src calendar } documents() { arch="noarch" pkgdesc="ownCloud integrated documents editor" depends="owncloud" _mv_app src documents-$_documentsver } encryption() { arch="noarch" pkgdesc="ownCloud integrated encryption support" depends="owncloud ${_php}-openssl" _mv_app pkg encryption } external() { arch="noarch" pkgdesc="ownCloud integrated external storage support" depends="owncloud ${_php}-curl ${_php}-ftp" _mv_app pkg files_external } gallery() { arch="noarch" pkgdesc="ownCloud integrated gallery application" depends="owncloud" _mv_app pkg gallery } ldap() { arch="noarch" pkgdesc="ownCloud integrated LDAP authentication" depends="owncloud ${_php}-ldap" _mv_app pkg user_ldap } music() { arch="noarch" pkgdesc="ownCloud music app" depends="owncloud" _mv_app src music # Correct world-writable directories find "${subpkgdir}${_ocappsdir}" -type d -exec chmod 775 {} \; } pdfviewer() { arch="noarch" pkgdesc="ownCloud integrated PDF viewer" depends="owncloud" _mv_app pkg files_pdfviewer } tasks() { arch="noarch" pkgdesc="ownCloud tasks" depends="owncloud" _mv_app src tasks-$_tasksver } texteditor() { arch="noarch" pkgdesc="ownCloud integrated text editor" depends="owncloud" _mv_app pkg files_texteditor } videoplayer() { arch="noarch" pkgdesc="ownCloud integrated video viewer" depends="owncloud" provides="$pkgname-videoviewer" _mv_app pkg files_videoplayer } md5sums="b044d7c92c6388608059b89327f4f924 owncloud-9.1.0.tar.bz2 95e032e0b3b16a001f00ec6f34917781 owncloud-contacts-0.0.0.133.tar.gz 1241880b1cd241968e895a91ff1426d7 owncloud-calendar-1.3.1.tar.gz 9f2dd60c5fc70fb5ccb55d1dfc416f5c owncloud-documents-9.1.0.tar.gz 2f6dfa9d04a8a0430d7874c95e984ac5 owncloud-texteditor-9.1.0.tar.gz 8452cdd43587469e680597a2c10c830e owncloud-music-0.3.11.zip 548166595a706ee604acab74bb8ba0e8 owncloud-pdfviewer-9.1.0.tar.gz b7f587c53a5ec8d97383bfe78a325c48 owncloud-tasks-0.9.1.tar.gz 36f3ae24d8d1a39eb8bf1a40474d8df7 owncloud.config.php" sha256sums="26df5f51ae87f83dba93c130a1929278afe69f9426b877e3c5064034bec28ee3 owncloud-9.1.0.tar.bz2 72b04c4e21fcdd71a37ad7815ff2094db5829163acd7470d7786c06bc21f6263 owncloud-contacts-0.0.0.133.tar.gz 7bc53045ec9635ad9655e3acce484b6df48ef1f3e702a91edc8ce6ac7a0adf59 owncloud-calendar-1.3.1.tar.gz c25b897d3521b8ef13770a57975cdc4075eb17d8413651f1f33362e8bb7bfd7b owncloud-documents-9.1.0.tar.gz ab825ecdc62c60b14026d343eca2618e249d8ac57a087642efd37d821e4a820a owncloud-texteditor-9.1.0.tar.gz e480e639e48419977f06822aa92f1245c21a43d9aafc156edb6fd097873a73ca owncloud-music-0.3.11.zip 53ba1c3ebf98c39f38417426645a678328e4d806a8155f3fcfb3c97474c78863 owncloud-pdfviewer-9.1.0.tar.gz 4e01d93e5bf5e2ebad2229799889684214c96badf90937b3c7a93c924789789d owncloud-tasks-0.9.1.tar.gz b981af58dddb50d87935186745bf25a1a4547871f4a7ed0e3d000fabd4ec840c owncloud.config.php" sha512sums="aaf7f9c85ea54613001d9a2f10e8ca6706add81c4d56d1f8466a9b6f7406fdbc9f255fb3714543ab66eb315e61d7cb645d1513b944921d75c7c609c3e4f72384 owncloud-9.1.0.tar.bz2 cc54d7735fcd3693704516a92686aa8b4a449c743844a9603ae0aa90eeb817711a5b758c4d69bb02551576e9a08e2c2dc34b06d96972c9a3f37757bfbb14e085 owncloud-contacts-0.0.0.133.tar.gz 65e85b786e43d7999caf8baf03f8da3061842ed552015c30b56b100ff7f7c0fa7250ff115178316a9014b885e2f53e9f721cbec893b2faeefd0f64d9543f51a9 owncloud-calendar-1.3.1.tar.gz 3df575182c5b750b53907f5e372f3b5ed2ddff98fa9bc976563cece6f65c081a7d6ddd2a23d4348f0d74a6116835bb297188e2e2ab291dc9f5a5dcb9dfe777df owncloud-documents-9.1.0.tar.gz 2ea6d65f5349fc014553b65bc243bd0def22551cf78cf051f78d68b87344be0b5262ae049a5aae11bee853c8a8d1e48aa52e7515ef85c0ec80aec2908ab15647 owncloud-texteditor-9.1.0.tar.gz fde1758a512a960985cbbfde9294f77458fad2cb4801daceedac76a58dbb2862f2586cb17376915cdcb47a768c75be46f863834a96f1148eae98285217491d59 owncloud-music-0.3.11.zip 49ad1f9694649d563335433d1202f6256551d17471685acd79d4307c330b556eede6c914aec9776da24f18335616746cbaaa1fc037319b6b338cc73e1a7f7580 owncloud-pdfviewer-9.1.0.tar.gz 13f383251ee16b59f5dfb17a370df824fcb647760179949537616684c5e663079194dae6190c60cacc5f3bffa44797baaef21808bc4930fe893172fe47f3392e owncloud-tasks-0.9.1.tar.gz bf4fac811c54a45b04301b8a13b8e82e292aff1b2eba835c2af734814eb24c537da140aab77cf38bc793cc2d5b78eee0ac71b237c7e2e4ed683685fe341152dd owncloud.config.php"