File: rules

package info (click to toggle)
gle-graphics 4.2.5-9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 13,796 kB
  • sloc: cpp: 76,951; sh: 3,140; makefile: 588; perl: 486; lisp: 142; ansic: 8; xml: 7
file content (62 lines) | stat: -rwxr-xr-x 2,070 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
57
58
59
60
61
62
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

# fix build problems on the hurd
ifeq ($(DEB_HOST_ARCH),hurd-i386)
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--no-as-needed -Wl,-lpthread -Wl,--as-needed -fPIC
endif

# get source date in seconds since 1970 and pass it to the build
#SOURCE_DATE_EPOCH=$(shell date -d "$$(dpkg-parsechangelog --count 1 -SDate)" +%s)
#export DEB_CPPFLAGS_MAINT_APPEND = -DDEBIAN_EPOCH=$(SOURCE_DATE_EPOCH)

# enable debugging
#export DEB_CPPFLAGS_MAINT_APPEND = -g
export DEB_CFLAGS_MAINT_APPEND = -g

# define libgs search path
HEAD = /usr/lib/
ARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBGS := $(HEAD)$(ARCH)
#export DEB_CPPFLAGS_MAINT_APPEND = -DDEBIAN_GS=$(LIBGS)
# does not work since x86_64-linux-gnu gets mangled in cpp to:
#note: #pragma message: DEBIAN_GS=/usr/lib/x86_64-1-gnu
# also quotes are missing

# source date string instead of \today in gle-manual
# use only digits, locale month is not reproducible
DATE_FMT = %Y-%m-%d
SOURCE_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)"  2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")

%:
#	dh $@
	dh $@ --with autotools_dev,autoreconf

override_dh_auto_build:
	echo "const char *debian_lib = \""$(LIBGS)"\";" > src/gui/debian_gs.h
	dh_auto_build
	echo $(SOURCE_DATE) > gle-refman/title/source_date.tex
	make doc

override_dh_auto_clean:
	dh_auto_clean
# remove source_date for manual:
	[ ! -f gle-refman/title/source_date.tex ] || rm  gle-refman/title/source_date.tex

override_dh_auto_configure:
	dh_auto_configure -- --with-rpath=no

override_dh_auto_install:
	dh_auto_install
# do not ship helper that is only used during build
	[ ! -f debian/gle-graphics/usr/bin/glebtool ] || rm debian/gle-graphics/usr/bin/glebtool

# manpages are updated only when needed, call this target manually
manpage:
	docbook-to-man debian/manip.sgml > debian/manip.1
	docbook-to-man debian/qgle.sgml > debian/qgle.1