1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Exit immediately if any untested command fails
SHELL := sh -e
# Path of 'debian' directory
DEB_DIR := $(abspath $(dir $(MAKEFILE_LIST)))
# Provide the correct pkg-config for cross-building
include /usr/share/dpkg/architecture.mk
export PKG_CONFIG := $(DEB_HOST_GNU_TYPE)-pkg-config
# Enable all hardening flags
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# The upstream Makefiles are written in a way that suppresses the recipe
# echoing. This means that tools like 'blhc' cannot inspect the build logs.
# Instead of maintaining a patch that will remove the preceding '@' symbol
# from all recipes, we pass the '--trace' flag to make, which prints the
# entire recipe to be executed, even for recipes that are normally silent
MAKEFLAGS += --trace
D := $(DEB_DIR)/suckless-tools
TOOLS := $(filter-out debian, $(wildcard *))
%:
dh $@
.PHONY: override_dh_auto_clean
override_dh_auto_clean:
for TOOL in $(TOOLS); do \
dh_auto_clean --sourcedirectory=$${TOOL}; \
done
.PHONY: override_dh_auto_build
override_dh_auto_build:
for TOOL in $(TOOLS); do \
dh_auto_build --sourcedirectory=$${TOOL}; \
done
.PHONY: override_dh_auto_install
override_dh_auto_install:
for TOOL in $(TOOLS); do \
dh_auto_install --sourcedirectory=$${TOOL} -- PREFIX=/usr; \
done
.PHONY: override_dh_installdocs
override_dh_installdocs:
dh_installdocs
for TOOL in $(TOOLS); do \
cp $${TOOL}/README $(D)/usr/share/doc/suckless-tools/README.$${TOOL}; \
done
|