#!/usr/bin/make -f

include /usr/share/blends-dev/Makefile

dist:
	# the next two lines are taken from the original dist target from blends-dev Makefile
	rm -f $(BLEND)-tasks.desc debian/control
	make -f debian/rules get-orig-source
	# This sed command removes gosa-plugin-netgroups from the list of Recommends and
	# adds gosa-plugin-netgroups to Depends (# Closes: #793667)
	# (the implementation is a workaround for the missing feature 
	# in blends-dev tracked as #825172)
	sed -i -e '/^ *gosa-plugin-netgroups,$$/d' \
	       -e '/^Package: education-main-server/{;N;N;N;N;s/\nDepends: [^\n]*/&, gosa-plugin-netgroups,/;}' \
	       debian/control
	# This sed command removes the education-all metapackage which was created by
	# using blends-dev 0.6.93
	# work around for: #825004
	sed -i -e '/^Package: edu-all$$/,/^$$/d' debian/control
	# regenerate source tarball after d/control was changed
	# (this is a symptom of the above being workarounds and
	# why they should be implemented in blends-dev - also
	# compare the following line with the second line of this target…) 
	make -f debian/rules get-orig-source
