File: rules

package info (click to toggle)
grep 2.27-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 12,844 kB
  • ctags: 7,321
  • sloc: ansic: 69,540; sh: 10,958; perl: 564; makefile: 363; awk: 71; sed: 16
file content (56 lines) | stat: -rwxr-xr-x 1,833 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/make -f
# -*- makefile -*-

export DH_VERBOSE=1

# true prevents autoreconf from invoking these tools
export AUTOPOINT=true
export AUTOHEADER=true
export LIBTOOLIZE=true

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CPPFLAGS=-DHAVE_DYNAMIC_LIBPCRE
LIBS=-Wl,--no-as-needed -ldl -Wl,--as-needed

##########################################################################
# 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_UPSTREAM_URL = http://ftp.gnu.org/gnu/grep/
DEB_UPSTREAM_TARBALL_EXTENSION = tar.xz

DEB_CONFIGURE_EXTRA_FLAGS += --without-included-regex
DEB_CONFIGURE_SCRIPT_ENV += LIBS="$(LIBS)"

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

# Run expensive tests only on amd64 and i386. Builders have had some
# problems with expensive checks, e.g. long-pattern-perf, on other
# architectures such as s390x, ppc64el and hurd-i386.

DEB_MAKE_CHECK_TARGET = check

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

# Fix permissions in test files not yet included in upstream released
# tarballs
configure/grep::
	chmod +x tests/proc

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