#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright © 2012-2017 Jonas Smedegaard <dr@jones.dk>
# Description: Main Debian packaging script for Green End SFTP Server
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

include /usr/share/cdbs/1/rules/utils.mk
include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk

# Needed by upstream build process
CDBS_BUILD_DEPENDS += , libreadline-dev

# Needed by upstream regresssion testing
CDBS_BUILD_DEPENDS += , python, python-paramiko

# Preserve upstream shipped cruft
DEB_CLEAN_EXCLUDE = tests/truncate6~

# ignore files unused during build
DEB_COPYRIGHT_CHECK_IGNORE_REGEX = ^Makefile.in|aclocal.m4|configure|config.h.in|config\.aux/.*|debian/(changelog|copyright(|_hints|_newhints))$

# We use autotools too modern for default CDBS
DEB_CONFIGURE_LIBEXECDIR = /usr/lib

DEB_MAKE_CHECK_TARGET = check

# Some regression tests fail if ls output is localized
$(cdbs_make_check_stamps) : export LC_ALL=C

# (re)generate autotools
include /usr/share/cdbs/1/rules/autoreconf.mk
DEB_UPSTREAM_CRUFT_MOVE = Makefile.in aclocal.m4 configure config.h.in
DEB_UPSTREAM_CRUFT_MOVE += $(patsubst %,config.aux/%,depcomp install-sh missing)
DEB_UPSTREAM_CRUFT_COPY = $(patsubst %,config.aux/%,config.guess config.sub)
