File: rules

package info (click to toggle)
trn4 4.0-test77-19
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid
  • size: 4,016 kB
  • sloc: ansic: 48,332; sh: 6,795; tcl: 1,696; yacc: 662; perl: 108; makefile: 27
file content (46 lines) | stat: -rwxr-xr-x 1,414 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
%:
	dh $@

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

export DEB_CFLAGS_MAINT_APPEND := -std=c99

dtmp=debian/trn4

override_dh_auto_configure:
	cp debian/Policy.sh .
	# Configure adds -DDEBUG for us when we use -g.
	./Configure -OdErs
	perl -pi -e "s,^egrep='[^']*/egrep',egrep='egrep'," config.sh
	./Configure -desS

ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
# This is nasty, but the set of things inserted into config.h by Configure
# is small enough that we should be able to get away with it.
override_dh_auto_build:
	dh_auto_build -- CC=$(DEB_HOST_GNU_TYPE)-gcc
endif

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) -i spotless

# Do the install ourselves, as we use a slightly different directory layout
# to what 'make install' wants, and we may not want to strip binaries.
override_dh_auto_install:

execute_after_dh_installdocs:
	mv $(dtmp)/usr/share/doc/trn4/changelog $(dtmp)/usr/share/doc/trn4/NEWS

override_dh_installchangelogs:
	dh_installchangelogs debian/changelog.upstream

execute_before_dh_installalternatives:
	# These can't be done using dh_link, because they're needed earlier
	# by dh_installalternatives.
	ln -sf trn debian/trn4/usr/lib/trn4/rn
	ln -sf trn4.1.gz debian/trn4/usr/share/man/man1/trn4-rn.1.gz

override_dh_compress:
	dh_compress -X examples