1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/usr/bin/make -f
export BDIR := BUILD
export LDFLAGS := -Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS)
export CFLAGS := -D_REENTRANT -Wall $(shell dpkg-buildflags --get CFLAGS) \
$(shell getconf LFS_CFLAGS)
export DESTDIR := debian/tmp
DH_AUTO_OPTIONS := -v -Sautoconf -B$(BDIR) --parallel
%: force
dh "$@"
override_dh_auto_configure: $(BDIR)/configure-stamp
override_dh_auto_build: $(BDIR)/build-arch-stamp
override_dh_auto_install: $(BDIR)/build-arch-stamp
dh_auto_install $(DH_AUTO_OPTIONS)
override_dh_auto_clean:
rm -f $(BDIR)/build-arch-stamp $(BDIR)/build-indep-stamp $(BDIR)/configure-stamp
dh_auto_clean $(DH_AUTO_OPTIONS)
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' -o -name 'config.log' \
-o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS
dh_autotools-dev_restoreconfig
$(BDIR)/configure-stamp:
dh_autotools-dev_updateconfig
dh_auto_configure $(DH_AUTO_OPTIONS) -- \
--verbose \
-- CFLAGS='$(CFLAGS)' \
LDFLAGS='$(LDFLAGS)'
touch "$@"
$(BDIR)/build-arch-stamp: $(BDIR)/configure-stamp
dh_auto_build $(DH_AUTO_OPTIONS)
touch "$@"
force debian/rules:
.PHONY: force debian/rules \
override_dh_auto_build override_dh_auto_clean \
override_dh_auto_configure override_dh_auto_install
|