File: rules

package info (click to toggle)
pgbackrest 2.10-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 46,376 kB
  • sloc: perl: 42,885; ansic: 32,928; xml: 8,902; makefile: 333; sh: 91; sql: 32
file content (43 lines) | stat: -rwxr-xr-x 1,113 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
#!/usr/bin/make -f

MANTEMPLATE="${CURDIR}/doc/output/man/pgbackrest.1.txt"

#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

#export DH_VERBOSE = 1

%:
	dh $@

override_dh_auto_build:
	# Replace user name in doc cache with the current user
	[ $$(whoami) = root ] || sed -i "s/vagrant/$$(whoami)/g" $(CURDIR)/doc/resource/exe.cache

	perl $(CURDIR)/doc/doc.pl --out=man --out=html --cache-only \
	  --var=project-url-root=index.html --exclude=backlog \
	  --var=release-date-static=y
	txt2man \
	  -v "pgBackRest Command Reference" \
	  -t pgbackrest \
	  -s 1 \
	  ${MANTEMPLATE} > ${CURDIR}/doc/output/man/pgbackrest.1
	# The Makefile doesn't accepts *FLAGS as environment variables.
	# However, it offers a method to pass extra arguments via *EXTRA
	# variable.
	make -C $(CURDIR)/src/ CEXTRA="$(CFLAGS)" LDEXTRA="$(LDFLAGS)"
	dh_auto_build

override_dh_auto_clean:
	rm -rf $(CURDIR)/doc/output
	dh_auto_clean

override_dh_auto_install:
	make -C src install DESTDIR=$(CURDIR)/debian/pgbackrest
	dh_auto_install

.PHONY: build

build:
	dh build