#!/usr/bin/make -f
# Metapackage: it compiles and installs nothing of its own, the content is the
# Depends list in debian/control.
export SHELL := /bin/bash
.SHELLFLAGS := -c
export DH_VERBOSE = 1
export DH_OPTIONS = -v

export PHPVERSION=53
export altdir = /opt/alt/php53

%:
	dh $@

override_dh_auto_configure:
	# Create postinst scripts
	for i in $(shell grep 'Package' debian/control | awk '{print $$2}'); do \
		if [ ! -f debian/$${i}.postinst ]; then \
			echo "#!/bin/bash" > debian/$${i}.postinst; \
			echo "[ -x /usr/bin/cl-linksafe-apply-group ] && /usr/bin/cl-linksafe-apply-group $${i} || :" >> debian/$${i}.postinst; \
		fi; \
	done

override_dh_auto_build:

override_dh_auto_install:
