File: rules

package info (click to toggle)
xterm 327-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,360 kB
  • ctags: 6,057
  • sloc: ansic: 69,706; sh: 4,147; perl: 1,521; makefile: 746; xml: 40; sed: 11
file content (80 lines) | stat: -rwxr-xr-x 2,380 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/make -f
# Debian rules file for xterm source package

# Copyright 2005 David Martínez Moreno
#
# Licensed under the GNU General Public License, version 2.  See the file
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

CFLAGS = $(shell dpkg-buildflags --get CFLAGS)
CFLAGS += -Wall

LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)

HTML2TEXT:=lynx -dump -nolist -display_charset=utf-8

DEBTREEDIR:=$(CURDIR)/debian/tmp

DESKTOP_FLAGS = --vendor debian \
		--dir=$(DEBTREEDIR)/usr/share/applications

# disable some unsafe operations
CPPFLAGS += \
	-DDEF_ALLOW_FONT=False \
	-DDEF_ALLOW_TCAP=False \
	-DDEF_DISALLOWED_WINDOW=\\\"1,2,3,4,5,6,7,8,9,11,13,14,18,19,20,21,GetSelection,SetSelection,SetWinLines,SetXprop\\\"

override_dh_autoreconf:
	dh_autoreconf autoreconf-dickey -- -f -i

override_dh_auto_configure:
	dh_auto_configure -- \
		--exec-prefix=/usr \
		--with-app-defaults=/etc/X11/app-defaults \
		--with-icondir=/usr/share/icons \
		--with-icon-theme=yes \
		--with-tty-group=tty \
		--enable-logging \
		--enable-wide-chars \
		--enable-luit \
		--enable-256-color \
		--disable-imake \
		--enable-narrowproto \
		--enable-exec-xterm \
		--enable-dabbrev \
		--enable-backarrow-is-erase \
		--enable-sixel-graphics \
		--with-utempter \
		DESKTOP_FLAGS="$(DESKTOP_FLAGS)" \
		CFLAGS="$(CFLAGS)" \
		CPPFLAGS="$(CPPFLAGS)" \
		LDFLAGS="$(LDFLAGS)" \
		LUIT=/usr/bin/luit

override_dh_auto_build:
	dh_auto_build
	$(HTML2TEXT) debian/local/xterm.faq.html >debian/local/xterm.faq

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp -- install-desktop
	## Install lxterm command and manual page.
	install -m 755 debian/local/lxterm $(DEBTREEDIR)/usr/bin
	install -m 755 debian/local/lxterm.1 $(DEBTREEDIR)/usr/share/man/man1
	## Install terminfo and termcap precompiled definitions.
	install -d $(DEBTREEDIR)/usr/share/doc/xterm
	install -m 644 termcap  $(DEBTREEDIR)/usr/share/doc/xterm/xterm.termcap
	install -m 644 terminfo $(DEBTREEDIR)/usr/share/doc/xterm/xterm.terminfo

override_dh_install:
	dh_install --fail-missing

%:
	dh $@ --with autotools_dev --builddirectory=build/ --parallel

debian/local/xterm.faq.html:
	wget -O $@ http://invisible-island.net/xterm/xterm.faq.html

.PHONY: debian/local/xterm.faq.html