2 # debian/rules for the Debian libxtst package.
3 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>
4 # Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
5 # Copyright © 2005 David Nusinow <dnusinow@debian.org>
7 # Uncomment this to turn on verbose mode.
10 # set this to the name of the main shlib's binary package
13 include debian/xsfbs/xsfbs.mk
16 LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed
17 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
22 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
24 MAKEFLAGS += -j$(NUMJOBS)
27 DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
28 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
29 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
30 ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
31 confflags += --build=$(DEB_HOST_GNU_TYPE)
33 confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
34 # confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
40 #build-stamp: $(STAMP_DIR)/patch
44 mkdir -p obj-$(DEB_BUILD_GNU_TYPE)
45 cd obj-$(DEB_BUILD_GNU_TYPE) && \
46 ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
47 --infodir=\$${prefix}/share/info $(confflags) \
50 cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
58 rm -f config.cache config.log config.status
59 rm -f */config.cache */config.log */config.status
60 rm -f conftest* */conftest*
61 rm -rf autom4te.cache */autom4te.cache
63 rm -f INSTALL aclocal.m4 config.guess config.sub config.h.in configure
64 rm -f depcomp install-sh missing mkinstalldirs
66 find -name Makefile.in -exec rm -f {} \;
67 #find -name Makefile.in -delete
77 cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
79 # Build architecture-dependent files here.
80 binary-arch: build install
85 dh_install --sourcedir=debian/tmp --list-missing
86 # dh_installchangelogs ChangeLog
89 dh_strip --dbg-package=$(PACKAGE)-dbg
99 # Build architecture-independent files here.
100 binary-indep: build install
103 binary: binary-indep binary-arch
104 .PHONY: build clean binary-indep binary-arch binary install