#!/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
PKG="yandex-media-mongo-dump-restore"
export VIRTUAL_ENV="debian/venv"

%:
		dh $@
override_dh_auto_build:
		debian/build-venv

override_dh_auto_install:
		mkdir -p debian/${PKG}/usr/share/${PKG}
		mkdir -p debian/${PKG}/etc/yandex/${PKG}
		mkdir -p debian/${PKG}/var/log/${PKG}
		mkdir -p debian/${PKG}/etc/logrotate.d
		cp -r debian/venv debian/${PKG}/usr/share/${PKG}/venv
		cp -r conf/main-default.yml debian/${PKG}/etc/yandex/${PKG}/
		rm -r debian/venv

override_dh_builddeb:
		dh_builddeb -- -Zgzip

override_dh_auto_clean:
		dh_auto_clean

