#!/usr/bin/make -f #export DH_VERBOSE = 1 include /usr/share/dpkg/pkg-info.mk export DEB_BUILD_MAINT_OPTIONS = hardening=+all WAF := python3 ./waf CONFIGUREFLAGS := --debug ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) NUMCPUS := $(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1) NUMJOBS := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) TOOMANYJOBS := $(shell [ $(NUMJOBS) -gt $(NUMCPUS) ] && echo true) ifeq ($(TOOMANYJOBS),true) BUILDFLAGS := -j$(NUMCPUS) else BUILDFLAGS := -j$(NUMJOBS) endif endif PKG := $(CURDIR)/debian/zutty P2M := pod2man -s 1 -u -c Zutty -r $(DEB_VERSION_UPSTREAM) %: dh $@ override_dh_auto_build: $(WAF) build $(BUILDFLAGS) $(P2M) debian/zutty.pod > debian/zutty.1 override_dh_auto_configure: $(WAF) configure $(CONFIGUREFLAGS) --prefix=/usr override_dh_auto_install: $(WAF) install --destdir=$(PKG) mv $(PKG)/usr/bin/zutty.dbg $(PKG)/usr/bin/zutty execute_after_dh_installdirs: cp -p icons/zutty.desktop \ $(PKG)/usr/share/applications/ cp -p icons/zutty.svg \ $(PKG)/usr/share/icons/hicolor/scalable/apps/ cp -p icons/zutty_128x128.png \ $(PKG)/usr/share/icons/hicolor/128x128/apps/zutty.png cp -p icons/zutty_96x96.png \ $(PKG)/usr/share/icons/hicolor/96x96/apps/zutty.png cp -p icons/zutty_64x64.png \ $(PKG)/usr/share/icons/hicolor/64x64/apps/zutty.png cp -p icons/zutty_48x48.png \ $(PKG)/usr/share/icons/hicolor/48x48/apps/zutty.png cp -p icons/zutty_32x32.png \ $(PKG)/usr/share/icons/hicolor/32x32/apps/zutty.png cp -p icons/zutty_16x16.png \ $(PKG)/usr/share/icons/hicolor/16x16/apps/zutty.png override_dh_auto_clean: $(WAF) clean || true find -name "*.pyc" -delete rm -rf build .waf* rm -f debian/zutty.1 dh_auto_clean