| 1 |
#!/usr/bin/make -f |
| 2 |
# Debian rules file for xterm source package |
| 3 |
|
| 4 |
# Copyright 2005 David MartÃnez Moreno |
| 5 |
# |
| 6 |
# Licensed under the GNU General Public License, version 2. See the file |
| 7 |
# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>. |
| 8 |
|
| 9 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 10 |
|
| 11 |
CFLAGS = $(shell dpkg-buildflags --get CFLAGS) |
| 12 |
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) |
| 13 |
CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS) |
| 14 |
|
| 15 |
HTML2TEXT:=lynx -dump -nolist -display_charset=utf-8 |
| 16 |
|
| 17 |
DEBTREEDIR:=$(CURDIR)/debian/tmp |
| 18 |
|
| 19 |
DESKTOP_FLAGS = --vendor debian \ |
| 20 |
--dir=$(DEBTREEDIR)/usr/share/applications |
| 21 |
|
| 22 |
# disable some unsafe operations |
| 23 |
CPPFLAGS += \ |
| 24 |
-DDEF_ALLOW_FONT=False \ |
| 25 |
-DDEF_ALLOW_TCAP=False \ |
| 26 |
-DDEF_DISALLOWED_WINDOW=\\\"*\\\" |
| 27 |
|
| 28 |
override_dh_auto_clean: |
| 29 |
if [ -f ctlseqs.txt.old ]; then mv -f ctlseqs.txt.old ctlseqs.txt; fi |
| 30 |
dh_auto_clean |
| 31 |
|
| 32 |
override_dh_autoreconf: |
| 33 |
dh_autoreconf autoreconf-dickey -- -f -i |
| 34 |
|
| 35 |
override_dh_auto_configure: |
| 36 |
dh_auto_configure -- \ |
| 37 |
--exec-prefix=/usr \ |
| 38 |
--with-app-defaults=/etc/X11/app-defaults \ |
| 39 |
--with-icondir=/usr/share/icons \ |
| 40 |
--with-icon-theme=yes \ |
| 41 |
--with-tty-group=tty \ |
| 42 |
--enable-warnings \ |
| 43 |
--enable-logging \ |
| 44 |
--enable-wide-chars \ |
| 45 |
--enable-luit \ |
| 46 |
--enable-256-color \ |
| 47 |
--disable-imake \ |
| 48 |
--enable-narrowproto \ |
| 49 |
--enable-exec-xterm \ |
| 50 |
--enable-dabbrev \ |
| 51 |
--enable-backarrow-is-erase \ |
| 52 |
--enable-pty-erase \ |
| 53 |
--enable-sixel-graphics \ |
| 54 |
--with-utempter \ |
| 55 |
--with-utmp-path=/var/run/utmp \ |
| 56 |
--with-wtmp-path=/var/log/wtmp \ |
| 57 |
--with-desktop-category=System,TerminalEmulator, \ |
| 58 |
DESKTOP_FLAGS="$(DESKTOP_FLAGS)" \ |
| 59 |
CFLAGS="$(CFLAGS)" \ |
| 60 |
CPPFLAGS="$(CPPFLAGS)" \ |
| 61 |
LDFLAGS="$(LDFLAGS)" \ |
| 62 |
LUIT=/usr/bin/luit |
| 63 |
|
| 64 |
override_dh_auto_build: |
| 65 |
if [ ! -f ctlseqs.txt.old ] && [ -f ctlseqs.txt ]; \ |
| 66 |
then mv -f ctlseqs.txt ctlseqs.txt.old; \ |
| 67 |
else rm -f ctlseqs.txt; \ |
| 68 |
fi |
| 69 |
dh_auto_build -- all ../ctlseqs.txt |
| 70 |
$(HTML2TEXT) debian/local/xterm.faq.html >debian/local/xterm.faq |
| 71 |
|
| 72 |
override_dh_auto_install: |
| 73 |
dh_auto_install --destdir=debian/tmp -- install-desktop |
| 74 |
## Install lxterm command and manual page. |
| 75 |
install -m 755 debian/local/lxterm $(DEBTREEDIR)/usr/bin |
| 76 |
install -m 755 debian/local/lxterm.1 $(DEBTREEDIR)/usr/share/man/man1 |
| 77 |
## Install terminfo and termcap precompiled definitions. |
| 78 |
install -d $(DEBTREEDIR)/usr/share/doc/xterm |
| 79 |
install -m 644 termcap $(DEBTREEDIR)/usr/share/doc/xterm/xterm.termcap |
| 80 |
install -m 644 terminfo $(DEBTREEDIR)/usr/share/doc/xterm/xterm.terminfo |
| 81 |
|
| 82 |
%: |
| 83 |
dh $@ --builddirectory=build/ |
| 84 |
|
| 85 |
debian/local/xterm.faq.html: |
| 86 |
wget -O $@ https://invisible-island.net/xterm/xterm.faq.html |
| 87 |
|
| 88 |
.PHONY: debian/local/xterm.faq.html |