# Authority: vip-ire
# Name: Daniel Berteaud

%define name smeserver-pydio
%define version 0.2.4
%define release 1
Summary: SME server integration of pydio
Name: %{name}
Version: %{version}
Release: %{release}%{?dist}
License: GNU GPL version 2
URL: http://pyd.io/
Group: SMEserver/addon
Source: %{name}-%{version}.tar.gz

BuildArchitectures: noarch
BuildRequires: e-smith-devtools
BuildRoot: %{_tmppath}/%{name}-%{version}
Requires: e-smith-base >= 5.2.0-56
Requires: pydio >= 5.2.0
Requires: smeserver-webapps-common
Requires: smeserver-shared-folders >= 0.1-82
Requires: perl(PHP::Serialization)
Requires: perl(File::Path)
Requires: perl(JSON)
Requires: ghostscript
Requires: poppler-utils
Requires: php-pecl(xattr)
Requires: php-pear(VersionControl_Git)
Requires: git
#Requires: mod_xsendfile

Obsoletes: smeserver-ajaxplorer
Provides: smeserver-ajaxplorer

%description
SME Server integration of Pydio.
Pydio is a rich-client browser for managing files on a web server
This contrib works with the smeserver-shared-folders addon

%changelog
* Fri Feb 7 2014 Daniel Berteaud <daniel@firewall-services.com> 0.2.4-1
- Compat with 5.2.0
- Enable user dashboard pseudo workspace
- Possibility to permanently enable the Pydio admin interface with
  AdminInterface prop
- Enable quicksend plugin
- Enable a slave auth backend (serial)
- Reduce min password length
- Disable fast checks
- Allow globaly disabled indexer while enabling it on specific share
- New prop PydioIndexContent to enable content index (default to disabled)
- New prop ShareCreateUser to allow creating external user on the fly

* Mon Nov 18 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.3-1
- Correctly set permissions on the 'home' repository

* Mon Nov 18 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.2-1
- Increase max_execution_time for the indexer cron job
- Don't remove the locales cache on webapps-update (prevent a bug with
  the indexer which would create an empty locale cache)

* Thu Oct 31 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.1-1
- Fix disabling php output_buffering

* Thu Oct 17 2013 Daniel Berteaud <daniel@firewall-services.com> 0.2.0-1
- Renamed to smeserver-pydio
- Add core.mailer config
- Enable meta.git if PydioHistory prop is enabled (per share basis)

* Tue Oct 15 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.10-1
- Compatibility with JSON::XS
- Stop removing rights.ser files

* Wed Oct 2 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.9-1
- Enable notifications
- Enable cmd_line
- Enable lucene indexing
- Enable powerfs

* Thu Sep 26 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.8-1
- Correctly update the personal role, which is where Ajaxplorer
  Looks for permissions now

* Wed Jul 3 2013 Daniel Berteaud <daniel@firewall-services.com> 0.1.7-1
- Compat with AjaXplorer 5
- Enable meta sources on shares
- Flush i18n cache so locales are updated

* Thu Nov 29 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.6-1
- Enable meta.filehasher if metadata is enabled
- Enable publiclets on a default install

* Mon Oct 15 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.5-1
- Add a cron task to delete old files in tmp dir

* Fri Apr 27 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.4-1
- Use sane max_execution_time

* Wed Apr 18 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.3-1
- Only update homedir ACL if required

* Tue Apr 17 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.2-1
- Posibility to access home dir (Read Only)
- Fix ACL for rw users

* Fri Apr 06 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1.1-1
- Migrate to GIT
- make all shares accessible with open_basedir
- Fix diag_result templates expansion

* Sat Feb 18 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1-11
- Support user level ACL

* Tue Jan 03 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1-10
- Ajaxplorer 4.0 compatibility
- Support publiclets

* Tue Dec 06 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-9
- turn on JS debug (IE doesn't like compacted JS)

* Mon Dec 05 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-8
- Rise upload_max_number to 50

* Wed Nov 23 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-7
- Allow access to /usr/share/pear and to /usr/share/doc/ajaxplorer-*/client
- Warn the user after 10min of inactivity (instead of 3)
- Add support for logout URL
- Remove plugin cache files on updates
- Add support for meta.serial

* Thu Nov 03 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-6
- Fix default Recycle Bin dir

* Thu Oct 27 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-5
- Flush active sessions on privileges updates

* Mon Jul 11 2011 Daniel Berteaud <daniel@firewall-services.com> 0.1-4
- Reserve /ajaxplorer location

* Tue Jul 05 2011 Daniel B. <daniel@firewall-services.com> 0.1-3
- Honor Recycle Bin settings

* Tue Jun 28 2011 Daniel B. <daniel@firewall-services.com> 0.1-2
- Call ajaxplorer-user-rights later
- Fix display name of repositories

* Fri Jun 24 2011 Daniel B. <daniel@firewall-services.com> 0.1-1
- initial release

%prep
%setup -q

%build
perl ./createlinks

%install
rm -rf $RPM_BUILD_ROOT
(cd root   ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT)
rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
    --file /etc/cron.daily/pydio-tmpwatch 'attr(0755,root,root)' \
    --file /etc/cron.daily/pydio-indexer 'attr(0700,root,root)' \
    --file /usr/bin/pydiopdftotext 'attr(0755,root,root)' \
        > %{name}-%{version}-filelist

%files -f %{name}-%{version}-filelist
%defattr(-,root,root)

%clean
rm -rf $RPM_BUILD_ROOT


%postun