File: rules

package info (click to toggle)
node-boom 9.1.0%2B~2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 240 kB
  • sloc: javascript: 1,501; makefile: 47
file content (64 lines) | stat: -rwxr-xr-x 2,213 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/make -f
# -*- makefile -*-

include /usr/share/dpkg/pkg-info.mk

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

MAIN_PKG=node-boom
SUBMODULES=node-hapi-bounce
SUBMODULES_GIT=node-hapi-bounce

%:
	dh $@

override_dh_auto_clean:
	dh_auto_clean
	rm -rf node_modules

override_dh_auto_configure:
	dh_auto_configure
	mkdir -p node_modules/@hapi/
	ln -s ../../ node_modules/@hapi/boom

#override_dh_auto_build:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_auto_test:
	nodejs -e "require('.')"
	cd node-hapi-bounce && nodejs -e "require('.')"
endif

ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS) $(DEB_BUILD_PROFILES)))
override_dh_installdocs:
	dh_installdocs
	ln -s node-boom debian/$(MAIN_PKG)/usr/share/doc/node-hapi-boom
	set -e;for module in $(SUBMODULES); do \
		mkdir -p "debian/$(MAIN_PKG)/usr/share/doc/$$module"; \
		ln -s ../$(MAIN_PKG)/copyright debian/$(MAIN_PKG)/usr/share/doc/$$module/copyright || exit 1; \
	done
	set -e;for module in $(SUBMODULES); do \
		mkdir -p "debian/$(MAIN_PKG)/usr/share/doc/$$module"; \
		find -L "$$module" -maxdepth 1 -iname '*.md' -and -not -iname 'license.md' -and -not -iname 'changelog.md' -exec install {} "debian/$(MAIN_PKG)/usr/share/doc/$$module" \; || exit 1;\
	done
else
override_dh_installdocs:
	@echo '**********************************************************'
	@echo 'Skip doc'
	@echo '**********************************************************'
endif


override_dh_installchangelogs:
	dh_installchangelogs -XCHANGELOG.md
	mkdir -p debian/$(MAIN_PKG)/usr/share/doc/node-hapi-boom
	ln -sf ../$(MAIN_PKG)/changelog.Debian.gz debian/$(MAIN_PKG)/usr/share/doc/node-hapi-boom/changelog.Debian.gz
	set -e;for module in $(SUBMODULES); do \
		mkdir -p "debian/$(MAIN_PKG)/usr/share/doc/$$module"; \
		ln -s ../$(MAIN_PKG)/changelog.Debian.gz debian/$(MAIN_PKG)/usr/share/doc/$$module/changelog.Debian.gz; \
	done

COMPONENTS_LIST_GIT_DPM=$(foreach component,$(SUBMODULES_GIT),--component ../$(MAIN_PKG)_$(DEB_VERSION_UPSTREAM).orig-$(component).tar.*)

git_dpm_rules:
	git dpm inu --ignore-unclean-branches --pristine-tar $(COMPONENTS_LIST_GIT_DPM) --rebase ../$(MAIN_PKG)_$(DEB_VERSION_UPSTREAM).orig.tar.*