debian swirl logo

Back to the packages list grep

#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE= 1

# true prevents autoreconf invokes these tools
export AUTOPOINT= true
export AUTOHEADER= true
export LIBTOOLIZE= true

##########################################################################
# I need to investigate why CDBS doesn't export automatically build flags 
# needed for hardening. This block should be temporal.
CFLAGS = `dpkg-buildflags --get CFLAGS`
CFLAGS += -O3
LDFLAGS = `dpkg-buildflags --get LDFLAGS`
LDFLAGS += -Wl,-z,defs
CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
DEB_CONFIGURE_SCRIPT_ENV += CFLAGS="$(CFLAGS)"
DEB_CONFIGURE_SCRIPT_ENV += LDFLAGS="$(LDFLAGS)"
DEB_CONFIGURE_SCRIPT_ENV += CPPFLAGS="$(CPPFLAGS)"
##########################################################################

DEB_CONFIGURE_EXTRA_FLAGS += --without-included-regex
DEB_CONFIGURE_SCRIPT_ENV += LIBS="-Wl,--no-as-needed -ldl -Wl,--as-needed"
DEB_CONFIGURE_SCRIPT_ENV += CPPFLAGS="-DHAVE_DYNAMIC_LIBPCRE"

# FIXME: CDBS should include a specific var for this 
# (e.g. DEB_CONFIGURE_EXECDIR in autotools-vars.mk)?
DEB_CONFIGURE_EXTRA_FLAGS += --exec-prefix=/

include /usr/share/cdbs/1/rules/autoreconf.mk
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/autotools.mk

binary-fixup/grep::
		rm -f debian/grep/usr/share/info/dir.gz

Builds:

grep
gnu grep, egrep and fgrep