#!/usr/bin/make -f


INSTALLED_ROOT_DIR = usr/share/deb-build-artifact-gather
# Nothing to do by default
all:

test:

install:
	install -m0755 -Dt$(DESTDIR)/usr/bin assets/deb-build-artifact-gather
	install -m0755 -d $(DESTDIR)/$(INSTALLED_ROOT_DIR)
	cp -a --reflink=auto src/deb_build_artifact_gather $(DESTDIR)/$(INSTALLED_ROOT_DIR)
	find $(DESTDIR)/$(INSTALLED_ROOT_DIR) -type d -name '__pycache__' -exec rm -fr {} +
	install -m0755 -d $(DESTDIR)/usr/share/man/man1
	pod2man --utf8 --section=1 --name="deb-build-artifact-gather" -c "Debian Aritfact gathering tooling" deb-build-artifact-gather.pod \
	   $(DESTDIR)/usr/share/man/man1/deb-build-artifact-gather.1
	chmod -R u=rwX,go=rX $(DESTDIR)/$(DEBPUTY_INSTALLED_ROOT_DIR)
