#!/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

override_dh_install:
	mkdir -p $(CURDIR)/debian/config-scripts-graphdata-kp/root/ $(CURDIR)/debian/config-scripts-graphdata-kp/home/www/kinopoisk.ru/graph_data $(CURDIR)/debian/config-scripts-graphdata-kp/home/www/kinopoisk.ru/graph_data
	mkdir -p $(CURDIR)/debian/config-scripts-graphdata-kp/var/www/.ssh/
	cp $(CURDIR)/root/gen_graph_dirs.sh $(CURDIR)/debian/config-scripts-graphdata-kp/root/
	cp $(CURDIR)/var/www/.ssh/authorized_keys $(CURDIR)/debian/config-scripts-graphdata-kp/var/www/.ssh

override_dh_fixperms:
	dh_fixperms
	chmod 777 $(CURDIR)/debian/config-scripts-graphdata-kp/home/www/kinopoisk.ru/graph_data
	chown -R www-data:www-data $(CURDIR)/debian/config-scripts-graphdata-kp/var/www/.ssh
	chmod 700 $(CURDIR)/debian/config-scripts-graphdata-kp/var/www/.ssh
	chmod 600 $(CURDIR)/debian/config-scripts-graphdata-kp/var/www/.ssh/authorized_keys

%:
	dh $@ 
