# Contributor: Ɓukasz Jendrysik # Maintainer: Leonardo Arena pkgname="owncloud" pkgver="8.1.3" pkgrel=0 _contactsver="0.4.0.1" _calendarver="0.7.3" _tasksver="0.8" _documentsver="0.10.2" _pdfviewerver="8.1.2" _texteditorver="8.1.2" _mozillasyncver="1.4" _musicver="0.3.7" 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-zlib php-zip" depends_dev= makedepends="$depends_dev" install= subpackages="$pkgname-pgsql $pkgname-sqlite $pkgname-mysql $pkgname-encryption $pkgname-calendar $pkgname-contacts $pkgname-documents $pkgname-external $pkgname-mozilla_sync $pkgname-music $pkgname-ldap $pkgname-tasks $pkgname-texteditor $pkgname-pdfviewer $pkgname-videoviewer" replaces="$pkgname-plugins" source="https://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2 $pkgname-contacts-$_contactsver.tar.gz::https://github.com/owncloud/contacts/archive/v$_contactsver.tar.gz $pkgname-calendar-$_calendarver.tar.gz::https://github.com/owncloud/calendar/archive/v$_calendarver.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-mozilla_sync-$_mozillasyncver.tar.gz::https://github.com/owncloud/mozilla_sync/archive/v$_mozillasyncver.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 owncloud-6-always-return-true-isSetLocaleWorking.patch " 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 } 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} elif [ "$1" = "src" ]; then local appname="${subpkgname#$pkgname-}" mv "$srcdir"/$2 "$subpkgdir"${_ocappsdir}/$appname 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-$_contactsver } calendar() { arch="noarch" pkgdesc="ownCloud calendar" depends="owncloud" _mv_app src calendar-$_calendarver } 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 } ldap() { arch="noarch" pkgdesc="ownCloud integrated LDAP authentication" depends="owncloud php-ldap" _mv_app pkg user_ldap } mozilla_sync() { arch="noarch" pkgdesc="ownCloud Mozilla Sync app" depends="owncloud" _mv_app src mozilla_sync-$_mozillasyncver } 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 } videoviewer() { arch="noarch" pkgdesc="ownCloud integrated video viewer" depends="owncloud" _mv_app pkg files_videoviewer } md5sums="6ec33493b7901a56c04af4759d4bedde owncloud-8.1.3.tar.bz2 50c9d66a985b9d240570e73de4da29c7 owncloud-contacts-0.4.0.1.tar.gz a5917feacf1af04a0d25d6ee93c4ee38 owncloud-calendar-0.7.3.tar.gz 781bcb059bf55b03233f7e3963d59d30 owncloud-documents-0.10.2.tar.gz 5d15050cf6b83deb750b980fad6ac24b owncloud-texteditor-8.1.2.tar.gz e98fdb10ff4139b4259e2a183a88975a owncloud-mozilla_sync-1.4.tar.gz b4353e764ca105a90d6ac23853f16562 owncloud-music-0.3.7.zip 95e2aa1e2d2084646c0f835d8e83bc82 owncloud-pdfviewer-8.1.2.tar.gz ba3838830c4ce81ebc299d67526cc8d7 owncloud-tasks-0.8.tar.gz 7d29c52fb9cea2537b56a534a8385f19 owncloud.config.php f497dbf3a67d14fc9049ca680673c805 owncloud-6-always-return-true-isSetLocaleWorking.patch" sha256sums="1c878f8c749c20b9c6b78f33b7b3e75953950b1a9cfac995656a1f608e615773 owncloud-8.1.3.tar.bz2 7ee3f3ea251daf97aaa8cfc068ef13061c4f8155a059b7ce8a26443c950133bd owncloud-contacts-0.4.0.1.tar.gz c47022a44c358d6d484ec82312ba59921cf823c6329f62a295574810dcb3d16b owncloud-calendar-0.7.3.tar.gz 3773792edb0a5163242c558c08c45f3c475ef810d0c8f068735f0223f68bdc6e owncloud-documents-0.10.2.tar.gz d941e814c997448287ee87d8a6844ec10a33633ce8ffcc15732f5073a3993463 owncloud-texteditor-8.1.2.tar.gz 314621c290daee93429d881e78d8cae13faaca3205b23860f06450633c5c3b6a owncloud-mozilla_sync-1.4.tar.gz 987950f4ed11bae4eaa354bfc1c2f1b0dd6684cdbd893547a1d0446576da05fc owncloud-music-0.3.7.zip 3ea1755fbe2190bf420023b923eaa14c75696fd7a1eb869b6620543819b7f97a owncloud-pdfviewer-8.1.2.tar.gz a5ec7d004372721803293e5dce3cff818acdfcfe986bf84ff9de560b3b99fc01 owncloud-tasks-0.8.tar.gz 7ec1e79c6dc8c154d9b7d4c6477a659be55798091f3e9d6c07fd3fcc16332692 owncloud.config.php 3466ffbd22d4a9f04f4df862f3fb2f695fd1ca4bc6fb4b6a56258958064d5762 owncloud-6-always-return-true-isSetLocaleWorking.patch" sha512sums="3d1b33f9bea6a9acd2d9d35598294d42e3513f8d16e8a60901408ecb798f081a74dda4f4a7c606ff9d0d7acb9e0b31e18792077e387991c1a2fddc3d3fbb0485 owncloud-8.1.3.tar.bz2 436396dfdada834a5a3d95ce3a38624c843f8acdc8fcfef31533114b88fb592f1dc26520a36510c40f32c9cf44078aa49ef1018c8867eba023b8d0f6b3e0e8f6 owncloud-contacts-0.4.0.1.tar.gz 137174726b2a2954c26a7784d275fe058394ddd2b4558ceb9e86c248002203ce4b4cd2ccd3a8e9a15607589c1187a95aa090c287879e3adf7c124341041a9b24 owncloud-calendar-0.7.3.tar.gz 5855f082f7e0bc883ce654cf470b378b319bfc12056f317c6b3fbf6302ee061aab6b819b5578b1f8eef070fd074b0a23c0de84230dc0bd374e8537ccfeba144f owncloud-documents-0.10.2.tar.gz 7d90fe7651c4ca50478ae4f384983fce14f20741f2b90f0ad7079669052b39647bc0da075b3c9e26ba687fdaeea58dd4e17eceffdf924b2eabe6ff77ab1ac8df owncloud-texteditor-8.1.2.tar.gz a279a6e0109aa3b17442265358284583d846f88afa3746005792b93dffbd3396dc1277ce892b2a226496038ec6e8ec7ef2295b981ef8acf1a3fa3c32886623d0 owncloud-mozilla_sync-1.4.tar.gz 7aae237b74534e59b4f528ac3c9ace2ffafae099cfb6870971cb0d9c3b59d668c033d5732da3eec28b5a5e5919192b44c070a9a28d0d148d6de83443293d746d owncloud-music-0.3.7.zip fe3ede0bbc09998e2b90a350ca0f8a63d6ec49505462eaa9f03ba049665b7faa1b23d1f2620b9ce7fd0403e4dfeb4725973ff25c44e9dd2ca55475f654fe62d2 owncloud-pdfviewer-8.1.2.tar.gz f69f9ac50ae7aa10036a35cf20ac3aa89a5c41617f811d04e6026438c0f8ceeda764621ccf5bbe2f086ce29c12260b65ee1db208ff8d74c183d55970d4c9af4a owncloud-tasks-0.8.tar.gz a1142059f860ee1245ee2e324f206e1ab509ee6fcbd9020f793be557117ac5f6a8ba0e7a1677250df8662c19460e88b6ca2a24b40c14007d18535ab5110280e6 owncloud.config.php 4b2038786571c62129d748bb71262a7cbc966cf4b97482f13bcedaa36fcfa343080a464fc74463a9bd6615c99a10cd590b91cacead62632db36bfd8940173d13 owncloud-6-always-return-true-isSetLocaleWorking.patch"