Sophie

Sophie

distrib > Mageia > 6 > i586 > media > core-backports-src > by-pkgid > 19df2f39003697442f3b2320f2945fa0 > files > 9

nextcloud-14.0.10-1.mga6.src.rpm

%define version 14.0.10
%define rel 1
%define prerel %{nil}

%if "%{prerel}" != "%{nil}"
%define lc_prerel %(echo %{prerel} | tr "A-Z" "a-z")
%define release %mkrel 1.%{lc_prerel}.%{rel}
%else
%define release %mkrel %{rel}
%endif

# exclude PHP dependencies as long as their usage is not proven
%define __requires_exclude_from ^%{_datadir}/.*$
%define __jar_repack %{nil}

Summary:      Open personal cloud
Name:         nextcloud
Version:      %{version}
Release:      %{release}
License:      AGPLv3
Group:        Networking/WWW 
Url:          http://nextcloud.com
Source0:      https://download.nextcloud.com/server/releases/%{name}-%{version}%{?prerel}.tar.bz2
Source1:      %{name}-httpd.conf
Source2:      %{name}-httpd.inc
Source4:      %{name}-mysql.txt
Source5:      %{name}-postgresql.txt
Source7:      %{name}-config.php
# Disable the integrity checking whilst a better way to deal with it is found
Patch5:       %{name}-14.4.0-default_integrity_check_disabled.patch
# Direct the admin to the correct cli command for upgrades
Patch9:       %{name}-12.0.2-correct-cli-upgrade.patch
Requires:     apache-mod_php >= 3:7.1.0
Requires:     php-curl >= 3:7.1.0
Requires:     php-dom  >= 3:7.1.0
Requires:     php-exif >= 3:7.1.0
Requires:     php-fileinfo >= 3:7.1.0
Requires:     php-gd >= 3:7.1.0
Requires:     php-iconv >= 3:7.1.0
Requires:     php-ini >= 3:7.1.0
Requires:     php-json >= 3:7.1.0
Requires:     php-ldap >= 3:7.1.0
Requires:     php-mbstring >= 3:7.1.0
Requires:     php-openssl >= 3:7.1.0
Requires:     php-pcre >= 3:7.1.0
Requires:     php-pcntl >= 3:7.1.0
Requires:     php-pdo >= 3:7.1.0
Requires:     php-session >= 3:7.1.0
Requires:     php-simplexml >= 3:7.1.0
Requires:     php-xmlwriter >= 3:7.1.0
Requires:     php-zip >= 3:7.1.0
Requires:     php-filter >= 3:7.1.0
Requires:     %{name}-database = %{version}-%{release}
BuildArch:    noarch

%description
A personal cloud server which runs on you personal server 
and enables accessing your data from everywhere and sharing 
with other people.

%package mysql
Summary:    MySQL database support for NextCloud
Provides:   %{name}-database = %{version}-%{release}
Requires:   %{name} = %{version}-%{release}
# From getSupportedDatabases, mysql => pdo, mysql
Requires:   php-pdo_mysql >= 3:7.1.0
Requires:   php-mysqli >= 3:7.1.0
Requires:   php-mysqlnd >= 3:7.1.0

%description mysql
This package ensures the necessary dependencies are in place for NextCloud to
work with MySQL / MariaDB databases. It does not require a MySQL / MariaDB
server to be installed, as you may well wish to use a remote database
server.
If you want the database to be on the same system as NextCloud itself, you must
also install and enable a MySQL / MariaDB server package. See README.mysql for
more details.

%package postgresql
Summary:    PostgreSQL database support for NextCloud
Provides:   %{name}-database = %{version}-%{release}
Requires:   %{name} = %{version}-%{release}
# From getSupportedDatabases, pgsql => function, pg_connect
Requires:   php-pdo_pgsql >= 3:7.1.0

%description postgresql
This package ensures the necessary dependencies are in place for NextCloud to
work with a PostgreSQL database. It does not require the PostgreSQL server
package to be installed, as you may well wish to use a remote database
server.
If you want the database to be on the same system as NextCloud itself, you must
also install and enable the PostgreSQL server package. See README.postgresql
for more details.

%package sqlite
Summary:    SQLite 3 database support for NextCloud
Provides:   %{name}-database = %{version}-%{release}
Requires:   %{name} = %{version}-%{release}
# From getSupportedDatabases, pgsql => class, SQLite3
Requires:   php-pdo_sqlite >= 3:7.1.0
Requires:   php-pcre  >= 3:7.1.0

%description sqlite
This package ensures the necessary dependencies are in place for NextCloud to
work with an SQLite 3 database stored on the local system.

%prep
%setup -q -n %{name}
%autopatch -p 1
cp %{SOURCE4} README.mysql
cp %{SOURCE5} README.postgresql

# drop upstream update notification app
rm -rf apps/updatenotification
# also remove the actual updater
rm -rf updater

%install
install -d -m 755 %{buildroot}%{_datadir}/%{name}
# create nextcloud datadir
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/data
# create writable app dir for appstore
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/apps
# create nextcloud sysconfdir
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}

# install content
for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do
    cp -a "$d" %{buildroot}%{_datadir}/%{name}
done

for f in {*.php,*.html,occ,robots.txt}; do
    install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name}
done

# symlink config dir
ln -sf %{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config

# nextcloud looks for ca-bundle.crt in config dir
ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt

# set default config
install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/config.php

install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name}.conf
install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name}.inc

cat > %{buildroot}%{_datadir}/%{name}/.htaccess <<EOF
# Version: %{version}
EOF

install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d
cat > %{buildroot}%{_sysconfdir}/cron.d/%{name} <<EOF
# Run cron from to execute task even when no user connected
*/15 * * * * apache /usr/bin/php -f /usr/share/nextcloud/cron.php
EOF


%pre
# on update from previous release, move data directory from
# %{_localstatedir}/lib/%{name} to %{_localstatedir}/lib/%{name}/data
if [ $1 -gt 1 ] ; then
    if [ -d %{_localstatedir}/lib/%{name}/ -a ! -d %{_localstatedir}/lib/%{name}/data ]; then
        mv %{_localstatedir}/lib/%{name} %{_localstatedir}/lib/%{name}.tmp
        mkdir %{_localstatedir}/lib/%{name}
        mv %{_localstatedir}/lib/%{name}.tmp %{_localstatedir}/lib/%{name}/data
    fi
fi


%files
%doc AUTHORS config/config.sample.php

%dir %attr(-,apache,apache) %{_sysconfdir}/%{name}
%config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name}/config.php
%{_sysconfdir}/%{name}/ca-bundle.crt

%{_datadir}/%{name}

%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}
%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/apps
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/data

%config(noreplace) %{webappconfdir}/nextcloud.conf
%config(noreplace) %{webappconfdir}/nextcloud.inc
%config(noreplace) %{_sysconfdir}/cron.d/%{name}

%files mysql
%doc README.mysql

%files postgresql
%doc README.postgresql

%files sqlite


%changelog
* Wed Apr 10 2019 zezinho <zezinho> 14.0.10-1.mga6
+ Revision: 1387905
- new version 14.0.10
- new version 14.0.8 with security fixes
- add more requires as php package is lazy about versions in subpackages
- remove urpmi readme info
- fix php requires
- new version 14.4.0 requiring php7 for backports

* Thu Nov 22 2018 kekepower <kekepower> 13.0.8-1.mga7
+ Revision: 1333336
- Update to version 13.0.8

* Tue Nov 06 2018 kekepower <kekepower> 13.0.7-1.mga7
+ Revision: 1328655
- Update to version 13.0.7

* Thu Sep 20 2018 umeabot <umeabot> 13.0.6-2.mga7
+ Revision: 1280140
- Mageia 7 Mass Rebuild

* Fri Sep 07 2018 zezinho <zezinho> 13.0.6-1.mga7
+ Revision: 1257733
- new version 13.0.6

* Thu Aug 02 2018 guillomovitch <guillomovitch> 13.0.5-1.mga7
+ Revision: 1246963
- new version 13.0.5

* Tue Jun 26 2018 zezinho <zezinho> 13.0.4-1.mga7
+ Revision: 1239782
- new version 13.0.4

* Fri Apr 27 2018 zezinho <zezinho> 13.0.1-2.mga7
+ Revision: 1222889
- sql requires now pdo

* Sat Apr 14 2018 blino <blino> 13.0.1-1.mga7
+ Revision: 1218538
- 13.0.1

* Fri Jan 05 2018 neoclust <neoclust> 13.0.0-1.beta4.1.mga7
+ Revision: 1190552
- New version 13.0.0 beta4

* Tue Jan 02 2018 guillomovitch <guillomovitch> 12.0.4-1.mga7
+ Revision: 1189189
- new version 12.0.4

* Mon Dec 25 2017 zezinho <zezinho> 12.0.3-3.mga7
+ Revision: 1184611
- recommend pcntl php extension as it is hinted by occ command

* Mon Dec 25 2017 zezinho <zezinho> 12.0.3-2.mga7
+ Revision: 1184605
- add README.urpmi file explaining upgrade

* Tue Sep 26 2017 guillomovitch <guillomovitch> 12.0.3-1.mga7
+ Revision: 1159915
- new version 12.0.3

* Wed Sep 13 2017 guillomovitch <guillomovitch> 12.0.2-1.mga7
+ Revision: 1153655
- new version 12.0.2
- use a better group
- split stuff related to databases in distinct subpackages
- install appstore-downloaded apps under /var/lib/nextcloud/apps
- cherry-pick a few fedora patches
- better apache configuration
- do not obsolete owncloud, or try to migrate automatically data from it
+ zezinho <zezinho>
- recommends php-pcntl as it is told when running the occ cli command on files:scan

* Tue May 16 2017 luigiwalser <luigiwalser> 11.0.3-1.mga6
+ Revision: 1102246
- 11.0.3

* Sun Mar 05 2017 neoclust <neoclust> 11.0.2-1.mga6
+ Revision: 1088905
- New version 11.0.2

* Sun Jan 01 2017 luigiwalser <luigiwalser> 10.0.2-1.mga6
+ Revision: 1078936
- 10.0.2

* Sun Dec 11 2016 ngompa <ngompa> 10.0.1-3.mga6
+ Revision: 1074254
- Remove unneeded %%pretrans

* Mon Oct 24 2016 neoclust <neoclust> 10.0.1-2.mga6
+ Revision: 1063374
- Requires php-opcache

* Wed Oct 12 2016 zezinho <zezinho> 10.0.1-1.mga6
+ Revision: 1060534
- new version now in tar.bz2

* Tue Sep 13 2016 neoclust <neoclust> 10.0.0-1.mga6
+ Revision: 1052529
- New version 10.0.0

* Wed Aug 10 2016 neoclust <neoclust> 9.0.53-1.mga6
+ Revision: 1045479
- Add owncloud.conf for compatibility
- New version 9.0.53

* Mon Jul 04 2016 neoclust <neoclust> 9.0.50-2.mga6
+ Revision: 1038684
- Fix nextcloud URL

* Sun Jun 19 2016 neoclust <neoclust> 9.0.50-1.mga6
+ Revision: 1036847
- imported package nextcloud