Description:   pass to cmake the environment variables containing the 
               dpkg-build-flags
Author:        Roland Kaminski <kaminski@cs.uni-potsdam.de>
Integrated-by: Ralf Treinen <treinen@debian.org>

Index: aspcud-2011.03.17.dfsg/Makefile
===================================================================
--- aspcud-2011.03.17.dfsg.orig/Makefile	2012-10-24 21:59:52.000000000 +0200
+++ aspcud-2011.03.17.dfsg/Makefile	2012-10-24 22:05:50.000000000 +0200
@@ -12,7 +12,10 @@
 	mkdir -p build/release
 	cd build/release && \
 	cmake ../.. \
-		-DCMAKE_BUILD_TYPE=release && \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DCMAKE_C_FLAGS_RELEASE="$(CFLAGS) $(CPPFLAGS)" \
+		-DCMAKE_CXX_FLAGS_RELEASE="$(CXXFLAGS) $(CPPFLAGS)" \
+		-DCMAKE_EXE_LINKER_FLAGS_RELEASE="$(LDFLAGS)" && \
 	$(MAKE)
 
 static:
