#!/usr/bin/make -f %: dh ${@} override_dh_auto_clean: dh_auto_clean $(MAKE) -C system-boot clean $(MAKE) -C system-build clean $(MAKE) -C system-config clean $(MAKE) -C system-images clean override_dh_auto_build: dh_auto_build $(MAKE) -C system-boot $(MAKE) -C system-build $(MAKE) -C system-config $(MAKE) -C system-images override_dh_auto_install: dh_auto_install $(MAKE) -C system-boot install DESTDIR=$(CURDIR)/debian/open-infrastructure-system-boot $(MAKE) -C system-build install DESTDIR=$(CURDIR)/debian/open-infrastructure-system-build $(MAKE) -C system-config install DESTDIR=$(CURDIR)/debian/open-infrastructure-system-config $(MAKE) -C system-images install DESTDIR=$(CURDIR)/debian/open-infrastructure-system-images # Removing useless files rm -rf debian/*/usr/share/doc/live-boot rm -f debian/*/bin/live-swapfile rm -rf debian/*/usr/share/doc/live-build rm -f debian/open-infrastructure-system-images/usr/share/doc/system-images/CHANGELOG.txt rm -f debian/open-infrastructure-system-images/usr/share/doc/system-images/LICENSE.txt mv debian/open-infrastructure-system-images/usr/share/doc/system-images debian/open-infrastructure-system-images/usr/share/doc/open-infrastructure-system-images override_dh_compress: dh_compress -Xusr/share/doc/open-infrastructure-system-config/examples -Xusr/share/system-images # Recompressing without timestamp cd debian/open-infrastructure-system-build/usr/share/live/build/bootloaders/grub-legacy && \ gunzip splash.xpm.gz && \ gzip -n splash.xpm # Using systemd instead of sysvinit rm -rf debian/*/etc/init.d rm -f debian/*/lib/live/config/*-sysvinit rm -f debian/*/lib/live/config/*-sysv-rc # Using user-setup instead of live-debconfig rm -f debian/tmp/live/config/*live-debconfig* # Removing unused files rm -rf debian/*/usr/share/doc/live-config rm -f debian/*/bin/live-config-update override_dh_link: dh_link # workaround dh_link convertion of absolute symlinks to relvative symlinks rm -rf debian/open-infrastructure-system-build/usr/share/live/build/bootloaders cp -a system-build/share/bootloaders debian/open-infrastructure-system-build/usr/share/live/build/bootloaders for DIRECTORY in debian/*/usr/share/system-images/*; \ do \ IMAGE="$$(basename $${DIRECTORY})"; \ rm -rf debian/open-infrastructure-system-images/usr/share/system-images/$${IMAGE}/config/bootloaders; \ cp -a system-images/share/images/$${IMAGE}/config/bootloaders debian/open-infrastructure-system-images/usr/share/system-images/$${IMAGE}/config/bootloaders; \ done