10
10
## ----------------------------------------------------------------------
14
## ----------------------------------------------------------------------
15
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
11
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14
## ----------------------------------------------------------------------
16
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
17
CONFFLAGS += --build $(DEB_HOST_GNU_TYPE)
19
CONFFLAGS += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
22
## ----------------------------------------------------------------------
24
INSTALL_FILE = $(INSTALL) -p -o root -g root -m 644
25
INSTALL_PROGRAM = $(INSTALL) -p -o root -g root -m 755
26
INSTALL_SCRIPT = $(INSTALL) -p -o root -g root -m 755
27
INSTALL_DIR = $(INSTALL) -p -o root -g root -m 755 -d
29
## ----------------------------------------------------------------------
30
CFLAGS = -Wall -g -pthread -D_REENTRANT
32
## ----------------------------------------------------------------------
33
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
38
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
42
## ----------------------------------------------------------------------
43
UPACKAGE = $(shell dh_listpackages | grep -- -udeb$$)
44
VERSION = $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2)
45
ARCH = $(shell dpkg --print-architecture)
46
UFILENAME = $(UPACKAGE)_$(VERSION)_$(ARCH).udeb
48
## ----------------------------------------------------------------------
49
TMP_DIR = $(CURDIR)/debian/tmp
18
51
## ----------------------------------------------------------------------
21
clean: configure autotools
27
rm -f configure-stamp build-stamp
57
[ ! -f Makefile ] || $(MAKE) distclean
58
dh_clean configure-stamp build-stamp install-stamp
33
-test -r /usr/share/misc/config.sub && \
34
cp -f /usr/share/misc/config.sub conftools/config.sub
35
-test -r /usr/share/misc/config.guess && \
36
cp -f /usr/share/misc/config.guess conftools/config.guess
40
touch configure.in && sleep 2s && \
41
touch aclocal.m4 && sleep 2s && \
44
--build=$(DEB_BUILD_GNU_TYPE) \
45
--host=$(DEB_HOST_GNU_TYPE) \
65
touch configure.in && touch aclocal.m4 && touch configure
67
./configure $(CONFFLAGS) --prefix=/usr
47
68
touch configure-stamp
49
build: configure-stamp build-stamp
71
build-stamp: configure-stamp
76
install: install-stamp
82
$(MAKE) install prefix=$(TMP_DIR)/usr \
83
man1dir=$(TMP_DIR)/usr/share/man/man1
88
binary-arch: build install
62
$(MAKE) prefix=`pwd`/debian/tmp/usr install
65
cd expat.html && mv reference.html index.html
67
dh_installchangelogs -a Changes
91
dh_install -a --sourcedir=$(TMP_DIR)
92
dh_installdocs -a -N$(UPACKAGE)
93
dh_installexamples -a -N$(UPACKAGE)
94
dh_installchangelogs -a Changes -N$(UPACKAGE)
99
dh_makeshlibs -a -V -N$(UPACKAGE)
75
dh_shlibdeps -a -l `pwd`/debian/libexpat1/usr/lib
101
dh_shlibdeps -a -l $(PWD)/debian/libexpat1/usr/lib
102
dh_gencontrol -a -N$(UPACKAGE)
103
dh_gencontrol -p$(UPACKAGE) -- -fdebian/files~
104
dpkg-distaddfile $(UFILENAME) debian-installer extra
105
dh_md5sums -a -N$(UPACKAGE)
106
dh_builddeb -a -N$(UPACKAGE)
107
dh_builddeb -p$(UPACKAGE) --filename=$(UFILENAME)
80
109
binary: binary-indep binary-arch
82
.PHONY: clean autotools build binary-indep binary-arch binary
111
.PHONY: clean build install binary-indep binary-arch binary
84
113
## ----------------------------------------------------------------------