2 # Made with the aid of dh_make, by Craig Small
3 # Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
4 # Some lines taken from debmake, by Cristoph Lameter.
6 # Uncomment this to turn on verbose mode.
9 # These are used for cross-compiling and for saving the configure script
10 # from having to guess our platform (since we know it already)
11 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
12 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
14 DESKTOP_VENDOR = dickey
18 PACKAGE := $(shell dpkg-parsechangelog| \
19 sed -n 's/^Source: \(.*\)$$/\1/p')
21 PKG_APPDEFAULTS := /etc/X11/app-defaults
22 PKG_DESKTOP := /usr/share/applications
24 DSTDIR := $(CURDIR)/debian/$(PACKAGE)
25 MY_DESKTOP := $(DSTDIR)/usr/share/applications
29 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
35 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
40 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
44 configure: configure-stamp
49 --host=$(DEB_HOST_GNU_TYPE) \
50 --build=$(DEB_BUILD_GNU_TYPE) \
51 --program-suffix=$(PKG_SUFFIX) \
53 --libexecdir=\$${prefix}/lib \
54 --mandir=\$${prefix}/share/man \
55 --sysconfdir=/etc/$(PACKAGE) \
56 --localstatedir=/var \
57 --libdir=/etc/$(PACKAGE) \
58 --without-xterm-symlink \
62 --enable-dec-locator \
65 --enable-load-vt-fonts \
66 --enable-logfile-exec \
77 --with-app-defaults=$(PKG_APPDEFAULTS) \
78 --with-icondir=\$${prefix}/share/pixmaps \
79 --with-own-terminfo=\$${prefix}/share/terminfo \
80 --with-terminal-type=xterm-new \
87 build-stamp: configure-stamp
98 [ ! -f Makefile ] || $(MAKE) distclean
102 install: install-stamp
103 install-stamp: build-stamp
110 DESTDIR=$(CURDIR)/debian/$(PACKAGE)
114 install: install-indep install-arch
123 $(MAKE) install-bin \
126 # Build architecture-independent files here.
127 binary-indep: build install
131 # This overwrites the Debian package's copy of app-defaults and icons.
132 # But the resources are not the same; they are patched.
133 sed -i -f package/debian/color.sed XTerm-col.ad
134 sed -i -f package/debian/xterm-xres.sed XTerm.ad
136 $(MAKE) install-app \
141 # Follow-up with a check against the installed resource files.
142 ( cd $(DSTDIR)$(PKG_APPDEFAULTS) && $(SHELL) -c 'for p in *;do diff -u $$p $(PKG_APPDEFAULTS)/; done' ; exit 0 )
144 # The Debian package does not install desktop files.
145 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486317
146 $(SHELL) -c 'for p in *.desktop;do \
148 -e "s/Categories=System;/Categories=Application;Utility;/" \
149 -e "s/^\\(Name=.*\\)/\\1$(PKG_SUFFIX)/" \
150 -e "s/^\\(Exec=.*\\)/\\1$(PKG_SUFFIX)/" \
153 $(MAKE) install-desktop \
154 DESKTOP_FLAGS="--vendor='$(DESKTOP_VENDOR)' --dir $(MY_DESKTOP)"
156 ( cd $(DSTDIR)$(PKG_DESKTOP) \
157 && $(SHELL) -c 'for p in *;do \
158 test -n "$(PKG_SUFFIX)" && mv $$p `basename $$p .desktop`$(PKG_SUFFIX).desktop; \
159 diff -u $$p $(PKG_DESKTOP)/; \
163 # Build architecture-dependent files here.
164 binary-arch: build install
171 dh_installexamples tektests vttests
184 binary: binary-indep binary-arch
185 .PHONY: build clean binary-indep binary-arch binary install install-stamp