File: rules

package info (click to toggle)
gle-graphics 4.3.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,652 kB
  • sloc: cpp: 78,109; sh: 161; python: 150; makefile: 68; perl: 46; ansic: 1
file content (58 lines) | stat: -rwxr-xr-x 1,673 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
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/default.mk

ifeq (,$(filter terse,$(DEB_BUILD_OPTIONS)))
    export DH_VERBOSE = 1
endif
### testing
export DH_VERBOSE = 1
###

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1

CFLAGS   += $(CPPFLAGS)
CXXFLAGS += $(CPPFLAGS)

empty :=

#DEB_CMAKE_EXTRA_FLAGS = \
#    -DGLE_TOP_DIR=/usr/share/gle-graphics/$(DEB_VERSION_UPSTREAM) \
#    -CMAKE_INSTALL_PREFIX=/usr/share/gle-graphics/4.3.3 \
#    $(empty)

# 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

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

# 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)")
# https://reproducible-builds.org/docs/source-date-epoch/
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp)

%:
	dh $@

override_dh_auto_build:
	dh_auto_build

	sed s/@GLE_VERSION@/$(DEB_VERSION_UPSTREAM)/ debian/gle.1.in | sed s/@GLE_INSTALL_DATA@/"\/usr\/share\/gle-graphics"/  > debian/gle.1

override_dh_auto_clean:
	dh_auto_clean
	-rm src/TeX/inittex.ini

# 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
	docbook-to-man debian/glebtool.sgml > debian/glebtool.1