2010-11-29 13:10:09 -07:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# Made with the aid of dh_make, by Craig Small
|
|
|
|
# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
|
|
|
|
# Some lines taken from debmake, by Cristoph Lameter.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
|
|
|
# These are used for cross-compiling and for saving the configure script
|
|
|
|
# from having to guess our platform (since we know it already)
|
|
|
|
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
|
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
|
|
|
|
|
|
|
DESKTOP_VENDOR = dickey
|
|
|
|
|
|
|
|
PKG_SUFFIX = -dev
|
2011-08-18 13:47:42 -06:00
|
|
|
PKG_CLASS = XTermDev
|
2010-11-29 13:10:09 -07:00
|
|
|
|
|
|
|
PACKAGE := $(shell dpkg-parsechangelog| \
|
|
|
|
sed -n 's/^Source: \(.*\)$$/\1/p')
|
|
|
|
|
|
|
|
PKG_APPDEFAULTS := /etc/X11/app-defaults
|
|
|
|
PKG_DESKTOP := /usr/share/applications
|
|
|
|
|
|
|
|
DSTDIR := $(CURDIR)/debian/$(PACKAGE)
|
|
|
|
MY_DESKTOP := $(DSTDIR)/usr/share/applications
|
|
|
|
|
2017-07-15 13:20:51 -06:00
|
|
|
CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS)
|
|
|
|
CFLAGS := $(shell dpkg-buildflags --get CFLAGS)
|
|
|
|
LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
|
2010-11-29 13:10:09 -07:00
|
|
|
|
|
|
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
|
|
|
DEBOP=--enable-debug
|
|
|
|
else
|
|
|
|
DEBOP=
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CFLAGS += -O0
|
|
|
|
else
|
|
|
|
CFLAGS += -O2
|
|
|
|
endif
|
|
|
|
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
|
|
|
|
INSTALL_PROGRAM += -s
|
|
|
|
endif
|
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
|
2017-07-15 13:20:51 -06:00
|
|
|
CPPFLAGS="$(CPPFLAGS)" \
|
|
|
|
CFLAGS="$(CFLAGS)" \
|
|
|
|
LDFLAGS="$(LDFLAGS)" \
|
2010-11-29 13:10:09 -07:00
|
|
|
./configure \
|
|
|
|
--host=$(DEB_HOST_GNU_TYPE) \
|
|
|
|
--build=$(DEB_BUILD_GNU_TYPE) \
|
|
|
|
--program-suffix=$(PKG_SUFFIX) \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libexecdir=\$${prefix}/lib \
|
|
|
|
--mandir=\$${prefix}/share/man \
|
|
|
|
--sysconfdir=/etc/$(PACKAGE) \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--libdir=/etc/$(PACKAGE) \
|
2011-08-18 13:47:42 -06:00
|
|
|
--with-app-class=$(PKG_CLASS) \
|
2010-11-29 13:10:09 -07:00
|
|
|
--without-xterm-symlink \
|
2013-03-09 07:45:38 -07:00
|
|
|
--disable-imake \
|
2010-11-29 13:10:09 -07:00
|
|
|
--enable-256-color \
|
|
|
|
--enable-88-color \
|
|
|
|
--enable-dabbrev \
|
|
|
|
--enable-dec-locator \
|
|
|
|
--enable-exec-xterm \
|
|
|
|
--enable-hp-fkeys \
|
|
|
|
--enable-load-vt-fonts \
|
|
|
|
--enable-logfile-exec \
|
|
|
|
--enable-logging \
|
|
|
|
--enable-mini-luit \
|
|
|
|
--enable-paste64 \
|
2014-07-14 02:30:10 -06:00
|
|
|
--enable-regis-graphics \
|
2010-11-29 13:10:09 -07:00
|
|
|
--enable-sco-fkeys \
|
2016-08-07 15:27:36 -06:00
|
|
|
--enable-screen-dumps \
|
2013-08-26 14:06:09 -06:00
|
|
|
--enable-sixel-graphics \
|
2010-11-29 13:10:09 -07:00
|
|
|
--enable-tcap-fkeys \
|
|
|
|
--enable-tcap-query \
|
|
|
|
--enable-toolbar \
|
|
|
|
--enable-wide-chars \
|
|
|
|
--enable-xmc-glitch \
|
|
|
|
--with-app-defaults=$(PKG_APPDEFAULTS) \
|
2013-01-04 09:40:18 -07:00
|
|
|
--with-icondir=\$${prefix}/share/icons \
|
|
|
|
--with-pixmapdir=\$${prefix}/share/pixmaps \
|
2010-11-29 13:10:09 -07:00
|
|
|
--with-own-terminfo=\$${prefix}/share/terminfo \
|
2013-01-04 09:40:18 -07:00
|
|
|
--with-icon-theme \
|
2010-11-29 13:10:09 -07:00
|
|
|
--with-terminal-type=xterm-new \
|
|
|
|
--with-utempter \
|
2013-01-04 09:40:18 -07:00
|
|
|
--with-icon-name=mini.xterm \
|
|
|
|
--with-xpm ${DEBOP}
|
2010-11-29 13:10:09 -07:00
|
|
|
|
|
|
|
touch configure-stamp
|
|
|
|
|
|
|
|
build: build-stamp
|
|
|
|
build-stamp: configure-stamp
|
|
|
|
dh_testdir
|
|
|
|
|
|
|
|
$(MAKE)
|
|
|
|
|
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
|
|
|
|
[ ! -f Makefile ] || $(MAKE) distclean
|
|
|
|
|
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install: install-stamp
|
|
|
|
install-stamp: build-stamp
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
|
|
|
|
$(MAKE) install \
|
|
|
|
DESTDIR=$(CURDIR)/debian/$(PACKAGE)
|
|
|
|
|
|
|
|
touch install-stamp
|
|
|
|
|
|
|
|
install: install-indep install-arch
|
|
|
|
install-indep:
|
|
|
|
|
|
|
|
install-arch:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_prep -s
|
|
|
|
dh_installdirs -s
|
|
|
|
|
|
|
|
$(MAKE) install-bin \
|
|
|
|
DESTDIR=$(DSTDIR)
|
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
|
|
|
|
# This overwrites the Debian package's copy of app-defaults and icons.
|
|
|
|
# But the resources are not the same; they are patched.
|
|
|
|
sed -i -f package/debian/color.sed XTerm-col.ad
|
|
|
|
sed -i -f package/debian/xterm-xres.sed XTerm.ad
|
|
|
|
|
|
|
|
$(MAKE) install-app \
|
|
|
|
install-icon \
|
|
|
|
install-man \
|
|
|
|
DESTDIR=$(DSTDIR)
|
|
|
|
|
|
|
|
# Follow-up with a check against the installed resource files.
|
2011-06-07 13:21:06 -06:00
|
|
|
( cd $(DSTDIR)$(PKG_APPDEFAULTS) \
|
|
|
|
&& $(SHELL) -c 'for p in *; do \
|
|
|
|
test -f $(PKG_APPDEFAULTS)/$$p && \
|
|
|
|
diff -u $(PKG_APPDEFAULTS)/$$p $$p; \
|
|
|
|
done' ; \
|
|
|
|
exit 0 )
|
2010-11-29 13:10:09 -07:00
|
|
|
|
|
|
|
# The Debian package does not install desktop files.
|
|
|
|
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=486317
|
|
|
|
$(MAKE) install-desktop \
|
|
|
|
DESKTOP_FLAGS="--vendor='$(DESKTOP_VENDOR)' --dir $(MY_DESKTOP)"
|
|
|
|
|
|
|
|
( cd $(DSTDIR)$(PKG_DESKTOP) \
|
|
|
|
&& $(SHELL) -c 'for p in *;do \
|
2011-06-07 13:21:06 -06:00
|
|
|
test -f $(PKG_DESKTOP)/$$p && \
|
|
|
|
diff -u $(PKG_DESKTOP)/$$p $$p; \
|
2010-11-29 13:10:09 -07:00
|
|
|
test -n "$(PKG_SUFFIX)" && mv $$p `basename $$p .desktop`$(PKG_SUFFIX).desktop; \
|
|
|
|
done' ; \
|
|
|
|
exit 0 )
|
|
|
|
|
2013-01-04 09:40:18 -07:00
|
|
|
dh_icons
|
|
|
|
|
2010-11-29 13:10:09 -07:00
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdebconf
|
|
|
|
dh_installdocs
|
|
|
|
dh_installmenu
|
|
|
|
dh_installmime
|
|
|
|
dh_installexamples tektests vttests
|
|
|
|
dh_installchangelogs
|
|
|
|
dh_install
|
|
|
|
dh_link
|
|
|
|
dh_strip
|
2014-05-09 13:56:40 -06:00
|
|
|
dh_compress -Xexamples
|
2010-11-29 13:10:09 -07:00
|
|
|
dh_fixperms
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
|
|
|
binary: binary-indep binary-arch
|
|
|
|
.PHONY: build clean binary-indep binary-arch binary install install-stamp
|