2015-08-14 09:44:18 +00:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
|
|
|
#export DH_VERBOSE=1
|
|
|
|
|
2019-03-03 22:21:24 +00:00
|
|
|
DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
|
|
|
|
2015-08-14 09:44:18 +00:00
|
|
|
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
|
|
|
CFLAGS += -g
|
|
|
|
endif
|
|
|
|
|
2016-07-03 16:32:21 +00:00
|
|
|
CHANGED_FILES_LIST = debian/savedfiles.lst
|
|
|
|
CHANGED_FILES_ARCHIVE = debian/savedfiles.cpio
|
|
|
|
|
2015-08-14 09:44:18 +00:00
|
|
|
%:
|
2016-06-26 10:03:38 +00:00
|
|
|
dh $@ --with autoreconf
|
2015-08-14 09:44:18 +00:00
|
|
|
|
2016-07-03 16:32:21 +00:00
|
|
|
override_dh_autoreconf:
|
|
|
|
if [ ! -f "$(CHANGED_FILES_ARCHIVE)" -a -f Makefile.in ]; then \
|
|
|
|
cpio -o < $(CHANGED_FILES_LIST) > $(CHANGED_FILES_ARCHIVE); \
|
|
|
|
fi
|
|
|
|
dh_autoreconf
|
|
|
|
|
|
|
|
override_dh_autoreconf_clean:
|
|
|
|
dh_autoreconf_clean
|
|
|
|
if [ -f "$(CHANGED_FILES_ARCHIVE)" ]; then \
|
|
|
|
cpio -idu < $(CHANGED_FILES_ARCHIVE) && \
|
|
|
|
rm -f $(CHANGED_FILES_ARCHIVE); \
|
|
|
|
fi
|
|
|
|
|
|
|
|
# An ugly workaround because those files are included in the tarball
|
|
|
|
override_dh_clean:
|
|
|
|
dh_clean -X autom4te.cache
|
|
|
|
|
|
|
|
|
2015-08-14 09:44:18 +00:00
|
|
|
override_dh_auto_build:
|
2016-06-26 10:03:38 +00:00
|
|
|
$(MAKE) all docs
|
2016-11-15 12:26:43 +00:00
|
|
|
cat dahdi.rules xpp/xpp.rules >debian/dahdi.udev
|
2015-08-14 09:44:18 +00:00
|
|
|
|
2016-06-26 13:48:01 +00:00
|
|
|
override_dh_auto_clean:
|
|
|
|
ifeq ($(wildcard Makefile),)
|
|
|
|
$(MAKE) -f Makefile.legacy clean
|
|
|
|
else
|
|
|
|
$(MAKE) clean
|
|
|
|
endif
|
2015-08-14 09:44:18 +00:00
|
|
|
|
2016-06-26 20:36:29 +00:00
|
|
|
override_dh_auto_configure:
|
|
|
|
dh_auto_configure
|
|
|
|
|
2015-08-14 09:44:18 +00:00
|
|
|
override_dh_auto_install:
|
|
|
|
# also run the 'config' target, in addition to the 'install' target:
|
|
|
|
dh_auto_install -- config
|
|
|
|
rm $(CURDIR)/debian/tmp/usr/share/dahdi/span_config.d/50-asterisk
|
2020-08-19 20:58:33 +00:00
|
|
|
rm $(CURDIR)/debian/tmp/usr/lib/*/libtonezone.la
|
|
|
|
rm -rf $(CURDIR)/debian/tmp/etc/dahdi
|
|
|
|
rm -rf $(CURDIR)/debian/tmp/etc/udev/rules.d
|