#!/usr/bin/make -f # # $(DEBIAN)/rules for Ubuntu linux # # Use this however you want, just give credit where credit is due. # # Copyright (c) 2007 Ben Collins # # Do not use make's built-in rules and variables # (this increases performance and avoids hard-to-debug behaviour) MAKEFLAGS += -rR # Allow to run debian/rules directly without root export DEB_RULES_REQUIRES_ROOT := no .NOTPARALLEL: DEBIAN=$(shell awk -F= '($$1 == "DEBIAN") { print $$2 }' $(DEBIAN)/control.stub; flavours="$(sort $(wildcard $(DEBIAN)/control.d/vars.*))";\ for i in $$flavours; do \ $(SHELL) $(DROOT)/scripts/control-create $$i "$(any_signed)" | \ sed -e 's/PKGVER/$(release)/g' \ -e 's/ABINUM/$(abinum)/g' \ -e 's/SRCPKGNAME/$(src_pkg_name)/g' \ -e 's/=HUMAN=/$(human_arch)/g' \ -e 's/=SERIES=/$(series)/g' \ >> $(DEBIAN)/control.stub; \ done .PHONY: debian/control debian/control: $(DEBIAN)/control.stub cp $(DEBIAN)/control.stub debian/control debian/canonical-certs.pem: $(wildcard $(DROOT)/certs/*-all.pem) $(wildcard $(DROOT)/certs/*-$(arch).pem) $(wildcard $(DEBIAN)/certs/*-all.pem) $(wildcard $(DEBIAN)/certs/*-$(arch).pem) for cert in $(sort $(notdir $^)); \ do \ for dir in $(DEBIAN) $(DROOT); \ do \ if [ -f "$$dir/certs/$$cert" ]; then \ cat "$$dir/certs/$$cert"; \ break; \ fi; \ done; \ done >"$@" debian/canonical-revoked-certs.pem: $(wildcard $(DROOT)/revoked-certs/*-all.pem) $(wildcard $(DROOT)/revoked-certs/*-$(arch).pem) $(wildcard $(DEBIAN)/revoked-certs/*-all.pem) $(wildcard $(DEBIAN)/revoked-certs/*-$(arch).pem) for cert in $(sort $(notdir $^)); \ do \ for dir in $(DEBIAN) $(DROOT); \ do \ if [ -f "$$dir/revoked-certs/$$cert" ]; then \ cat "$$dir/revoked-certs/$$cert"; \ break; \ fi; \ done; \ done >"$@"