#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 SHELL=/bin/bash export NAME=nextcloud export DROOT=$(CURDIR)/debian/$(NAME) export NEXTCLOUD=$(CURDIR)/$(NAME) export SRCDIR=/usr/src/packages/SOURCES export OC_DIR=/var/www/nextcloud %: dh $@ override_dh_strip_nondeterminism: echo skipping dh_strip_nondeterminism override_dh_install: dh_install -Xdebian mkdir -p $(DROOT)/usr/share/doc/$(NAME) mkdir -p $(DROOT)/$(OC_DIR)/core/skeleton #mkdir -p $(DROOT)/$(OC_DIR)/data install -m 664 ${NEXTCLOUD}/.htaccess $(DROOT)/$(OC_DIR)/.htaccess install -m 664 ${NEXTCLOUD}/.user.ini $(DROOT)/$(OC_DIR)/.user.ini ## ls -laR override_dh_fixperms: # dh_fixperms is horribly slow. Do we have loops in the filesystem tree? #dh_fixperms -X usr/share/nextcloud/data -X usr/share/nextcloud/config ### this chown times out after 8h. # chown -R --no-dereference 0:0 $(DROOT) chmod a+x $(DROOT)/$(OC_DIR)/occ # chown at the end to ensure everything is chown'ed # We must chown all apps folders, in each app, to be independant of installation order. chown -R www-data:www-data $(DROOT)/$(OC_DIR)/apps chown -R www-data:www-data $(DROOT)/$(OC_DIR)/themes #chown -R www-data:www-data $(DROOT)/$(OC_DIR)/config # https://github.com/owncloud/core/issues/18222 #chmod -R ug+rwx $(DROOT)/$(OC_DIR)/config #chown -R www-data:www-data $(DROOT)/$(OC_DIR)/data # https://github.com/owncloud/enterprise/issues/1306 chown www-data:www-data $(DROOT)/$(OC_DIR)/.htaccess chown www-data:www-data $(DROOT)/$(OC_DIR)/.user.ini chmod ug+rw $(DROOT)/$(OC_DIR)/.htaccess chmod ug+rw $(DROOT)/$(OC_DIR)/.user.ini