#!/usr/bin/make -f
# -*- mode: makefile; coding: utf-8 -*-
# Copyright (C) 2009-2010 Andrew Lee (李健秋) <ajqlee@debian.org>
# Description: Main Debian packaging script for morituri
#
# 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 2, 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/>.
# Uncomment this to turn on verbose mode.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DISTRO = "$(shell lsb_release -si)"

# GTK3 migration
CFLAGS+=-DGTK_DISABLE_SINGLE_INCLUDES
CFLAGS+=-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED
CFLAGS+=-DGSEAL_ENABLE
CFLAGS+=-DGDK_PIXBUF_DISABLE_DEPRECATED
CFLAGS+=-DG_DISABLE_DEPRECATED

LDFLAGS+=-Wl,-z,defs -Wl,--as-needed

%:
	dh --with autoreconf $@

override_dh_auto_configure:
	dh_auto_configure -- --enable-man 

override_dh_auto_clean:
	rm -f man/lxpanel.1 man/lxpanelctl.1
	dh_auto_clean

override_dh_install:
	dh_install --fail-missing
	#Install apport hook only on Ubuntu
ifeq ($(DISTRO),"Ubuntu")
	dh_install -plxappearance debian/apport/source_lxappearance.py usr/share/apport/package-hooks
endif

override_dh_auto_test:
	:       

override_dh_strip:
	dh_strip --dbg-package=lxappearance-dbg
