From 1bd9c5f372e7e84b598ed6a5121d474cc2b54b7d Mon Sep 17 00:00:00 2001
From: cippaciong <lacapannadelloziotom@gmail.com>
Date: Thu, 12 Dec 2013 19:17:01 +0100
Subject: [PATCH] aur/owncloud to 6.0.0-1

---
 aur/owncloud/PKGBUILD                         | 25 +++++++++----------
 .../{owncloud.conf => apache.example.conf}    |  0
 aur/owncloud/owncloud.install                 |  3 ++-
 3 files changed, 14 insertions(+), 14 deletions(-)
 rename aur/owncloud/{owncloud.conf => apache.example.conf} (100%)

diff --git a/aur/owncloud/PKGBUILD b/aur/owncloud/PKGBUILD
index a75380867..2c61584cd 100644
--- a/aur/owncloud/PKGBUILD
+++ b/aur/owncloud/PKGBUILD
@@ -4,23 +4,24 @@
 # ALARM Maintainer: Tommaso Sardelli <lacapannadelloziotom [at] gmail [dot] com>
 
 pkgname=owncloud
-pkgver=5.0.13
+pkgver=6.0.0
 pkgrel=1
 pkgdesc="A cloud server to store your files centrally on a hardware controlled by you"
 arch=('any')
 url="http://owncloud.org/"
 license=('GPL')
 depends=('php-gd' 'php-intl')
-optdepends=("php-apache: to use the Apache web server" "php-sqlite: to use the SQLite database backend" "php-pgsql: to use the PostgreSQL database backend" "mariadb: to use the MySQL database backend" "smbclient: to mount SAMBA shares")
+optdepends=('php-apache: to use the Apache web server' 'php-sqlite: to use the SQLite database backend' 'php-pgsql: to use the PostgreSQL 
+database backend' 'mariadb: to use the MySQL database backend' 'smbclient: to mount SAMBA shares' 'php-mcrypt' 'php-imagick: file preview' 
+'ffmpeg: file preview' 'libreoffice-common: file preview')
 makedepends=()
-source=("http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2" 'owncloud.conf')
-if [[ -n $(which httpd 2> /dev/null) ]]; then
-  backup=('etc/httpd/conf/extra/owncloud.conf')
-fi
+source=("http://download.owncloud.org/community/$pkgname-$pkgver.tar.bz2" 'apache.example.conf')
+backup=('etc/webapps/owncloud/apache.example.conf')
 install=owncloud.install
-md5sums=('4ce4cf5de3fdf1f70666549c5ecfda7a'
+md5sums=('7a6b9330de7dddad0776ef9b6b80af94'
          'c1d49a3c0d8433bed6bffcd21ebb0064')
 
+
 package() { 
 # install license
   install -d $pkgdir/usr/share/licenses/$pkgname
@@ -28,13 +29,11 @@ package() {
 
 # install project  
   install -d $pkgdir/usr/share/webapps/ 
-  cp -a $srcdir/$pkgname $pkgdir/usr/share/webapps/ 
+  cp -a $srcdir/$pkgname $pkgdir/usr/share/webapps/
   chown -R http:http $pkgdir/usr/share/webapps/owncloud/{apps,config}
  
-# install apache .conf file if apache is installed
-  if [[ -n $(which httpd 2> /dev/null) ]]; then
-    install -d  $pkgdir/etc/httpd/conf/extra 
-    install -m 644 $srcdir/owncloud.conf  $pkgdir/etc/httpd/conf/extra/ 
-  fi
+# install apache config file
+  install -d  $pkgdir/etc/webapps/$pkgname
+  install -m 644 $srcdir/apache.example.conf  $pkgdir/etc/webapps/$pkgname
 }
 
diff --git a/aur/owncloud/owncloud.conf b/aur/owncloud/apache.example.conf
similarity index 100%
rename from aur/owncloud/owncloud.conf
rename to aur/owncloud/apache.example.conf
diff --git a/aur/owncloud/owncloud.install b/aur/owncloud/owncloud.install
index 94f3a6e4a..1ce38c291 100644
--- a/aur/owncloud/owncloud.install
+++ b/aur/owncloud/owncloud.install
@@ -5,7 +5,8 @@ post_install() {
    echo "and either pdo_sqlite.so sqlite3.so (for the SQLite backend), pdo_pgsql.so pgsql.so (for the PostgreSQL backend) or mysqli.so pdo_mysql.so (for the MySQL backend)"
    echo "in /etc/php/php.ini"
    echo
-   echo "If using Apache, add the following lines into /etc/httpd/conf/httpd.conf:"
+   echo "If using Apache, copy /etc/webapps/owncloud/apache.example.conf to /etc/httpd/conf/extra/owncloud.conf"
+   echo "and add the following lines into /etc/httpd/conf/httpd.conf:"
    echo "Include /etc/httpd/conf/extra/owncloud.conf"
    echo "LoadModule php5_module modules/libphp5.so"
    echo "Include conf/extra/php5_module.conf"