#!/usr/bin/make -f
# -*- makefile -*-

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

XPI_NAME = xul-ext-sogo-connector.xpi
BUILD_DIR = "debian/build"
SOGO_CONNECTOR_COMPONENTS = \
chrome \
components \
custom/sogo-demo/defaults \
ChangeLog.old \
chrome.manifest \
install.rdf \
manifest.json \
RELEASE-NOTES

%:
	dh $@ --with xul-ext

override_dh_auto_clean:
	rm -rf $(BUILD_DIR)
	rm -f $(XPI_NAME)
	dh_clean

override_dh_auto_build:
	# rebuilding the *.xpt file
	mkdir $(BUILD_DIR)
	cp -a $(SOGO_CONNECTOR_COMPONENTS) $(BUILD_DIR)
	xpi-pack $(BUILD_DIR) $(XPI_NAME)

override_dh_auto_install:
	install-xpi $(XPI_NAME)
	mkdir -p debian/xul-ext-sogo-connector/usr/share/doc/xul-ext-sogo-connector
	cp README.md debian/xul-ext-sogo-connector/usr/share/doc/xul-ext-sogo-connector

