Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
isv:infrarun:nextcloud:28
nextcloud
nextcloud.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File nextcloud.spec of Package nextcloud
# # spec file for package nextcloud # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # keep in sync with macros file %define nextcloud_basedir /srv/www/vhosts/%{name} %define nextcloud_docroot %{nextcloud_basedir}/public/ %define nextcloud_appsdir %{nextcloud_basedir}/public/apps/ %define nextcloud_datadir %{nextcloud_basedir}/data/ %define nextcloud_sessiondir %{nextcloud_basedir}/sessions/ %define nextcloud_tmpdir %{nextcloud_basedir}/tmp/ %define nextcloud_logdir /var/log/%{name}/ %define php_fpm_d /etc/%{nextcloud_php}/fpm/php-fpm.d/ %define ng_vhost_d /etc/nginx/vhosts.d/ %define nextcloup_upgrade_trigger %{nextcloud_basedir}/pending_upgrade %bcond_without set_maintenance_mode_early Name: nextcloud Version: 28.0.5 Release: 0 %define pkg_version %{version} Summary: File hosting service License: AGPL-3.0-only Group: Productivity/Networking/Web/Utilities Url: https://www.nextcloud.com/ Source: https://download.nextcloud.com/server/releases/%{name}-%{pkg_version}.tar.bz2 Source1: https://download.nextcloud.com/server/releases/%{name}-%{pkg_version}.tar.bz2.asc Source2: nextcloud-php-fpm.conf Source3: nextcloud-cron.service Source4: nextcloud-nginx.conf Source5: nextcloud-permissions.sh Source6: nextcloud-cron.timer Source7: nextcloud-occ Source98: nextcloud.asc Source99: nextcloud-rpmlintrc BuildRequires: acl BuildRequires: apparmor-rpm-macros BuildRequires: nginx BuildRequires: rsync BuildRequires: fdupes BuildRequires: %{nextcloud_php}-APCu %requires_eq %{nextcloud_php}-APCu BuildRequires: %{nextcloud_php}-fpm # requires is in php-fpm subpackage BuildRequires: %{nextcloud_php}-imagick %requires_eq %{nextcloud_php}-imagick %if "php7" == "%{nextcloud_php}" BuildRequires: %{nextcloud_php}-json %requires_eq %{nextcloud_php}-json %endif BuildRequires: %{nextcloud_php}-mysql %requires_eq %{nextcloud_php}-mysql BuildRequires: %{nextcloud_php}-bz2 %requires_eq %{nextcloud_php}-bz2 BuildRequires: %{nextcloud_php}-mbstring %requires_eq %{nextcloud_php}-mbstring BuildRequires: %{nextcloud_php}-iconv %requires_eq %{nextcloud_php}-iconv BuildRequires: %{nextcloud_php}-openssl %requires_eq %{nextcloud_php}-openssl BuildRequires: %{nextcloud_php}-ctype %requires_eq %{nextcloud_php}-ctype BuildRequires: %{nextcloud_php}-dom %requires_eq %{nextcloud_php}-dom BuildRequires: %{nextcloud_php}-curl %requires_eq %{nextcloud_php}-curl BuildRequires: %{nextcloud_php}-gd %requires_eq %{nextcloud_php}-gd BuildRequires: %{nextcloud_php}-gmp %requires_eq %{nextcloud_php}-gmp %if 0%{?suse_version} >= 1699 BuildRequires: %{nextcloud_php}-memcached %requires_eq %{nextcloud_php}-memcached %endif BuildRequires: %{nextcloud_php}-opcache %requires_eq %{nextcloud_php}-opcache BuildRequires: %{nextcloud_php}-pdo %requires_eq %{nextcloud_php}-pdo BuildRequires: %{nextcloud_php}-posix %requires_eq %{nextcloud_php}-posix BuildRequires: %{nextcloud_php}-redis %requires_eq %{nextcloud_php}-redis BuildRequires: %{nextcloud_php}-zip %requires_eq %{nextcloud_php}-zip BuildRequires: %{nextcloud_php}-zlib %requires_eq %{nextcloud_php}-zlib BuildRequires: %{nextcloud_php}-xmlreader %requires_eq %{nextcloud_php}-xmlreader BuildRequires: %{nextcloud_php}-xmlwriter %requires_eq %{nextcloud_php}-xmlwriter BuildRequires: %{nextcloud_php}-fileinfo %requires_eq %{nextcloud_php}-fileinfo BuildRequires: %{nextcloud_php}-bz2 %requires_eq %{nextcloud_php}-bz2 BuildRequires: %{nextcloud_php}-intl %requires_eq %{nextcloud_php}-intl BuildRequires: %{nextcloud_php}-ldap %requires_eq %{nextcloud_php}-ldap BuildRequires: %{nextcloud_php}-bcmath %requires_eq %{nextcloud_php}-bcmath BuildRequires: %{nextcloud_php}-ftp %requires_eq %{nextcloud_php}-ftp BuildRequires: %{nextcloud_php}-pear %requires_eq %{nextcloud_php}-pear BuildRequires: %{nextcloud_php}-pcntl %requires_eq %{nextcloud_php}-pcntl BuildRequires: %{nextcloud_php}-sysvsem %requires_eq %{nextcloud_php}-sysvsem BuildRequires: %{nextcloud_php}-sodium %requires_eq %{nextcloud_php}-sodium BuildRequires: %{nextcloud_php}-exif %requires_eq %{nextcloud_php}-exif BuildRequires: pkgconfig(systemd) %{?systemd_requires} Requires: acl Requires(pre): sudo Requires(post): sudo Requires(posttrans): sudo Requires: sudo Recommends: nextcloud-nginx Recommends: nextcloud-php-fpm Conflicts: nextcloud-nginx < %{version}-%{release} Conflicts: nextcloud-php-fpm < %{version}-%{release} BuildArch: noarch Provides: nextcloud-apps-twofactor_totp = 7.0.0-%{release} Obsoletes: nextcloud-apps-twofactor_totp < 7.0.0-%{release} Provides: user(nextcloud) Provides: group(nextcloud) Provides: user(nextcloud-admin) Provides: group(nextcloud-admin) %description Nextcloud is a suite of client-server software for creating file hosting services and using them. %prep %setup -q -n %{name} %package php-fpm Group: Productivity/Networking/Web/Utilities %requires_eq %{nextcloud_php}-fpm Requires: nextcloud-apparmor Requires: nextcloud = %{version} Summary: Nextcloud - PHP FPM configuration %description php-fpm Nextcloud is a suite of client-server software for creating file hosting services and using them. This package holds the php-fpm configuration. %package nginx Group: Productivity/Networking/Web/Utilities Requires: nextcloud-php-fpm = %{version} Requires: nginx Summary: Nextcloud - NGINX configuration %description nginx Nextcloud is a suite of client-server software for creating file hosting services and using them. This package holds the nginx configuration. %build touch config/config.php chmod -R u=rwX,g=rwX,o= $PWD chmod ug+x occ %install install -D -d -m 0755 \ %{buildroot}%{nextcloud_basedir} \ %{buildroot}%{nextcloud_docroot} \ %{buildroot}%{php_fpm_d} \ %{buildroot}%{ng_vhost_d} \ %{buildroot}%{_unitdir} \ %{buildroot}%{_sbindir} install -D -d -m 0770 \ %{buildroot}%{nextcloud_datadir} \ %{buildroot}%{nextcloud_sessiondir} \ %{buildroot}%{nextcloud_tmpdir} \ %{buildroot}%{nextcloud_logdir} rsync -a ${PWD}/ %{buildroot}%{nextcloud_docroot}/ install -m 0644 %{SOURCE2} %{buildroot}%{php_fpm_d}/nextcloud.conf install -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}/nextcloud-cron.service install -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/nextcloud-cron.timer install -m 0644 %{SOURCE4} %{buildroot}%{ng_vhost_d}/nextcloud.conf install -m 0750 %{SOURCE5} %{buildroot}%{_sbindir}/nextcloud-fix-permissions install -m 0750 %{SOURCE7} %{buildroot}%{_sbindir}/nextcloud-occ cat <<EOF > %{buildroot}%{_sbindir}/nextcloud-upgrade #!/bin/bash if [ -e %{nextcloup_upgrade_trigger} ] ; then %{_sbindir}/nextcloud-fix-permissions if [ -s %{nextcloud_docroot}/config/config.php ] ; then echo "Starting nextcloud upgrade: $(date --iso-8601=seconds)" >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ maintenance:mode --on --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ upgrade --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ db:add-missing-columns --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ db:add-missing-primary-keys --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ db:add-missing-indices --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ db:convert-filecache-bigint --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ maintenance:update:htaccess --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ maintenance:mode --off --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: %{_sbindir}/nextcloud-occ config:system:set config_is_read_only --type boolean --value true --no-interaction >> /var/log/nextcloud//upgrade.log 2>&1 ||: fi rm %{nextcloup_upgrade_trigger} fi EOF cat <<EOF > %{buildroot}%{_sbindir}/nextcloud-prepare-upgrade #!/bin/bash touch %{nextcloup_upgrade_trigger} %if %{with set_maintenance_mode_early} if [ -s %{nextcloud_docroot}/config/config.php ] ; then if grep -q "'config_is_read_only' => true," "%{nextcloud_docroot}/config/config.php" ; then perl -p -i -e "s|'config_is_read_only' => true,\n||g" "%{nextcloud_docroot}/config/config.php" fi %{_sbindir}/nextcloud-occ maintenance:mode --on --no-interaction >> %{nextcloud_logdir}/upgrade.log 2>&1 ||: fi %endif EOF chmod u=rwx,go=rx %{buildroot}%{_sbindir}/nextcloud*upgrade touch %{buildroot}%{nextcloud_logdir}/upgrade.log ln -s /sbin/service %{buildroot}%{_sbindir}/rcnextcloud-cron %fdupes %{buildroot}%{nextcloud_docroot} %pre /usr/sbin/groupadd -r %{name} &>/dev/null || : /usr/sbin/useradd -g %{name} -s /bin/false -r -c "Nextcloud" -d %{nextcloud_datadir} %{name} &>/dev/null || : /usr/sbin/groupadd -r %{name}-admin &>/dev/null || : /usr/sbin/useradd -g %{name}-admin -s /bin/bash -r -c "Nextcloud Admin" -d %{nextcloud_datadir} %{name}-admin &>/dev/null || : %service_add_pre nextcloud-cron.timer nextcloud-cron.service %post %service_add_post nextcloud-cron.timer nextcloud-cron.service %preun %service_del_preun nextcloud-cron.timer nextcloud-cron.service %postun if [ -e %{_sbindir}/nextcloud-occ ] ; then touch %{nextcloup_upgrade_trigger} %if %{with set_maintenance_mode_early} if [ -s %{nextcloud_docroot}/config/config.php ] ; then %{_sbindir}/nextcloud-occ maintenance:mode --on --no-interaction > /dev/null 2>&1 fi %endif fi %service_del_postun nextcloud-cron.timer nextcloud-cron.service %posttrans # fix permissions if [ -e %{_sbindir}/nextcloud-upgrade ] ; then %{_sbindir}/nextcloud-upgrade fi %postun nginx %service_del_postun nginx.service %post php-fpm %apparmor_reload /etc/apparmor.d/usr.sbin.php-fpm %files php-fpm %config(noreplace) %{php_fpm_d}/nextcloud.conf %files nginx %config(noreplace) %{ng_vhost_d}/nextcloud.conf %files %defattr(-,root,root) %{_unitdir}/nextcloud-cron.service %{_unitdir}/nextcloud-cron.timer %{_sbindir}/rcnextcloud-cron %{_sbindir}/nextcloud-fix-permissions %{_sbindir}/nextcloud-occ %{_sbindir}/nextcloud-prepare-upgrade %{_sbindir}/nextcloud-upgrade %dir /srv/www/vhosts %dir %{nextcloud_basedir} %defattr(-,nextcloud-admin,nextcloud-admin) %dir %verify(not mode) %{nextcloud_docroot} %config(noreplace) %verify(not mode) %{nextcloud_docroot}/config/ %verify(not mode) %{nextcloud_docroot}/3rdparty/ %verify(not mode) %{nextcloud_docroot}/apps/ %verify(not mode) %{nextcloud_docroot}/AUTHORS %verify(not mode) %{nextcloud_docroot}/console.php %verify(not mode) %{nextcloud_docroot}/COPYING %verify(not mode) %{nextcloud_docroot}/core/ %verify(not mode) %{nextcloud_docroot}/dist/ %verify(not mode) %{nextcloud_docroot}/cron.php %verify(not mode) %{nextcloud_docroot}/.htaccess %verify(not mode) %{nextcloud_docroot}/composer.json %verify(not mode) %{nextcloud_docroot}/composer.lock %verify(not mode) %{nextcloud_docroot}/package.json %verify(not mode) %{nextcloud_docroot}/package-lock.json %verify(not mode) %{nextcloud_docroot}/index.html %verify(not mode) %{nextcloud_docroot}/index.php %verify(not mode) %{nextcloud_docroot}/lib/ %verify(not mode) %{nextcloud_docroot}/occ %verify(not mode) %{nextcloud_docroot}/ocs/ %verify(not mode) %{nextcloud_docroot}/ocs-provider/ %verify(not mode) %{nextcloud_docroot}/public.php %verify(not mode) %{nextcloud_docroot}/remote.php %verify(not mode) %{nextcloud_docroot}/resources/ %verify(not mode) %{nextcloud_docroot}/robots.txt %verify(not mode) %{nextcloud_docroot}/status.php %verify(not mode) %{nextcloud_docroot}/themes/ %verify(not mode) %{nextcloud_docroot}/updater/ %verify(not mode) %{nextcloud_docroot}/.user.ini %verify(not mode) %{nextcloud_docroot}/version.php %defattr(-,%{name},%{name}) %dir %verify(not mode) %{nextcloud_datadir} %dir %{nextcloud_sessiondir} %dir %{nextcloud_tmpdir} %dir %{nextcloud_logdir} %ghost %attr(0600,nextcloud-admin,nextcloud-admin) %{nextcloud_logdir}/upgrade.log %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor