#!/usr/bin/make -f
%:
	dh $@

override_dh_install:
	dh_install
	rm -r debian/nextcloud/usr/share/nextcloud/config
	ln -s /etc/nextcloud debian/nextcloud/usr/share/nextcloud/config
	install -D -o www-data -g www-data -m 0750 -d debian/nextcloud/var/lib/nextcloud/data
	install -D -o www-data -g www-data -d debian/nextcloud/var/log/nextcloud
	install -D -o www-data -g www-data -m 0755 -d debian/nextcloud/etc/nextcloud
	install -D -o www-data -g www-data -m 0640 debian/config.php debian/nextcloud/etc/nextcloud/
	install -D -d debian/nextcloud/usr/sbin
	install -m 0755 debian/nextcloud-occ debian/nextcloud/usr/sbin/

override_dh_strip_nondeterminism:

override_dh_fixperms:
	dh_fixperms -X debian/nextcloud/var/lib/nextcloud -X debian/nextcloud/var/log/nextcloud -X debian/nextcloud/etc/nextcloud