#!/usr/bin/make -f
derives_from_ubuntu := $(shell (dpkg-vendor --derives-from Ubuntu && echo "yes") || echo "no")
%:
dh $@
override_dh_auto_install:
install -D -m 755 rastertosag-gdi $(CURDIR)/debian/tmp/usr/lib/cups/filter/rastertosag-gdi
install -D -m 644 ppd/rsp1000s.ppd $(CURDIR)/debian/tmp/usr/share/ppd/rastertosag-gdi/Ricoh/Ricoh-Aficio_SP_1000S-rastertosag-gdi.ppd
install -D -m 644 ppd/rsp1100s.ppd $(CURDIR)/debian/tmp/usr/share/ppd/rastertosag-gdi/Ricoh/Ricoh-Aficio_SP_1100S-rastertosag-gdi.ppd
override_dh_install:
dh_install
install -D -m 644 debian/rastertosag-gdi.ppd-updater $(CURDIR)/debian/rastertosag-gdi/usr/share/cups/ppd-updaters/rastertosag-gdi
ifeq ($(derives_from_ubuntu),yes)
# Install the apport hook on Ubuntu and derivatives
install -D -m 644 debian/ubuntu/apport-hook.py $(CURDIR)/debian/rastertosag-gdi/usr/share/apport/package-hooks/source_rastertosag-gdi.py
endif