2
# This file was originally written by Joey Hess and Craig Small.
5
# include /usr/share/dpatch/dpatch.make
7
# Uncomment this to turn on verbose mode.
10
# This is the debhelper compatability version to use.
13
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
14
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
16
export CFLAGS = -Wall -g
17
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
23
config.status: configure
25
# Add here commands to configure the package.
26
./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
27
--with-swtest --prefix=/usr --mandir=\$${prefix}/share/man \
28
--infodir=\$${prefix}/share/info --sysconfdir=\$${prefix}/etc
32
build-stamp: config.status
34
# Add here commands to compile the package.
42
rm -f build-stamp configure-stamp
43
# Add here commands to clean up after the build process.
45
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
46
cp -f /usr/share/misc/config.sub config.sub
48
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
49
cp -f /usr/share/misc/config.guess config.guess
51
rm -f config.log config.status
59
# Add here commands to install the package into debian/libirman-dev
60
$(MAKE) install prefix=$(CURDIR)/debian/libirman-dev/usr sysconfdir=$(CURDIR)/debian/libirman-dev/etc/
62
# Build architecture-independent files here.
63
binary-indep: build install
64
# We have nothing to do by default.
66
# Build architecture-dependent files here.
67
binary-arch: build install
3
STAMP_DIR := debian/stampdir
5
PATCH_DIR := debian/patches
8
QUILT := QUILT_PATCHES=$(PATCH_DIR) quilt --quiltrc /dev/null
10
CFLAGS += -Wall -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
14
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
15
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
20
--mandir=\$${prefix}/share/man \
21
--infodir=\$${prefix}/share/info \
22
--sysconfdir=\$${prefix}/etc \
23
--build=$(DEB_BUILD_GNU_TYPE)
25
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
26
configure_flags += --host=$(DEB_HOST_GNU_TYPE)
29
$(STAMP_DIR)/patch-stamp:
32
$(QUILT) push -a || test $$? = 2
33
# backup the original (potentially patched) files to restore them in
35
-test -r config.sub && cp config.sub config.sub.orig
36
-test -r config.guess && cp config.guess config.guess.orig
37
-test -r /usr/share/misc/config.sub && \
38
cp -f /usr/share/misc/config.sub config.sub
39
-test -r /usr/share/misc/config.guess && \
40
cp -f /usr/share/misc/config.guess config.guess
41
-mkdir -p $(STAMP_DIR)
44
patch: $(STAMP_DIR)/patch-stamp
46
$(STAMP_DIR)/build-stamp: $(STAMP_DIR)/patch-stamp
48
CFLAGS="$(CFLAGS)" ./configure $(configure_flags)
52
build: $(STAMP_DIR)/build-stamp
57
[ ! -f Makefile ] || $(MAKE) $(MAKE_ENV) distclean
58
# restore files from backup (before unpatching)
59
-test -r config.sub.orig && mv -f config.sub.orig config.sub
60
-test -r config.guess.orig && mv -f config.guess.orig config.guess
61
# unapply patches, if any
62
$(QUILT) pop -a -R || test $$? = 2
66
binary-indep: $(STAMP_DIR)/build-stamp
68
binary-arch: $(STAMP_DIR)/build-stamp
73
prefix=$(CURDIR)/debian/libirman-dev/usr \
74
sysconfdir=$(CURDIR)/debian/libirman-dev/etc/ \
76
dh_installchangelogs -s
85
90
binary: binary-indep binary-arch
86
.PHONY: build clean binary-indep binary-arch binary install
91
.PHONY: patch build clean binary-indep binary-arch binary