File: rules

package info (click to toggle)
re2 20140304%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,992 kB
  • ctags: 2,910
  • sloc: cpp: 22,518; makefile: 266; python: 265; perl: 246; sh: 143
file content (46 lines) | stat: -rwxr-xr-x 1,324 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
#!/usr/bin/make -f

export DEB_CXXFLAGS_MAINT_APPEND=-pthread -Wall
export DEB_LDFLAGS_MAINT_APPEND=-pthread
CXXFLAGS=$(shell dpkg-buildflags --get CXXFLAGS | sed s/-O2/-O3/)

DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIB_PKG = libre2-1

%:
	dh $@ --parallel

override_dh_auto_build:
	rm -f util/valgrind.h
	if [ -e /usr/include/valgrind/valgrind.h ]; then \
		ln -s /usr/include/valgrind/valgrind.h util; \
	else \
		touch util/valgrind.h; \
	fi
	dh_auto_build -- CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
	                 CPPFLAGS="$(CPPFLAGS)" REBUILD_TABLES=1

override_dh_auto_test:
	dh_auto_test -- CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" \
	                CPPFLAGS="$(CPPFLAGS)"

override_dh_auto_install:
	dh_auto_install -- prefix=/usr libdir=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_installdocs:
	dh_installdocs --link-doc=$(LIB_PKG)

override_dh_strip:
	dh_strip --dbg-package=$(LIB_PKG)-dbg

override_dh_gencontrol:
	dh_gencontrol -- -VBuilt-Using='$(shell dpkg-query -f'$${source:Package} (= $${source:Version})' -W unicode-data)'

override_dh_clean:
	dh_clean
	rm -f util/valgrind.h

VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: (.+)\+dfsg-.*,\1,p')

get-packaged-orig-source:
	uscan --noconf --rename --download-current-version --compression=xz --destdir=.