| 1 |
#!/usr/bin/make -f |
| 2 |
export DH_VERBOSE=1 |
| 3 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 4 |
include /usr/share/dpkg/default.mk |
| 5 |
export ERL_COMPILER_OPTIONS=deterministic |
| 6 |
|
| 7 |
DESTDIR=$(CURDIR)/debian/erlang-lager |
| 8 |
|
| 9 |
|
| 10 |
%: |
| 11 |
dh $@ --buildsystem=rebar --with rebar |
| 12 |
|
| 13 |
|
| 14 |
override_dh_auto_install: |
| 15 |
dh_auto_install |
| 16 |
for file in include/*.hrl ; do \ |
| 17 |
fname=$$(basename $${file}) ; \ |
| 18 |
subdir=$$(basename $$(dirname $${file})) ; \ |
| 19 |
if [ ! -f $(DESTDIR)/usr/lib/erlang/lib/lager-$(DEB_VERSION_UPSTREAM)/$${subdir}/$${fname} ] ; then \ |
| 20 |
install -m 755 -d $(DESTDIR)/usr/lib/erlang/lib/lager-$(DEB_VERSION_UPSTREAM)/$${subdir} ; \ |
| 21 |
install -m 644 $${file} \ |
| 22 |
$(DESTDIR)/usr/lib/erlang/lib/lager-$(DEB_VERSION_UPSTREAM)/$${subdir} ; \ |
| 23 |
fi ; \ |
| 24 |
done |
| 25 |
find $(CURDIR)/debian/tmp/ -type f -name '*.hrl' -delete |
| 26 |
|
| 27 |
override_dh_auto_test: |
| 28 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 29 |
# Test framework is wonky, so run it but don't fail the build |
| 30 |
rebar eunit || true |
| 31 |
endif |