From e637938d8607bd3a1db689b9e1c9f6e046357220 Mon Sep 17 00:00:00 2001 From: YAEGASHI Takeshi Date: Mon, 17 Feb 2014 06:55:23 +0900 Subject: Add 0002-introduce-debian-standard-build-flags.patch diff --git a/debian/patches/0002-introduce-debian-standard-build-flags.patch b/debian/patches/0002-introduce-debian-standard-build-flags.patch new file mode 100644 index 0000000..e4b7c6d --- /dev/null +++ b/debian/patches/0002-introduce-debian-standard-build-flags.patch @@ -0,0 +1,34 @@ +From: YAEGASHI Takeshi +Date: Mon, 17 Feb 2014 06:51:44 +0900 +Subject: introduce debian standard build flags + +See https://wiki.debian.org/Hardening +--- + Makefile | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1dac1ef..7e1381c 100644 +--- a/Makefile ++++ b/Makefile +@@ -37,6 +37,10 @@ DOC_PDF = $(patsubst %.txt,%.pdf,$(MAN_TXT)) + # + -include cgit.conf + ++# Import Debian standard build flags. ++DPKG_EXPORT_BUILDFLAGS = 1 ++include /usr/share/dpkg/buildflags.mk ++ + export CGIT_VERSION CGIT_SCRIPT_NAME CGIT_SCRIPT_PATH CGIT_DATA_PATH CGIT_CONFIG CACHE_ROOT + + # +@@ -65,7 +69,8 @@ endif + all:: cgit + + cgit: +- $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1 ++ $(QUIET_SUBDIR0)git $(QUIET_SUBDIR1) -f ../cgit.mk ../cgit $(EXTRA_GIT_TARGETS) NO_CURL=1 \ ++ CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" + + test: + @$(MAKE) --no-print-directory cgit EXTRA_GIT_TARGETS=all diff --git a/debian/patches/series b/debian/patches/series index 0f6683d..dd1ea6a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-make-a2x-skip-xmllint.patch +0002-introduce-debian-standard-build-flags.patch -- cgit v0.10.1